[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] parameter problem
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|