[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] Problem passing Parameters


Subject: [xsl] Problem passing Parameters
From: "Ian E. Powell" <Ian.Powell@xxxxxxxxxxxxx>
Date: Mon, 29 Aug 2005 18:15:12 -0500

I am passing in arguments to a XSLT file through an
ArgumentList(ASP.NET). The values that I am passing into the XSLT
transform call are not overiding the default values.

Do I have to do something special for Strings?
Do I need to provide a namespace?


XML - File(ignore newline & hard return)
"<?xml version=\"1.0\" encoding=\"utf-16\"
standalone=\"yes\"?>\r\n<Facility>\r\n  <Activity>\r\n
<MDBService>Price Analysis</MDBService>\r\n    <Description>Dictation,
Dictaphone Corporation</Description>\r\n
<SendDate>1/24/2005</SendDate>\r\n  </Activity>\r\n  <Activity>\r\n
<MDBService>Capital Maintenance Analysis</MDBService>\r\n
<Description>Dictation, Dictaphone Corporation</Description>\r\n
<SendDate>1/27/2005</SendDate>\r\n  </Activity>\r\n</Facility>"


XSLT - File

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!--Passing Parameters through XsltArgumentList-->
<xsl:param name="reportDate" select="'ReportDate'"/>
<xsl:param name="dateRange" select="'DateRange'"/>
<xsl:param name="facName" select="'Facility Name'"/>
<xsl:output version="1.0" encoding="UTF-8" indent="no"
omit-xml-declaration="no" media-type="text/html" />

Bit that deals with Parameters

<tr>
  <td>
  	<xsl:value-of select="$facName"/>
 </td>
  <td>
  	<xsl:value-of select="$reportDate"/>
  </td>
</tr>
<tr>
  <td>
	<xsl:value-of select="$dateRange"/>
  </td>
</tr>

_________________________________________________________________

This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information. If you
have received it in error, please notify the sender immediately
and delete the original. Any other use of the email by you is 
prohibited.
_________________________________________________________________


Current Thread
Keywords