[xsl] parameter problem

Subject: [xsl] parameter problem
From: "praveg" <praveg.arkadi@xxxxxxxxxxxx>
Date: Fri, 3 Aug 2001 10:04:09 +0100
Hi ,
I have just started with xslt & facing following problem.

I want to replace a element(Tag)of a xml document by another & copy the
other whole document as it is.I have written a program for that as follows.
My code-->


<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
version="1.0">

<xsl:template match="/">

  <xsl:copy>
  <xsl:copy-of select="@*"/>
  <xsl:apply-templates/>
  </xsl:copy>

</xsl:template>

<xsl:template match="*">


  <xsl:copy>
  <xsl:copy-of select="@*"/>
  <xsl:apply-templates/>
  </xsl:copy>

</xsl:template>


<xsl:template match="para"><!--I am replacing "para" element by "Praveg"-->
<Praveg>

  <xsl:copy-of select="@*"/>
  <xsl:apply-templates/>
</Praveg>

</xsl:template>

</xsl:transform>

Now my problem is that I want to take the input regarding which element to
replace & by which element ,from user as parameters.I am facing problem as I
can't assign a parameter value to <xsl:template match> option .
for eg <xsl:template match="{$foo}">.

Can anybody please tell me how that can be done or any other way to solve
the problem.I am using saxon processor.

Regards

Praveg



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread