[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Value-Of a Parameter
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
|
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
|