Thank you for confirming that.  BTW, why would it not be an error if the DTD
had been external?

Scott Houck

Andy Heninger wrote:

> I've confirmed that this is a bug.  It's a new one -
> I haven't seen it before.
>
> The error would be correct if there had been an external
> DTD but that is not the case here.
>
> Andy Heninger
> IBM XML Technology Group, Cupertino, CA
> [EMAIL PROTECTED]
>
> From: "Scott R Houck" <[EMAIL PROTECTED]>
>
> > Here is a simple XML file that uses a default attribute in the DTD (for
> > the iq attribute).  When I run it through DOMCount (and my own code
> > using the Xerces C++ API), I get a bogus error message about a bad
> > standalone declaration, when the problem really is that it's not parsing
> > the missing attribute.  If I fill in Hillary's IQ, it passes.  Is this a
> > known issue?  I ran the XML through XML Authority, which validated the
> > correctness of the DTD.  This seems like a pretty basic feature of XML,
> > so I was surprised when it failed the Xerces parser.
> >
> > Scott Houck
> > =================================================
> >
> > <?xml version='1.0' standalone="yes"?>
> >
> > <!DOCTYPE phonebook [
> >    <!ELEMENT phonebook (person*)>
> >    <!ELEMENT person (phone, age, weight)>
> >    <!ATTLIST person name CDATA #REQUIRED>
> >    <!ATTLIST person iq CDATA "100">
> >    <!ELEMENT phone (#PCDATA)>
> >    <!ELEMENT age (#PCDATA)>
> >    <!ELEMENT weight (#PCDATA)>
> > ]>
> >
> >
> > <phonebook>
> >
> >    <person name="Albert Einstein" iq="200">
> >       <phone>555-1234</phone>
> >       <age>120</age>
> >       <weight>185</weight>
> >    </person>
> >
> >    <person name="Hillary Clinton">
> >       <phone>232-1000</phone>
> >       <age>49</age>
> >       <weight>140</weight>
> >    </person>
> >
> >    <person name="Mick Jagger" iq="140">
> >       <phone>555-5555</phone>
> >       <age>74</age>
> >       <weight>98</weight>
> >    </person>
> >
> > </phonebook>
> >
> >
> >


Reply via email to