Re: [xsl] multiple transformations (pipelining) in one stylesheet

Subject: Re: [xsl] multiple transformations (pipelining) in one stylesheet
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Fri, 19 Oct 2007 17:22:45 +0200
Oliver Lietz wrote:

The second and third template alone with the first work as I expect but the result should look like this:

<p>Lorem ipsum dolor sit amet, ...</p>

Then use this adapted stylesheet:


<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
  <xsl:output method="xml" encoding="UTF-8" omit-xml-declaration="yes"/>

  <xsl:template match="@*|node()">
      <xsl:copy>
        <xsl:apply-templates select="@*|node()"/>
      </xsl:copy>
  </xsl:template>

  <xsl:template match="acronym">
    <xsl:value-of select="@text"/>
  </xsl:template>

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

  <xsl:template match="/">
    <xsl:apply-templates select="/file/content/para"/>
  </xsl:template>

</xsl:stylesheet>


--


	Martin Honnen
	http://JavaScript.FAQTs.com/

Current Thread