xsl-list
[Top] [All Lists]

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

2007-10-19 08:23:25
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/

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--