xsl-list
[Top] [All Lists]

Re: [xsl] General rule for designing XPath expressions to return items in document order?

2014-01-09 04:44:52
Costello, Roger L. wrote:

Consider this XML:

<Document>
     <head>
         <head>B</head>
         A
     </head>
</Document>

Clearly "A" comes after "B" in the document. But this XPath:

        //head

results in outputting the latter value ("A") first and the earlier value ("B") 
second.

I don't think so,
  //head
selects the two head elements and if you access the string value of the first one you get the concatenation of all its contents that is

"
       B
   A
   "

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>