Hi Sander, The parser doesn't report any errors for your example because there's no such constraint for DTDs. Only if an element called 'some' is in your instance document, will the parser report an error for the missing element declaration [1] while validating.
[1] http://www.w3.org/TR/REC-xml#elementvalid On Fri, 9 Jan 2004, Sander Bos wrote: > > Hi there, > > If I have a document like: > > === > <!DOCTYPE test SYSTEM "test.dtd"> > <test/> > === > > and a DTD like > > === > <!ELEMENT test EMPTY> > <!ELEMENT illegal_decl (some, none, existing, element, names)> > === > > is it possible to get errors from the DTD being incorrect (for instance > 'some' is not defined in any way). I tried parsing the document with an > XNI parser with > parserConfig.setFeature("http://xml.org/sax/features/validation", > true); > > parserConfig.setFeature("http://apache.org/xml/features/validation/schem > a-full-checking", true); > but the full-checking does not seem to have an effect for my DTD, the > illegal_decl is not noticed. Is what I see what I should see? Is there > any way to have Xerces report errors for this DTD (e.g. with a preparser > or something like that)? > > Kind regards, > > --Sander. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------- Michael Glavassevich XML Parser Development IBM Toronto Lab E-mail: [EMAIL PROTECTED] E-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
