Running the tests
Bernhard Herzog
bh at intevation.de
Mon Jun 2 17:24:04 CEST 2008
Hi,
On 02.06.2008, Bernhard Reiter wrote:
> Which is a failure in parser = pyRXP.Parser().
> It barks at the following line
> <!ATTLIST classification field CDATA>
> looks fine from far away (I do not know XML syntax by heart).
> Yes, my hypothesis is a pyXML defect.
Actually, the DTD is syntactically wrong. The line originally read (in the
1.0 dtd):
<!ATTLIST classification field CDATA #REQUIRED>
In the 1.1 DTD the #REQUIRED was removed (rev. 2656), apparently to make the
the attribute optinal. In a DTD that is done by using #IMPLIED instead of
#REQUIRED, not by omitting that parameter as the committer apparently
thought.
So, RXP is quite correct in raising an exception. The DTD should be fixed.
The following patch should work, but I haven't tested it:
Index: Resources/XML/thuban-1.2.1.dtd
===================================================================
--- Resources/XML/thuban-1.2.1.dtd (revision 2841)
+++ Resources/XML/thuban-1.2.1.dtd (working copy)
@@ -177,8 +177,8 @@
<!-- Classification data -->
<!ELEMENT classification (clnull?, clpoint*, clrange*, clpattern*, clcont*)>
-<!ATTLIST classification field CDATA>
-<!ATTLIST classification field_type CDATA>
+<!ATTLIST classification field CDATA #IMPLIED>
+<!ATTLIST classification field_type CDATA #IMPLIED>
<!ELEMENT clnull (cldata*)>
<!ELEMENT clpoint (cldata*)>
thuban-1.1.dtd needs to be changed in the same way.
Bernhard
--
Bernhard Herzog Intevation GmbH, Osnabrück
Amtsgericht Osnabrück, HR B 18998 http://www.intevation.de/
Geschäftsführer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://www.intevation.de/pipermail/thuban-devel/attachments/20080602/b7a0b61e/attachment.bin
More information about the Thuban-devel
mailing list
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)