Re: [xsl] handling embedded XML tags

Subject: Re: [xsl] handling embedded XML tags
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Wed, 02 Oct 2002 00:37:31 -0400

At 11:17 PM 10/1/2002, you wrote:
What I am trying to achieve is this:

<p>Some text here <span>emphasised words</span> and more text here</p>

So, my question is, how can I apply the 'emphasis' template in an 'inline'
manner to elements 'embedded' inside other elements?

By doing this:

<xsl:template match="para">

<xsl:template match="emphasis">

Forget value-of until you've mastered working all the way through the node tree applying templates (you'll get the value-of at the bottom in the text node). Read up on the built in templates and how the processor traverses the tree by default. Soon it will click.

Hope this is clear.

Very. :-)


___&&__&_&___&_&__&&&__&_&__&__&&____&&_&___&__&_&&_____&__&__&&_____&_&&_ "Thus I make my own use of the telegraph, without consulting the directors, like the sparrows, which I perceive use it extensively for a perch." -- Thoreau

XSL-List info and archive:

Current Thread