|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] xsl:param
Although the "$member-position" is in "Name template match" section, it doesn't show up when the Name tamplate is applied in the "Repeat template match" section. I am not very good at explaining the problem but if you can see what I am trying to say, please guide me. Here is the XML: <Group> <Member> <Name>Jack</Name> </Member> <Member> <Repeat> <Name>Jill</Name> </Repeat> </Member> </Group> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template match="/"> <xsl:apply-templates select="Group/Member"/> </xsl:template> <xsl:template match="Member"> <xsl:apply-templates select="*"> <xsl:with-param name="member-position" select="position()" /> </xsl:apply-templates> <xsl:element name="input"> <xsl:attribute name="type">hidden</xsl:attribute> <xsl:attribute name="name">Member<xsl:value-of select="position()"/></xsl:attribute> <xsl:attribute name="value"/> </xsl:element> <br/> </xsl:template> <xsl:template match="Repeat"> <xsl:element name="input"> <xsl:attribute name="type">Submit</xsl:attribute> <xsl:attribute name="name">+</xsl:attribute> <xsl:attribute name="value">+</xsl:attribute> </xsl:element> <xsl:apply-templates select="Name"/> </xsl:template> <xsl:template match="Name"> <xsl:param name="member-position" /> Name: <xsl:element name="input"> <xsl:attribute name="type">text</xsl:attribute> <xsl:attribute name="name">Name<xsl:value-of select="$member-position"/> <xsl:value-of select="position()"/></xsl:attribute> <xsl:attribute name="value"> <xsl:value-of select="."/> </xsl:attribute> </xsl:element> <br/> </xsl:template> </xsl:stylesheet> ____________________________________________________________ Do You Yahoo!? Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk or your free @yahoo.ie address at http://mail.yahoo.ie 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








