[XML-SIG] Documentation and problems
Lars Marius Garshol
07 Jan 1999 21:46:57 +0100
* Simon Pepping
| I have spent quite some time with the XML package, mainly with the
| SAX interface and xmlproc. As a result I have written a(nother)
| document about the interaction of an application and a SAX parser,
| and how to write a SAX application. I also wrote a simple
| application to demonstrate it.
Great! I think this document is something people have wanted for some
time, and I think it complements AMKs documentation nicely.
| Pr. SAXParseException.__str__ reads:
Thanks! This is now fixed.
| Pr. pyexpat does not report the document name with the getSystemId
Not so strange, since pyexpat does not (as far as I can tell) make
this information available. However, I've now changed the driver to
remember the sysId passed to it as an argument to parse() and report
that. If no sysId is available (parseFile or reset/feed/close were
used) "Unknown" is returned.
| Pr. XMLValidator does not use my error handlers:
Hmmm. The code you cite does not match my current development version
nor the version in the public CVS tree. In fact, I suspect this to be
from a quite old release.
| Pr. XMLValidator does not accept spaces around #PCDATA as content in
| an element type declaration:
I cannot replicate this problem with my version and the error message
seems to be from version 0.51 or earlier.
Can you please check if you're using version 0.52? (Check the source
of xmlproc.py.) If not, can you please install 0.52 and try again?
| Pr. drv_xmlproc does not implement a getPublicId method:
This is because the parser does not keep track of this information at
the moment. I've added it to the todo list and hope to get this into
| Pr. XMLValidator does not accept the following construction in an
| external DTD:
This is correct. Parameter entity references inside markup
declarations are not yet supported by xmlproc.
| <!ENTITY % tekst "(#PCDATA|taxon|label|opsomming)*">
| <!ELEMENT p (%tekst;)>
| ERROR: Didn't match [A-Za-z_:][\-A-Za-z_:.0-9]* at waarnemingen.dtd:22:38
| TEXT: '%tekst;)>
| (the declaration of p is line 22)
| I am not sure whether this is allowed. nsgmls gives the warning:
| '#PCDATA in nested model group'.
It's not. What you've written is equivalent to
<!ELEMENT p ((#PCDATA|taxon|label|opsomming)*)>
which does not match the grammar in the XML spec. (See productions
45-46 and 51.) Remove the parentheses around the PE reference and it
should be fine.
| I hope this is useful.
It most certainly was! This makes it abundantly clear that new
releases of both saxlib and saxdrv are needed, and I'm currently
working on both. This should probably take 2-3 weeks until the first
release. (Anyone who needs the new versions before then can email me.)