Re: custom XIncludeHandler

2010-08-20 Thread Steve Ebersole
So given the DOCTYPE I described: http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"; [ %BOOK_ENTITIES; ]> I see the following: (1) resolveEntity( "%BOOK_ENTITIES", ... ); (2) resolveEntity( "[dtd]", ... ); I tried adding my "extra" entities during call (1). Essentially, I load the

Re: custom XIncludeHandler

2010-08-20 Thread Michael Glavassevich
Steve Ebersole wrote on 08/20/2010 08:26:19 AM: > On Fri, 2010-08-20 at 08:19 -0400, Michael Glavassevich wrote: > > Perhaps EntityResolver2.getExternalSubset() is only part of the > > solution. Can you show concrete examples where this wouldn't work on > > its own? > > Based on what you said, I

Re: missing element name in validation result

2010-08-20 Thread Mukul Gandhi
On Fri, Aug 20, 2010 at 5:54 PM, Michael Glavassevich wrote: > "ElementPSVImpl" is an internal class. Developers should be using the API > (i.e. ElementPSVI) [1]. Thanks, Michael. And also for useful observations about SAXParseException, which I think would solve the problem of OP in a SAX way.

Re: custom XIncludeHandler

2010-08-20 Thread Steve Ebersole
On Fri, 2010-08-20 at 08:19 -0400, Michael Glavassevich wrote: > Perhaps EntityResolver2.getExternalSubset() is only part of the > solution. Can you show concrete examples where this wouldn't work on > its own? Based on what you said, I had assumed that something like this would not work: http://a

Re: missing element name in validation result

2010-08-20 Thread Michael Glavassevich
"ElementPSVImpl" is an internal class. Developers should be using the API (i.e. ElementPSVI) [1]. Thanks. [1] http://xerces.apache.org/xerces2-j/javadocs/xs/org/apache/xerces/xs/ElementPSVI.html Michael Glavassevich XML Parser Development IBM Toronto Lab E-mail: mrgla...@ca.ibm.com E-mail: mrgla

Re: custom XIncludeHandler

2010-08-20 Thread Michael Glavassevich
Steve, Steve Ebersole wrote on 08/18/2010 01:24:36 PM: > On Tue, 2010-08-17 at 18:04 -0500, Steve Ebersole wrote: > > On Tue, 2010-08-17 at 17:15 -0400, Michael Glavassevich wrote: > > > > Oh, I need this to happen even if there is already a DTD. It will > > > in > > > > all likelihood have a

Re: missing element name in validation result

2010-08-20 Thread Michael Glavassevich
There is more than one error message generated by the schema validator, however you are only getting the first one because your ErrorHandler terminates processing immediately by throwing an exception. If you do not throw this exception your ErrorHandler will be called again with another SAXParseEx

Re: missing element name in validation result

2010-08-20 Thread Mukul Gandhi
Hi Lars, I think it is possible with Xerces to get validation details you are seeking via PSVI objects. If you look at, http://xerces.apache.org/xerces2-j/javadocs/xerces2/org/apache/xerces/impl/xs/ElementPSVImpl.html you may for example use the getValidity() method of "ElementPSVImpl" to kno

Re: missing element name in validation result

2010-08-20 Thread ZagZig
Mukul Gandhi-4 wrote: > > On Fri, Aug 20, 2010 at 1:50 PM, ZagZig wrote: >> cvc-datatype-valid.1.2.1: '' is not a valid value for 'integer'. >> >> which is correct, but i would like to print out the name of the element >> with >> the invalid value. > >> line number: 33 >> column number: 22 >

Re: missing element name in validation result

2010-08-20 Thread Mukul Gandhi
On Fri, Aug 20, 2010 at 1:50 PM, ZagZig wrote: > cvc-datatype-valid.1.2.1: '' is not a valid value for 'integer'. > > which is correct, but i would like to print out the name of the element with > the invalid value. > line number: 33 > column number: 22 you are using SAXParseException [1] class

missing element name in validation result

2010-08-20 Thread ZagZig
Hello everyone, i've a problem with the result of the validation. I validate my xml file against a xsd and everything is working fine, except that i can't get the name of the element that was not correctly filled. That means if i've an empty element "id" in my xml, which is from type integer, the