|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: How to replace the value for an attribute
Woo hoo, one I can answer.
You can use <xsl:element> to build the tag. <?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"><xsl:template match="Message"> <xsl:element name="input"> <xsl:attribute name="type">hidden</xsl:attribute> <xsl:attribute name="name">id</xsl:attribute> <xsl:attribute name="value"><xsl:value-of select="@id" /></xsl:attribute> </xsl:element> </xsl:template> </xsl:stylesheet> A test: [ggf@eeyore test]$ ./runXalan.sh -in elemExample.xml -xsl elemExample.xsl <?xml version="1.0" encoding="UTF-8"?> <input type="hidden" name="id" value="10"/> Gary Sri ni wrote: Team, 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
|

Cart








