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

Re: How to get xml tag in the xsl rule

Subject: Re: How to get xml tag in the xsl rule
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 29 Feb 2000 19:12:09 GMT
get xml tags in xsl
<xsl:template match="/ | *">
<input type="text" name="NEED SOME WAY TO GET TAG HERE" value="{.}"
maxlength="50" size="50"></input>
</xsl:template>


Are you _sure_ you want that rule to match / ?
since "/ | *" matches / this template will be called and then there is
nothing to put in the name="" because the root does not have a name
and nothing else will happen as the template does not call
apply-templates and so processing will stop and no elements will be
matched.


So I would guess that you want 


<xsl:template match="*">
<input type="text" name="name(.)" value="{.}"
maxlength="50" size="50"></input>
</xsl:template>

but that again will not go down the tree it will only do top level
elements

David
PS you do not want the tag you want the element name (these are
different things)


 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.