xsl-list
[Top] [All Lists]

Re: [xsl] Diagram of XPath axes

2012-05-24 17:12:04
Hi,

A rare slip from Gerrit? who surely means

select="//*[. << current()]"

although I'd personally go with

select="ancestor::*|preceding::*"

to select all the elements before the current node in document order. :-)

Cheers, Wendell

On 5/24/2012 1:02 PM, Imsieke, Gerrit, le-tex wrote:
Just a side note: If you want to select the preceding elements
*including the ancestors*, use the XPath 2 << operator [1], which
selects the nodes that precede the current in document order [2].

In XSLT: select="*[. &lt;&lt; current()]"

–Gerrit

[1] http://www.w3.org/TR/xpath-functions/#func-node-before
[2] http://www.w3.org/TR/xpath-datamodel/#document-order

--
======================================================================
Wendell Piez                            
mailto:wapiez(_at_)mulberrytech(_dot_)com
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================

--~------------------------------------------------------------------
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>