You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Mikael Sitruk <mi...@bezeqint.net> on 2003/06/12 23:41:09 UTC

using document() in XSL - unable to find the resource

Hi 
I have a document file 'A.xml', and an overloaded document-v11 DTD.
In this overloaded DTD the 'source' element has more attribute, where
one of them is 'file-name'.

An additional file 'B.xml' is coming with the document file 'A', which
name is present in the 'file-name' attribute of the source element,
e.g.:
****** content of file A.xml
..
<source type="xml" file-name="my-custom-file"/>
..
****** end of file A

When in the document2xhtml.xsl, I try to use the document(@file-name),
Forrest does NOT load this document, while using the same xsl with an
XSL transformer outside of Forrest, the thing works fine.

The file 'B.xml' is in the same location than the file 'A.xml'

Does someone have an idea how to resolve this?

Thanks.
Mikael.S

RE: using document() in XSL - unable to find the resource

Posted by Mikael Sitruk <mi...@bezeqint.net>.
It doesn't work, since when the XSL is executed by Forrest, it is
located in the skin/<skin-name> directory while the original file is
located under xdocs/... directory.
I think that if there is a variable telling what is the path from which
the file to be transformed is located it will help or at least if I
could get the file name (containing the path) of the file being
transformed it will also be fine.
Does any variable like these one exist??


-----Original Message-----
From: J.Pietschmann [mailto:j3322ptm@yahoo.de] 
Sent: Thursday, June 12, 2003 23:56
To: forrest-dev@xml.apache.org
Subject: Re: using document() in XSL - unable to find the resource

Mikael Sitruk wrote:
> When in the document2xhtml.xsl, I try to use the document(@file-name),
> Forrest does NOT load this document, while using the same xsl with an
> XSL transformer outside of Forrest, the thing works fine.
> 
> The file 'B.xml' is in the same location than the file 'A.xml'

IIRC document(@filename) will resolve the URL against the style sheet
URL as base. Try document(@filename,/).

J.Pietschmann


Re: using document() in XSL - unable to find the resource

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Mikael Sitruk wrote:
> When in the document2xhtml.xsl, I try to use the document(@file-name),
> Forrest does NOT load this document, while using the same xsl with an
> XSL transformer outside of Forrest, the thing works fine.
> 
> The file 'B.xml' is in the same location than the file 'A.xml'

IIRC document(@filename) will resolve the URL against the style sheet
URL as base. Try document(@filename,/).

J.Pietschmann