Re: [xsl] attributes and elements

Subject: Re: [xsl] attributes and elements
From: "J.Pietschmann" <j3322ptm@xxxxxxxx>
Date: Sat, 06 Dec 2003 13:12:15 +0100
Bruce D'Arcus wrote:

<xsl:template match="node()" mode="filter-condition"/>

Ouch, had a bad day. This should be <xsl:template match="text()" mode="filter-condition"/> in order to strip unwanted text nodes while filtering out elements with the desired condition.

Alternatively, use the pull method
 <xsl:template match="section">
        <xsl:apply-templates select="title"/>
      <xsl:for-each select=".//*[@type='screen']">
          <xsl:value-of select="."/>

The latter is more compact and a bit easier to understand, while
the method using moded templates makes it easier to intercept
other elements for special processing (for example if there
is a <b> around your <q> and you want to have it to be effective).


XSL-List info and archive:

Current Thread