> According to the XSLT recommendation, when you call the document()
> function with a single string argument, any relative URIs are 
> resolved using the base URI of the stylesheet.

I am not speaking of the XSLT language, but of the Xalan implementation.
Namely, where base munging should be done when constructing a full URI. 

If the current document is <http://www.w3.org/TR/xslt#document> and
<foo.xml> is requested, should our URIResolver be passed, by Xalan,
<http://www.w3.org/TR/xslt#document> as a base or
<http://www.w3.org/TR/xslt>?  

In the first case, the URIResolver is tasked with the responsibility of
finding the base path of the URI.

In the second, Xalan does the work.
 
> > I wonder how they get around the problem of unnecessary reloads?
> 
> Good question.  I think they get a Source from the URIResolver, then
ask
> the Source for its systemId().  See:

OK, that's not a bad method.

>
http://xml.apache.org/xalan-j/apidocs/javax/xml/transform/Source.html
> 
> How this would all work in C++ without all the run-time type
introspection
> of Java is still up in the air. One way would be for the URIResolver
to
> return an instance of a XalanDocument.  

Then we would have to use a different technique for XSL documents since
they are parsed using SAX, right? 

> Other choices would be for it to act as a sort-of URL constructor,
which
> is what I think you're thinking of.

Yep.

> That is, it can take two strings and determine what sort of URL can be
> used to construct an InputSource that the parser can understand.
That's
> good for stream sources, but not for other sorts of sources.

How so?

> In all cases, we'ed need a way to get a URI that's unique for that
> document.

Agreed.
 
> Excellent.  Let's start specifying it.


Cheers,
Brian

Reply via email to