You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by bu...@apache.org on 2002/11/07 18:17:32 UTC

DO NOT REPLY [Bug 14362] New: - Parser feature http://apache.org/xml/features/validation/warn-on-undeclared-elemdef not recognized

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14362>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14362

Parser feature http://apache.org/xml/features/validation/warn-on-undeclared-elemdef not recognized

           Summary: Parser feature
                    http://apache.org/xml/features/validation/warn-on-
                    undeclared-elemdef not recognized
           Product: Xerces2-J
           Version: 2.2.0
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Major
          Priority: Other
         Component: SAX
        AssignedTo: xerces-j-dev@xml.apache.org
        ReportedBy: d.kassner@gmx.de


Setting the mentioned feature 
http://apache.org/xml/features/validation/warn-on-undeclared-elemdef the XML 
reader throws a SAXNotRecognizedException. Following features were set before:

http://xml.org/sax/features/namespaces (true)
http://xml.org/sax/features/validation (true)
http://apache.org/xml/features/validation/dynamic (false)
http://apache.org/xml/features/validation/schema (true)
http://apache.org/xml/features/validation/warn-on-duplicate-attdef (false)

The source for creating the parser and setting the features looks like:

SAXParser  parser = null;
XMLReader  reader = null;

SAXParserFactory spfact = SAXParserFactory.newInstance();

spfact.setValidating(true);
spfact.setNamespaceAware(true);

try
{
	parser = spfact.newSAXParser();
	reader = parser.getXMLReader();
}
catch (Exception e)
{
	//	log and return ...
}

try
{
	reader.setFeature(feature, value);

	//	more features
}
catch (SAXNotRecognizedException e)
{
	//	log and return
}
catch (SAXNotSupportedException e)
{
	//	log and return
}

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org