|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Problem with nested Stuff
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
|
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








