Subject: [xsl] Value-Of a Parameter From: "Tanzila Mohammad" <tmohammad@xxxxxxxxxxxxxxxxxxxx> Date: Tue, 4 Sep 2001 10:26:54 +0100 |
I attempted the following in my xsl using Xalan Processor: Attempt 1: <xsl:param name="xmlFile" select="document('spanish.xml')"></xsl:param> <!--where xmlFile is passed in as - document('spanish.xml')--> <xsl:template match="/"> <html> <head> </head> <body> <font color="#CC0000"> <xsl:value-of select="$xmlFile//organisation"/> </font> <br/> <font color="#CC0000"> </font> </body> </html> </xsl:template> Returned the following error: "#String Node List Error" Attempt 2: <xsl:param name="xmlFile"></xsl:param> <!--where xmlFile is passed in as spanish.xml--> <xsl:template match="/"> <html> <head> </head> <body> <font color="#CC0000"> <xsl:value-of select="document('$xmlFile')//organisation"/> </font> <br/> <font color="#CC0000"> </font> </body> </html> </xsl:template> The value of the xmlFile is not returned i.e. the following message is displayed "can't find the file $xmlFile". Attempt 3: <xsl:template match="/"> <html> <head> </head> <body> <font color="#CC0000"> <xsl:value-of select="document('spanish.xml')//organisation"/> </font> <br/> <font color="#CC0000"> </font> </body> </html> </xsl:template> This works fine but I need the value of the xmlFile passed in as a parameter. How do I get the value of the xmlFile parameter but using either Attempt 1 or Attempt 2? Thanks Tanzila XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Generating namespace node, David Carlisle | Thread | Re: [xsl] Value-Of a Parameter, Jeni Tennison |
Re: [xsl] Generating namespace node, Francis Norton | Date | Re: [xsl] Value-Of a Parameter, Jeni Tennison |
Month |