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

xsl:param

Subject: xsl:param
From: the matrix <matrxuk@xxxxxxxxxxx>
Date: Tue, 17 Apr 2001 19:29:51 +0100 (BST)
xsl attribute 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


Current Thread
  • xsl:param
    • the matrix - Tue, 17 Apr 2001 14:29:37 -0400 (EDT) <=
      • <Possible follow-ups>
      • RSuiter - Tue, 17 Apr 2001 15:50:58 -0400 (EDT)

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.