Determining the Context Size

To obtain the number of nodes in the current context, call the last() function. The format is

number last() 
               

            

The last() function returns a number equal to the context size of the expression evaluation context. Essentially, the last() function returns the position number of the last node in document order for the current context. For example, the following query returns all books if there are three or more of them. There are three book elements in the current context. Consequently, this query returns three book elements.

/bookstore/book[last() >= 3]
               

            

Television

Television

Building Web Services With Stylus Studio

This video demonstration shows you how to use Stylus Studio's Web Service call composer to locate a WSDL file on the Internet, inspect, create SOAP envelope, invoke and inspect Web service data.

Convert EDIFACT to XML Schema

Convert EDIFACT to XML with Stylus Studio's XML Schema and legacy data integration tools.

XQuery Mapper

Stylus Studio has the industry's only XQuery mapper, enabling you to develop sophisticated XML mappings consisting of queries and data transformation in an intuitive, visual manner.

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member