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

Re: Problem with nested Stuff

Subject: Re: Problem with nested Stuff
From: Jon Gorman <jonathan.gorman@xxxxxxxxx>
Date: Mon, 14 Nov 2005 13:40:06 -0600
miladen
I don't see anything nested "stuff" here (besides the input xml, but
it's not a nesting problem).  Are you asking how to get a value out of
an attribute?  Rather basic and faq question.  @foo will give the
value.  So you can just do a varient of the identity transformation
for this.

So something like:

<xsl:template match="*">
<xsl:choose>
<xsl:when test="@myid">
<xsl:copy>{<xsl:value-of select="@myid" />}</xsl:copy>
</xsl:when>

<xsl:otherwise>
<xsl:copy>
<xsl:apply-templates />
</xsl:copy>
</xsl:otherwise>

</xsl:template>

If there is an attribute called @myid, this template (untested, might
have typos) should get the value of @myid instead of the value of
applying templates to the children

Jon  Gorman

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.