[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: passing in a variable to the DOCUMENT()
From: "Todd Binder" <todd_binder@xxxxxxxxxxx> > 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|