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

RE: XT and SAXON treats //ccc and /descendant::ccc different

Subject: RE: XT and SAXON treats //ccc and /descendant::ccc differently
From: Bjorn Boxstart <bboxstart@xxxxxxxxxxxxx>
Date: Fri, 26 May 2000 11:08:04 +0200
RE: XT and SAXON treats //ccc and /descendant::ccc different
See the (part of) the X-Path specification below. It tells the differences I think...

Bjorn

// is short for /descendant-or-self::node()/. For example, //para is short for
/descendant-or-self::node()/child::para and so will select any para element in the
document (even a para element that is a document element will be selected by //para since the document
element node is a child of the root node); div//para is short for
div/descendant-or-self::node()/child::para and so will select all para descendants of
div children.
NOTE: The location path //para[1] does not mean the same as the location path
/descendant::para[1]. The latter selects the first descendant para element; the former
selects all descendant para elements that are the first para children of their parents.

-----Original Message-----
From:	Miloslav Nic [SMTP:nicmila@xxxxxxxxx]
Sent:	Friday, May 26, 2000 10:00 AM
To:	xsl-list@xxxxxxxxxxxxxxxx
Subject:	XT and SAXON treats //ccc and /descendant::ccc differently

I just run to this.

By now I thought that //foo is an abbrev form of /descendant::foo

But running both XT and Saxon I was given the following answer to these:

<xsl:value-of select="//ccc[2]"/>   c12
<xsl:value-of select="//ccc[5]"/>   gives no hit
<xsl:value-of select="/descendant::ccc[5]"/> gives c22  

for following XML file :
<aaa>
<bbb>
<ccc>c11</ccc>
<ccc>c12</ccc>
<ccc>c13</ccc>
</bbb>
<bbb>
<ccc>c21</ccc>
<ccc>c22</ccc>
<ccc>c23</ccc>
</bbb>
</aaa>


Am I missing something or  is there some shared bug ?  Thanks. 

BTW: I am considering to start at Zvon a collection of parser conformity
test files. Is somebody already working on it so I do not reinvent the
wheel?
-- 
******************************************
<firstName> Miloslav </firstName>    
<surname>   Nic      </surname>     

<mail>    nicmila@xxxxxxxxx    </mail>   
<support> http://www.zvon.org  </support>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.