This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: passing in a variable to the DOCUMENT()
- From: "cutlass" <cutlass at secure0 dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Fri, 11 Jan 2002 16:33:31 -0000
- Subject: Re: [xsl] passing in a variable to the DOCUMENT()
- References: <OE40h2YguUn01SToVoS0000c77b@hotmail.com>
- Reply-to: xsl-list at lists dot mulberrytech dot com
From: "Todd Binder" <todd_binder@hotmail.com>
> I am trying to passing a variable into DOCUMENT() within XSL, and having
no
> success.
>
> <xsl:variable name="xmlfile" select="gfile">
hmm , remember to put backslash here ie
<xsl:variable name="xmlfile" select="gfile"/>
.....
> <xsl:variable name="datafile" select="document($xmlfile)"/>
ok every looks fine and yes u can do this.
if your prob wasnt the prev end tag then
a) explicitly place a known file within document i.e.
<xsl:variable name="datafile" select="document('c:\test.xml')"/>
u may need to put a file:// or http:// ( for remote ) to access docs, this
behavior is determined by the XSLT processor you are using.
and to be correct, u are not 'passing' a variable *into* the document, u are
simply placing the name and path of the document into a variable, and using
that variable as a token for this ( i hope that u dont think that this is
some method of inject param into the doc.... nahhh i hope not, hehe )
good luck, jim fuller
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list