Mukul Gandhi commented on XERCESJ-1688:

I've done this for SAX parser as well. Here's what we need to write in the 
client side code, to be able to do this,

SAXParserFactory factory = SAXParserFactory.newInstance();
 SchemaFactory sf = 
 Schema schema = sf.newSchema(new File(xsd));
 SAXParser parser = factory.newSAXParser();
 DefaultHandler handler = new DefaultHandler1();
 parser.parse(xml, handler);

class DefaultHandler1 extends DefaultHandler {
    public void startElement(String arg0, String arg1, String arg2, Attributes 
arg3) throws SAXException {

    public void error(SAXParseException arg0) throws SAXException {

    public void fatalError(SAXParseException arg0) throws SAXException {

    public void warning(SAXParseException arg0) throws SAXException {

> Support for XML Schema 1.1 validation with the DOM and SAX parsers
> ------------------------------------------------------------------
>                 Key: XERCESJ-1688
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1688
>             Project: Xerces2-J
>          Issue Type: Wish
>         Environment: JDK 1.4 and above, OS independent
>            Reporter: Mukul Gandhi
>            Priority: Minor
> XML Schema 1.0 validation has been available in XercesJ since long time. 
> There we have following three methods for doing XML Schema 1.0 validation:
> Using DOM parser,
> Using SAX parser,
> Using JAXP API
> But XercesJ's XML Schema 1.1 processor, supports XML Schema 1.1 validation 
> using only JAXP API. I wish we support XML Schema 1.1 validation, using DOM 
> and SAX parsing as well. I feel, this will make our XML Schema 1.1 validation 
> API complete.
> I'm creating this issue, so that anyone (including me) can try implementing 
> the functionality I've mentioned in this issue.

This message was sent by Atlassian JIRA

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

Reply via email to