This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: passing in a variable to the DOCUMENT()



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]