OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: [xml-dev] Is Anyone Interested In XPath 2.0 Use Cases or Requiremen

[ Lists Home | Date Index | Thread Index ]
  • To: "David Carlisle" <davidc@nag.co.uk>
  • Subject: RE: [xml-dev] Is Anyone Interested In XPath 2.0 Use Cases or Requirements?
  • From: "Dare Obasanjo" <dareo@microsoft.com>
  • Date: Sun, 7 Jul 2002 12:19:00 -0700
  • Cc: <xml-dev@lists.xml.org>
  • Thread-index: AcIl4wiiTkZ+ew5SSb2g9dK4J29fDQABxg9i
  • Thread-topic: [xml-dev] Is Anyone Interested In XPath 2.0 Use Cases or Requirements?

a.) As Uche pointed out, the question also involves whether node identity or the text values of nodes are used. Your technique works for identity based equivalence tests but not value based tests. For instance, neither Xalan, MSXML nor System.Xml.Xsl.XslTransform can tell that /Root/Numbers[1] and Root/Numbers[2] are equivalent node sets [value-wise] using your technique and the following source XML 
 
<Root>
 <Numbers>
  <Integer>4</Integer>
  <Integer>2</Integer>
  <Integer>3</Integer>
 </Numbers>
 <Numbers>
  <Integer>2</Integer>
  <Integer>3</Integer>
  <Integer>4</Integer>
 </Numbers>
</Root>
 
b.) Calling count() four times instead of having an explicit operator is bad form both performance wise and readability wise. 
 

	-----Original Message----- 
	From: David Carlisle [mailto:davidc@nag.co.uk] 
	Sent: Sun 7/7/2002 11:20 AM 
	To: Dare Obasanjo 
	Cc: xml-dev@lists.xml.org 
	Subject: Re: [xml-dev] Is Anyone Interested In XPath 2.0 Use Cases or Requirements?
	
	

	>
	> For instance I can't say a node-set containing (A, B, C) is equivalent
	> to a nodeset containing (B, C, A)
	>
	
	if $a and $b are each bound to a node set then
	if count($a)=count($a|$b) and count($a)=count($b)  then they are equal
	as sets.
	
	David
	
	_____________________________________________________________________
	This message has been checked for all known viruses by Star Internet
	delivered through the MessageLabs Virus Scanning Service. For further
	information visit http://www.star.net.uk/stats.asp or alternatively call
	Star Internet for details on the Virus Scanning Service.
	





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS