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]
               

            

XML Parser

An XML Parser is a parser that is designed to read XML and create a way for programs to use XML. Learn about Stylus Studio's comprehensive support for all of the world's leading XML Parsers.

EXSLT Tools

EXSLT support in Stylus Studio lets you extend XSLT 1.0 stylesheets and simplify many tasks including computing dates and times, performing mathematical computations, string manipulations and more.

Writing Custom XML Adapters

There are cases where the input format is too complicated for Convert to XML, or both reading and writing of the file format is needed. This section will take you through the process of writing a medium-sized adapter in Java.

XML Schema-Aware Queries and Stylesheets

Learn how to simplify XSLT and XQuery applications using Schema Aware XSLT and XQuery processing technologies.

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member