Re: Expand Fragments represented as PIs

2010-02-04 Thread Michael Glavassevich

Hi Wulf,

It sounds like you want validation to occur after you've resolved the
fragments. Have you taken a look at the JAXP Validation API [1]? It's
decoupled from the parser which means you can validate after doing whatever
processing you require before that.

Thanks.

[1]
http://xerces.apache.org/xerces2-j/javadocs/api/javax/xml/validation/package-summary.html

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrgla...@ca.ibm.com
E-mail: mrgla...@apache.org

Wulf Berschin bersc...@dosco.de wrote on 02/04/2010 05:39:17 AM:

 Hello,

 our (xml-dumb) DMS stores fragmented XML documents where the fragments
 are represented as PIs. (This is due to the fact that the DMS doesn't
 know about file names).

 We used to expand these fragments while parsing with SAX (setting up an
 own parser at the processing-instruction handler for each fragment), but
 this approach has the drawback that the validator reports ID/IDREF
 errors for links from one fragment to another which are none at document
 level.

 It seems to me that I'will have to handle the fragment resolution at XNI
 level...

 Could someone please to light me the way?

 Thank you,

 Wulf

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

Re: Expand Fragments represented as PIs

2010-02-04 Thread Wulf Berschin

Hi Michael,

xes, we want to parse with validation switched on. Not only for 
retrieving XML errors but for getting attribute default values as well. 
And our documents are based on old-fashioned DTDs... Did not unsderstand 
if the mentioned Validation API supports validation against DTDs too.


In our project we use JAXP transformer and pipe different 
transformations together. It would be nice to have a Validator as 
TransformerHandler there since sometimes instances need a cleaning 
before they can be parsed


Thank you for your help.

Wulf

Michael Glavassevich schrieb:

Hi Wulf,

It sounds like you want validation to occur after you've resolved the 
fragments. Have you taken a look at the JAXP Validation API [1]? It's 
decoupled from the parser which means you can validate after doing 
whatever processing you require before that.


Thanks.

[1] 
http://xerces.apache.org/xerces2-j/javadocs/api/javax/xml/validation/package-summary.html


Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrgla...@ca.ibm.com
E-mail: mrgla...@apache.org

Wulf Berschin bersc...@dosco.de wrote on 02/04/2010 05:39:17 AM:

  Hello,
 
  our (xml-dumb) DMS stores fragmented XML documents where the fragments
  are represented as PIs. (This is due to the fact that the DMS doesn't
  know about file names).
 
  We used to expand these fragments while parsing with SAX (setting up an
  own parser at the processing-instruction handler for each fragment), but
  this approach has the drawback that the validator reports ID/IDREF
  errors for links from one fragment to another which are none at document
  level.
 
  It seems to me that I'will have to handle the fragment resolution at XNI
  level...
 
  Could someone please to light me the way?
 
  Thank you,
 
  Wulf
 
  -
  To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org
  For additional commands, e-mail: j-users-h...@xerces.apache.org




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