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

Transforming nested tags within a sentence

Subject: Transforming nested tags within a sentence
From: "David Gadd" <David.Gadd@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 24 May 2005 15:22:18 -0700
xml nested tags
I am trying to transform nested tags within a sentence and have not found the
solution so far.

A. THE PROBLEM:
original xml:

<para>For more information, go to <see cref="blahblah">Some Destination</see>
and examine paragraph 3.</para>
desired HTML output:
<P>For more information go to <A HREF="blahblah">Some Destination</A> and
examine paragraph 3.</P>


B. THE ATTEMPTED SOLUTION:
This doesn't work--it simply places the link as an addendum BELOW the
paragraph.

<xsl:template match="para">
    <P><xsl:value-of select="." /></P>
	<xsl:apply-templates select="see" />
</xsl:template>

<xsl:template match="see">
    <A HREF="{@cref}"><xsl:value-of select="." /></A>
</xsl:template>

C. OTHER EXPLORER SOLUTIONS
My search of the list archive suggests that other solutions could like in
treating the <see> tag as a string rather than a tag, and attempting some form
of string replacement. However, I'm thinking there should be a standard
solution for transforming this tag, and I am just not understanding how this
works.

Thanks very much,

David Gadd

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.