xml-commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Koberg" <...@koberg.com>
Subject RE: [ANN] XML-Commons Resolver component 1.1b1 beta build released
Date Tue, 14 Oct 2003 13:43:11 GMT

I would like to use this resolver, but was wondering how to handle the
situation described below. There is also a bug or at least a serious
inconsistency in how Xalan-J and Xalan XSLTC handles URI resolution. I have
posted the info on both the Xalan and XSL lists but can't get someone from
Xalan to comment.


According to most API's you can set a URIResolver on the TransformerFactory
and one on the Transformer. Generally, the resolver set on the
TransformerFactory resolves xsl:includes and xsl:imports. If set on the
Tranformer it resolves document() function calls.


The bug:

- standard xalan requires you to set a URIResolver on the TransformerFactory
for xsl:include and xsl:import and set one on the Transformer for document()

- xsltc xalan uses the TransformerFactory for both xsl:include/xsl:import
and document() -- you cannot set a resolver on the Transformer for
document(), like the standard xalan.

- Saxon allows you to set a resolver on the TransformerFactory to resolve
both includes/imports and document(). 
It also lets you set one for the factory and one for the transformer. When
this is done the factory resolves include/import and the transformer
resolves document(). This is the best way, because, in IMHO, you get the
Transformer from the factory, so if you don't set one on the Transformer it
defaults to the one set on the factory.


The situation:

I have a webapp that needs different resolution for xsl:include depending on
the thing/view/action they are doing in the app (e.g. preview, edit,
generate for a CMS). I need the same resolution for the document function
for all views (i.e. the client's actual XML content).

Is it possible to set the different catalogs for the TransformerFactory and
the Transformer for the same transformation?

If so, does it work for both the standard xalan and xsltc?

Thanks for any info,

p.s. I am not currently on the commons-dev. Is that the best place to
continue this?

View raw message