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

parameter problem

Subject: parameter problem
From: "praveg" <praveg.arkadi@xxxxxxxxxxxx>
Date: Fri, 3 Aug 2001 10:04:09 +0100
praveg
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

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.