You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Didier Villevalois <dv...@sqli.com> on 2000/10/13 19:46:29 UTC

Re[2]: [XalanJ-1.2D02] Document function... Could not load requested doc

Hello Joseph,
you wrote:
Jlc> From the XSLT spec:
Jlc>        When the first argument to the document function is not a node-set,
Jlc> the first argument is converted
Jlc>        to a string as if by a call to the string function. This string is
Jlc> treated as a URI reference;

Jlc> Relative URI references, such as your 'toto.xml', are interpreted in terms
Jlc> of the base URI at that point in the document. The question is, which
Jlc> document -- the souce document, or the stylesheet?  Checking the spec
Jlc> again:

Jlc>        The URI reference may be relative. The base URI (see [3.2 Base URI])
Jlc> of the node in the second
Jlc>        argument node-set that is first in document order is used as the
Jlc> base URI for resolving the relative
Jlc>        URI into an absolute URI. If the second argument is omitted, then it
Jlc> defaults to the node in the
Jlc>        stylesheet that contains the expression that includes the call to
Jlc> the document function.

That is exactly what i had understood so why document('toto.xml',
.) when '.' is a node from the source document doesn't open the
toto.xml in the directory of the source document??

When i say document('toto.xml', .) and . is a node of the source
document, xalan says the base uri is "d:\catalina\" ...

Didier.

-- 
Best regards,
 Didier                            mailto:dvillevalois@sqli.com



Re: Re[2]: [XalanJ-1.2D02] Document function... Could not load requested doc

Posted by Benoit Cerrina <be...@writeme.com>.
Hi,
I've also observed this behavior and reduced myself to using absolute URIs,
I believe there is a bug there.
Benoit
----- Original Message -----
From: "Didier Villevalois" <dv...@sqli.com>
To: <xa...@xml.apache.org>
Sent: Friday, October 13, 2000 7:46 PM
Subject: Re[2]: [XalanJ-1.2D02] Document function... Could not load
requested doc


> Hello Joseph,
> you wrote:
> Jlc> From the XSLT spec:
> Jlc>        When the first argument to the document function is not a
node-set,
> Jlc> the first argument is converted
> Jlc>        to a string as if by a call to the string function. This
string is
> Jlc> treated as a URI reference;
>
> Jlc> Relative URI references, such as your 'toto.xml', are interpreted in
terms
> Jlc> of the base URI at that point in the document. The question is, which
> Jlc> document -- the souce document, or the stylesheet?  Checking the spec
> Jlc> again:
>
> Jlc>        The URI reference may be relative. The base URI (see [3.2 Base
URI])
> Jlc> of the node in the second
> Jlc>        argument node-set that is first in document order is used as
the
> Jlc> base URI for resolving the relative
> Jlc>        URI into an absolute URI. If the second argument is omitted,
then it
> Jlc> defaults to the node in the
> Jlc>        stylesheet that contains the expression that includes the call
to
> Jlc> the document function.
>
> That is exactly what i had understood so why document('toto.xml',
> .) when '.' is a node from the source document doesn't open the
> toto.xml in the directory of the source document??
>
> When i say document('toto.xml', .) and . is a node of the source
> document, xalan says the base uri is "d:\catalina\" ...
>
> Didier.
>
> --
> Best regards,
>  Didier                            mailto:dvillevalois@sqli.com
>
>