Re: [xsl] Making an FAQ page from XML

Subject: Re: [xsl] Making an FAQ page from XML
From: Abel Braaksma <>
Date: Mon, 12 Feb 2007 21:38:35 +0100
Kamal Bhatt wrote:

Did I make the changes you suggested correctly? I noticed taking out the line <xsl:apply-templates select="*[local-name != 'faq']"/> had no effect.
Sorry, let me be clearer. local-name should be local-name()

Maybe it is noteworthy, maybe not. But the line

<xsl:apply-templates select="*[local-name != 'faq']"/>

says: all nodes that do not have a child that does not match 'faq'. I reckon, that this is always true, selecting all nodes relative to the context node. As a general hint when programming XSLT, when I suddenly find that nothing matches, or everything matches, I check for paths that are not meant to be paths but functions.

Using local-name() instead, of course calls the function fn:local-name, like Kamal points out.

-- Abel

Current Thread