[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Value-Of a Parameter

Subject: Value-Of a Parameter
From: "Tanzila Mohammad" <tmohammad@xxxxxxxxxxxxxxxxxxxx>
Date: Tue, 4 Sep 2001 10:26:54 +0100
html head 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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.