This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Exclude elements from apply-templates?


> <xsl:apply-templates select="not(title | subtitle)"/>

<xsl:apply-templates select="*[not(self::title) or not(name()=subtitle)]"/>

both versions above are possible.

Joerg

Gustaf Liljegren wrote:
I have an element like:

<!ELEMENT chapter (title, subtitle?, (%blocks; | %lists;)*, section+)>

The title and subtitle are handled by the chapter template, so I when I say
apply-templates later, I don't want these to appear again the output. This
seemed logical to me:

<xsl:apply-templates select="not(title | subtitle)"/>

But Saxon says: "Sequence selected by xsl:apply-templates contains an item
that is not a node."

Gustaf

XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]