On Sun, Feb 03, 2002 at 04:17:05AM -0500, Kip Hampton wrote:
> the document() function -> URIs resolved in the context of the base XML
> document being transformed by the stylesheet.
> 
> Further complicating things is the fact that it is perfectly legitimate
> to have a call to document() in an imported stylesheet and it is *stll*
> expected to resolve in the context of the XML doc being processed.

Wrong:

http://www.w3.org/TR/xslt#document

    [...]
    The URI reference may be relative. The base URI (see [3.2 Base URI])
    of the node in the second argument node-set that is first in
    document order is used as the base URI for resolving the relative
    URI into an absolute URI. If the second argument is omitted, then it
    defaults to the node in the stylesheet that contains the expression
    that includes the call to the document function. Note that a
    zero-length URI reference is a reference to the document relative to
    which the URI reference is being resolved; thus document("") refers
    to the root node of the stylesheet; the tree representation of the
    stylesheet is exactly the same as if the XML document containing the
    stylesheet was the initial source document.

A mouthful, but what it comes down to: document() is relative to the
XSL. Which is exactly what this thread is about.

-- 
Bart.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to