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]

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


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