|
Subject: Re: [xsl] attributes and elements From: "J.Pietschmann" <j3322ptm@xxxxxxxx> Date: Sat, 06 Dec 2003 13:12:15 +0100 |
<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">
<h1>
<xsl:apply-templates select="title"/>
</h1>
<content>
<xsl:for-each select=".//*[@type='screen']">
<bullet>
<xsl:value-of select="."/>
</bullet>
</xsl:for-each>
</content>
</xsl:template>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).
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] attributes and elements, Bruce D'Arcus | Thread | Re: [xsl] attributes and elements, Bruce D'Arcus |
| RE: [xsl] log saxon error messages , Andreas L. Delmelle | Date | [xsl] increasing variable?, chris poppe |
| Month |