Subject: Re: [xsl] newbie xsl apply-templates nesting question From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Mon, 07 Jan 2008 17:53:02 -0500 |
let's say i have some XML like this
<opening> <p>this is plain <span class="underline">and this is underlined</span> and this is plain again</p> </opening>
and my stylesheet looks like this:
<xsl:template match="opening"> <xsl:apply-templates select="p"/> </xsl:template>
<xsl:template match="p"> <xsl:apply-templates select="span[@class='underline']"/> <fo:block><xsl:value-of select="."/><fo:block> </xsl:template>
<xsl:template match="span[@class='underline']"> <fo:inline text-decoration="underline"><xsl:vaue-of select="."/></fo:inline> </xsl:template>
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.
<xsl:template match="p"> <fo:block> <xsl:apply-templates/> <fo:block> </xsl:template>
Cheers, Wendell
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] newbie xsl apply-templates ne, John Saylor | Thread | RE: [xsl] newbie xsl apply-template, John Saylor |
[xsl] newbie xsl apply-templates ne, John Saylor | Date | [xsl] [FO] Background image on whol, Kamal Bhatt |
Month |