xsl-list
[Top] [All Lists]

Re: [xsl] Making an FAQ page from XML

2007-02-12 13:40:41
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
  http://xslt.metacarpus.com

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--