"Hudalla Kai (CI/ACA2)" <[EMAIL PROTECTED]> wrote on 09/12/2006 07:32:37 AM:
> > -----Original Message----- > > From: Michael Glavassevich [mailto:[EMAIL PROTECTED] > > Sent: Dienstag, 12. September 2006 00:05 > > To: j-users@xerces.apache.org > > Subject: Re: Does Xinclude support XML catalog > > > > "Hudalla Kai (CI/ACA2)" <[EMAIL PROTECTED]> wrote on > > 09/11/2006 > > 05:12:46 AM: > > > > > Hi, > > > > > > I am struggling with Xerces' Xinclude support. I wonder > > whether it can > > > use a URI rewrite entry in an XML catalog to determine the > > real URI to > > > retrieve the included XML fragment from. > > > > > > For example, I would like to specify something like this in my XML > > > document: > > > > > > ... > > > <xi:include > > > > > href="http://www.bosch.com/javaStd/devProcess/processElements/ > > results/db > > > DesignModel.xml" /> > > > ... > > > > > > Using an XML catalog entry like this > > > > > > <rewriteURI > > > uriStartString="http://www.bosch.com/javaStd/devProcess/" > > > > > > > > rewritePrefix="/JavaCC_CVOB/Development_Process_Comp/developme > > ntProcess" > > > /> > > > > > > To load the dbDesignModel.xml file from the local file > > system instead of > > > the (non-existing) web resource given in the href attribute. > > > > > > Is this at all possible? > > > > Sure. Just write an EntityResolver which calls the > > xml-commons resolver's > > [1] resolveURI() method and register it with the parser. > > > > But how can I register an EntityResolver with the parser if I do not > explicitly instantiate the parser myself but instead have the XSLT > processor (Saxon in this case) use Xerces to parse the source XML file > (which contains the Xincludes)? Is there some way to set a system > property with the class name of the Entity Resolver to use? Saxon should be able to take a SAXSource [1] as input so you should be able to provide your own parser instance that you've configured. > Regards, > Kai > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] [1] http://xerces.apache.org/xerces2-j/javadocs/api/javax/xml/transform/sax/SAXSource.html Michael Glavassevich XML Parser Development IBM Toronto Lab E-mail: [EMAIL PROTECTED] E-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]