parser, checkparser
by Andy Bach other posts by this author
Jul 26 2000 4:35PM messages near this date
view in the new Beta List Site
Re: XML::Twig '0' PCDATA erased?
|
tool recommendation for transformation project
Hi.
Forgive if I'm too dense here, but trying to get xml::dom to install I
ended up muddling w/ the test files. In there was the doc:
<!DOCTYPE simpsons [
<!ELEMENT person (#PCDATA)>
<!ATTLIST person
name CDATA #REQUIRED
hair (none | blue | yellow) "yellow"
sex CDATA #REQUIRED>
]>
<simpsons>
<person name="homer" hair="none" sex="male"/>
<person name="marge" hair="blue" sex="female"/>
<person name="bart" sex="almost"/>
<person name="lisa" sex="never"/>
</simpsons>
(it seems my version of toString and clone mess w/ the spaces around the
pipes ("none | blue" becomes "none|blue" so the toString tests failed and
the default "yellow" comes out 'yellow' ...)
So I was trying the above as a test doc, but XML::Checker::Parser says:
XML::Checker ERROR-101: undefined ELEMENT [simpsons]
Context: line 8, column 0, byte 156
while XML::Parser sails on by. I was using the TestCheckerParser.pl
script from libxml-enno (1.02). CheckerParser doesn't complain if I add:
<ELEMENT simpsons (person+)>
to the DTD. Is there a correct answer here?
a
Andy Bach, Sys. Mangler CC:Mail andy bach at ~7ca-chicago
Internet: andy@[...].gov VOICE: (608) 264-5178 ex 5738, FAX 264-510
'In order to know soup, it is not necessary to climb into a pot and be boiled.'
Oliver Heaviside, English physicist,
|