Jean-Guillaume hi! Xerces doesn't appear to report any warnings in the DTD (which I don't believe it has to, to conform to the Recommendation).
Some programming is required if you want to get this information. Duplicate attdefs is easy enough (check for the same attribute type being declared > once). For undeclared elements you can examine the content models of all elements declared, compile a list of distinct element type names referred to, and then compare this against the elements *actually* declared in the DTD (use a DeclHandler to get element type declaration info.). - Alex. ------------------------------------ Alex Brown Technical Director Griffin Brown Digital Publishing Ltd Orwell House Cowley Road Cambridge CB4 0PP United Kingdom Tel +44(1223)425730 FAX +44(1223)425384 Web http://www.griffinbrown.co.uk -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 28 November 2001 08:40 To: [EMAIL PROTECTED] Subject: Is the warning() method called with Xerces 1.4.4 ? Hi people. I've tried to produce two warnings (warn on undeclared element and warn on duplicate attdef) in a DTD. But when I parse the XML file that refers this DTD with Xerces 1.4.4., I don't get the warning message. Have I made a mistake or is there a bug in Xerces ? Thanks in advance for your answer. Jean-Guillaume. Attached files : - MailingListWarning.xml - MailingListWarning.dtd (a DTD where an element is undeclared and an attribute is declared twice) - MyErrorHandler.java (a class that extends DefaultHandler and that defines methods warning() and error() - MyEventHandler.java (a class that extends MyErrorHandler and that defines methods from ContentHandler) - XMLFileConsolePrinter (a class that creates a validating SAXParser with features "http://apache.org/xml/features/validation/warn-on-duplicate-attdef" and "http://apache.org/xml/features/validation/warn-on-undeclared-elemdef" at true and that parses the XML File.) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
