[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Kamal Bhatt wrote:
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.
Re: [xsl] Making an FAQ page from XML
Subject: Re: [xsl] Making an FAQ page from XML From: Abel Braaksma <abel.online@xxxxxxxxx> Date: Mon, 12 Feb 2007 21:38:35 +0100 |
Kamal Bhatt wrote:
Sorry, let me be clearer. local-name should be local-name()
Did I make the changes you suggested correctly? I noticed taking out the line <xsl:apply-templates select="*[local-name != 'faq']"/> had no effect.
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 http://xslt.metacarpus.com
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Making an FAQ page from X, Kamal Bhatt | Thread | Re: [xsl] Making an FAQ page from X, John Steel |
Re: [xsl] Making an FAQ page from X, Kamal Bhatt | Date | Re: [xsl] Making an FAQ page from X, John Steel |
Month |
Keywords