[xsl] newbie xsl apply-templates nesting question

Subject: [xsl] newbie xsl apply-templates nesting question
From: "John Saylor" <jsaylor@xxxxxxxxxxxxxxxx>
Date: Mon, 7 Jan 2008 17:39:42 -0500

i'm sure there's an easy way to do this, but i'm not getting it. it's
probably been answered many times before, if there's a URL or book for
this, please let me know.

let's say i have some XML like this

  <p>this is plain <span class="underline">and this is underlined</span>
and this is plain again</p>

and my stylesheet looks like this:

<xsl:template match="opening">
  <xsl:apply-templates select="p"/>

<xsl:template match="p">
  <xsl:apply-templates select="span[@class='underline']"/>
  <fo:block><xsl:value-of select="."/><fo:block>

<xsl:template match="span[@class='underline']">
  <fo:inline text-decoration="underline"><xsl:vaue-of

as you probably can guess, the underlined text comes up first, then the
plain text comes next. i have a feeling i'm misunderstanding something
very fundamental here.

any help is appreciated.


Current Thread