[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: JSR 206 (JAXP 1.3) Public Draft
Henry Zongaro wrote:
Hello, I have used URIResolvers quite a bit in my projects. I have also tried to make my code use all the popular jaxp XSL processors. It has been a sad experience because the way they are implemented differ from each other (even xalan and XSLTC differ, as I have explained on the lists here in the past). This new spec does little to clarify things. Under Transformer.getURIResolver() it says: "Get an object that will be used to resolve URIs used in document(), etc." What does 'etc' mean? Under Transformer.setURIResolver it says: "If the resolver argument is null, the URIResolver value will be cleared, and the default behavior will be used." Does this mean that if a URIResolver was set on the TransformerFactory, it would fallback to it? Does this mean you need to call the set method with a null to get the default (factory's resolver)? In the TransformerFactory.getURIResolver it says: "Get the object that is used by default during the transformation to resolve URIs used in document(), xsl:import, or xsl:include." So if you get your Transformer from a TransformerFactory which one resolves xsl:include/import (confused over the use of 'etc' above))? In the TransformerFactory.setURIResolver it says: "Set an object that is used by default during the transformation to resolve URIs used in xsl:import, or xsl:include." This makes no mention of document() as mentioned in TransformerFactory.getURIResolver. I think the spec should clearly define the behavior of setURIResolver for both interfaces. IMHO it should work like this: - if a resolver is set on the factory it is used for xsl:import/include - if a resolver is *not* set on the factory the base URI of the XSL is used to resolve the import/include'd XSL relative to the base URI - if a resolver is set on the transformer it is used for document() - if a resolver is *not* set on the transformer the base URI of the XSL is used to resolve a relative XML what do you think? best, -Rob ------------------------------------------------------------------ Henry Zongaro Xalan development IBM SWS Toronto Lab T/L 969-6044; Phone +1 905 413-6044 mailto:zongaro@xxxxxxxxxx XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|