[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Making an FAQ page from XML

Subject: Re: Making an FAQ page from XML
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Mon, 12 Feb 2007 21:38:35 +0100
Re:  Making an FAQ page from XML
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2011 All Rights Reserved.