On 14.02.2008 11:03:42 andreas.delmelle wrote: > >From: Christoph Souris [mailto:[EMAIL PROTECTED] > > > >Jeremias Maerki wrote: > >> On 13.02.2008 14:49:48 Christoph Souris wrote: > >>> I have a problem registering a URIResolver instance. According to > >>> the "Embedding" manual I tried to register it at the FOUserAgent > >>> but that did not work (it was not called). > > > >> I use a URIResolver with FOP all the time and I have no problems. > > > >Thats what I expected. It's always only me who has got problems ;( > > > >> In your simple case, the URI resolution may never be invoked if you > >> try with a simple example. > > > >I don't understand that. My example stylesheet contains an xsl:import > >statement. The resolver is in fact called if I register it to the > >TransformerFactory -- so I asumed that the stylesheet was alright. > > If I judge correctly, then a URIResolver that is registered with the > FopFactory or FOUserAgent will ONLY be used for FOP-internal > URI-resolving. IIC, then currently, it does not get propagated > automatically to be used by the XSLT processor that is used at runtime.
No need for a "currently". It is simply not possible. FOP only receives a SAX DefaultHandler (i.e. a SAX stream). It doesn't know (and doesn't care) that the XSL-FO is generated by XSLT. Otherwise, Andreas' comment is spot on. > Indeed, the only way to make sure that your xsl:include/xsl:import uses > the custom resolver is to register it with the XSLT processor. FOP > never sees any xsl:includes/xsl:imports. These are resolved by the XSLT > processor long *before* FOP actually kicks in. > > > > >I just do not understand why it is NOT called when I register it to the > >FOUserAgent -- which is the usual way to do it, isn't it? > > See above: it will be used, but only for URIs that are actually > processed by FOP (i.e. fonts, images...), or IOW: for URIs that appear > in the FO that results from the XSL transform. > > HTH! > > Cheers > > Andreas Jeremias Maerki --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
