Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 26th, 2007, 05:20 AM
Registered User
 
Join Date: Jul 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default test="$pages[parent_id = $current_page/id]"

Hello All,

Can anyone explain me the meaning of the following line,

<xsl:when test="$pages[parent_id = $current_page/id]">

Thank you very much

Khwab Sheth
 
Old July 26th, 2007, 05:40 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

The test will succeed whenever the $pages variable contains a parent_id element that has its value equal to the value of the id element found in $current_page. Taking a guess based on the variable and element names it is checking whether the current page has a parent page.

--

Joe (Microsoft MVP - XML)
 
Old July 26th, 2007, 05:41 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

Assuming that $pages holds a set of element nodes, and that $current_page holds a single element node, the expression tests whether one of the nodes in $pages has a child element called parent_id whose string value is equal to the string value of the id element that is a child of the node in $current_page.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference





Similar Threads
Thread Thread Starter Forum Replies Last Post
Master Pages, Content Pages and CSS carliviris Visual Studio 2005 0 January 8th, 2008 05:56 PM
'this.ID = id;' in class construction holf BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 0 October 6th, 2006 10:58 AM
Master pages &server control ID - asp.net 2.0 tech user C# 2005 1 August 3rd, 2006 04:31 AM
why not index.asp?id=1 can be www.myweb.com/?id=1 BurhanKhan Classic ASP Professional 11 September 6th, 2004 02:06 PM
Web pages constructing: I-mode(mobile) pages karib Dreamweaver (all versions) 3 June 6th, 2004 09:48 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.