Calling Functions in Queries

The XPath processor provides many functions that you can call in a query. This section provides some examples to give you a sense of how functions in queries work. Many subsequent sections provide information about invoking functions in queries. For a complete list of the functions you can call in a query, see XPath Functions Quick Reference.

Following is a query that returns a number that indicates how many book elements are in the document:

count(//book)
               

            

In format descriptions, a question mark that follows an argument indicates that the argument is optional. For example:

string substring(string, number, number?) 
               

            

This function returns a string. The name of the function is substring. This function takes two required arguments (a string followed by a number) and one optional argument (a number).

W3C XML Specifications

Learn about the official W3C XML specifications for XML, XSLT, XQuery, XPath, DOM, XML Namespaces, XInclude, XML Base, XPointer, WSDL and more.

Web Service Servers

Stylus Studio's Web Services tools support development and testing of Web service applications on the industry's leading Web Service Servers including Apache AXIS, Mirosoft SOAP Client Toolkit and Microsoft .NET Server.

Microsoft .NET XML Tools for System.XML 1.0 and System.XML 2.0

Stylus Studio features integrated XML validation, XSLT transformation and XSLT debugging using the official Microsoft .NET XML processing components: System.XML 1.0 and System.XML 2.0.

Using Stylus Studio with RenderX XEP

RenderX XEP is a production-quality engine that converts XSL:FO into PDF or PostScript files. You can use RenderX XEP in place of the Apache FOP engine to render PDF files from Stylus Studio.

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member