Hi,

        I've got a weird behavior during the call to a SAX Parser (using Xerces 
2.9.0) parse method (passing a File and an handler that extends 
org.xml.sax.helpers.DefaultHandler). If I throw a SAXException inside my own 
implementation of startElement or endElement, the call to parse the document 
receives a com.sun.org.apache.xerces.internal.xni.XNIException with the 
SAXException I throw within it. I think that this isn't how it should behave, 
and looked inside the documentation, JIRA, and a little in the code, but found 
no answer why is this happening. If this could be a bug, I'll post it on JIRA, 
but I would like someone to confirm it before, because maybe I'm doing 
something wrong.

        The way the parser is configured is shown on the code below:
                SAXParserFactory saxFactory = SAXParserFactory.newInstance();
                saxFactory.setNamespaceAware(true);
                saxFactory.setSchema(xmlSchema);
                this.parser = saxFactory.newSAXParser();

        The parsers are Xerces ones, choosen using System properties (I've 
checked this also using debug)
                org.xml.sax.driver=org.apache.xerces.parsers.SAXParser
                
javax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl
                
javax.xml.validation.SchemaFactory=org.apache.xerces.jaxp.validation.XMLSchemaFactory

        Thanks in advance to any responses.


________________________________________
Joan Horta Tosas
________________________________________
Àrea de Peatge

Tecsidel 
Avda. República Argentina 6, 5ª planta
08023 Barcelona
Tel:      (+34) 93 292 21 10
Ext:      1125
http://www.tecsidel.es
 



La información que se incluye en este mensaje es confidencial y puede ser 
privada a nivel legal. Las vistas u opiniones que se expresan en este mensaje 
de correo electrónico son propiedad exclusiva del autor.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to