NANT: Style task passing parameter to xslt -


i have problem passing arguments nant style task xslt sheet. nant code snippet. properties path , file definetly set.

<style style="${xslt.file}" extension="xml" in="${xml.file}" destdir=".">     <parameters>          <parameter name="path" value="${path}"                      namespaceuri="http://www.w3.org/1999/xsl/transform" />          <parameter name="doc" value="${file}"                      namespaceuri="http://www.w3.org/1999/xsl/transform" />     </parameters> </style> 

my parameter declared following:

<?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0"   xmlns:xsl="http://www.w3.org/1999/xsl/transform"  xmlns:ms="http://schemas.microsoft.com/developer/msbuild/2003">  <xsl:param name="path"></xsl:param> <xsl:param name="file" /> 

and accessed by:

<xsl:value-of select="$path" /> <xsl:value-of select="$file" /> 

but when file transformed, $path , $file both empty. have tried , without namespaceuri of style task.
doing wrong?

thanking in anticipation.

hmmm, why set $file , use $doc ?

btw, here working example:

<style style="web.config.xsl" in="web.config.xsl" out="web.config">  <parameters>   <parameter name="osversion" value="${osversion}"/>  </parameters> </style> 

and xsl:

<?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/xsl/transform">  <xsl:param name="osversion"/>  <xsl:template match="/">   <xsl:value-of select="$osversion"/>  </xsl:template> </xsl:stylesheet> 

Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -