[Home] [By Thread] [By Date] [Recent Entries]

  • From: "Michael Kay" <mike@s...>
  • To: "'David Carlisle'" <davidc@n...>,<gottif@i...>
  • Date: Fri, 12 Jan 2007 17:43:07 -0000

Another suggestion: perform-sort is efficient because it creates a new
sorted sequence without actually copying the nodes. But if you created a
temporary tree in this situation, that is, if you copied the nodes to create
new nodes, then the document order of the new nodes would reflect your
sorted sequence and "/" would not disturb it. 

Michael Kay
http://www.saxonica.com/



> -----Original Message-----
> From: David Carlisle [mailto:davidc@n...] 
> Sent: 12 January 2007 17:25
> To: gottif@i...
> Cc: xml-dev@l...
> Subject: Re:  XPath on sequences of nodes
> 
> 
> 
> > For the life of me, I don't know what's happening. How can 
> a variable 
> > store 2 different results? I'd really appreciate it if 
> someone could 
> > give me a hint.
> 
> most operations on nodes, including / are defined to return 
> their reults in document order, with duplicates removed, so 
> $x/. is one way to reorder and de-duplicate a sequence for example.
> 
> You have $selectedSents/c so you reorder.
> 
> for $x in  $selectedSents return $x/c
> 
> would not reorder.
> 
> David
> 
> ______________________________________________________________
> _________
> 
> XML-DEV is a publicly archived, unmoderated list hosted by 
> OASIS to support XML implementation and development. To 
> minimize spam in the archives, you must subscribe before posting.
> 
> [Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
> Or unsubscribe: xml-dev-unsubscribe@l...
> subscribe: xml-dev-subscribe@l... List archive: 
> http://lists.xml.org/archives/xml-dev/
> List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
> 



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member