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

RE: Trying to figure out the child::item[position()=1]

Subject: RE: Trying to figure out the child::item[position()=1] syntax
From: "Austin, Darrel" <Darrel.Austin@xxxxxxxxxxxxxxxxxx>
Date: Mon, 10 Jul 2006 16:38:53 -0500
menuitem position
> Your path expression:
> menuItems[child::menuItem[position()=1]/pageID = $pageID]
> can be simplified to
> menuItems[menuItem[1]/pageID = $pageID]
>
> to be a bit more idiomatic.

Is being more idiomatic a good or bad thing? ;o)

> When you use the path expression in an xsl:if instruction,
> the node-set is converted to a boolean: true if there is at
> least one node, otherwise false.
>
> When you use the path expression in an xsl:value-of
> instruction, the node-set is converted to a string
>
> Hope that makes it clearer.

It makes perfect sense. Thanks, Michael!

-Darrel

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-2013 All Rights Reserved.