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: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to