To get what you want you would need to place your own component [1] (which builds the path) ahead of the schema validator in the XNI pipeline. If you're thinking of doing that, taking a look at Xerces' parser configurations [2][3] particularly the configurePipeline() methods should give you some ideas.
Thanks. [1] http://xerces.apache.org/xerces2-j/javadocs/xni/org/apache/xerces/xni/XMLDocumentHandler.html [2] http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/parsers/XML11Configuration.java [3] http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/parsers/XIncludeAwareParserConfiguration.java Michael Glavassevich XML Parser Development IBM Toronto Lab E-mail: [EMAIL PROTECTED] E-mail: [EMAIL PROTECTED] fikin <[EMAIL PROTECTED]> wrote on 05/15/2007 05:16:47 AM: > that part seems achievable. > > how and where do i hook up with XNI? > > as far as i saw it, with SAX seems inappropriate as the SAX-callback > comes after the call to error handler (which prevents me from > building the elements stack prior to error reporting). > On 5/14/07, Michael Glavassevich <[EMAIL PROTECTED]> wrote: > Hi, > > Xerces has nothing built-in which does this. You would have to build the > expression yourself from the SAX (or internal XNI) events and then hook in > your own extension to XMLErrorReporter [1] which replaces the replacement > arguments for each of the error messages with your own. > > Thanks. > > [1] > http://xerces.apache.org/xerces2- > j/javadocs/xerces2/org/apache/xerces/impl/XMLErrorReporter.html > > Michael Glavassevich > XML Parser Development > IBM Toronto Lab > E-mail: [EMAIL PROTECTED] > E-mail: [EMAIL PROTECTED] > > fikin <[EMAIL PROTECTED]> wrote on 05/14/2007 07:48:37 AM: > > > i have an use case where the validation error message should contain > > the parsing stack as well. > > for example, instead of: > > org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: > > Attribute 've1r' is not allowed to appear in element 'in:document'. > > to print actually: > > org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: > > Attribute 've1r' is not allowed to appear in element '/in: > > root/in:document '. > > > > any suggestions? > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]