Finding Multiple Nodes

To obtain several nodes in one operation, use the and or the or operator with the position() and last() functions. For example, the following query returns the first and the last author nodes in the current context:

author [(position() = 1) or (position() = last())]
               

            

You can also specify a range of nodes. For example, the next query returns the second, third, and fourth author elements:

author [(position() >= 2) and ( position() <= 4)]
               

            

To obtain a range of nodes, m to n, relative to the last node, use the following format:

(m <= position()) and (position() <= n )

For example, the following query obtains the last five nodes in the current context:

author [(last() - 4) <= position()) and (position() <= last())]
               

            

Airlines, Aerospace and Defense

Want to know what airlines, aerospace and defense companies are soaring high with Stylus Studio 2006? Well now you can! Come check out these leading companies and soar with Stylus Studio 2006 yourself.

Investments and Financial Companies That Use Stylus Studio

Stylus Studio provides XML tools & components to leading investment and financial companies! See which top investment and financial companies are banking on Stylus Studio 2006 to simplify their dollars and cents.

Xerces - Parsing and Validating XML with the Apache Xerces Parser

The Xerces Parser supports the XML 1.0 recommendation and W3C's XML Schema recommendation version 1.0, DOM and SAX. Learn how easy it is to use Apache Xerces directly in Stylus Studio to parse and validate XML with ease.

Java Code Generation

The Stylus Studio Java Codce Generator lets you generate deployable Java code for XQuery and XSLT at the push of a button!

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member