Format of the document() Function

To query multiple documents with a single query, call the document() function in a query. During execution of a query on a particular document, this function allows you to access another XML document.

The format for the document() function is

node-set document(object, node-set?)
               

            

The XPath processor examines the first argument. If it is a single value (that is, it is not a node set) the XPath processor converts it to a string, if it is not already a string. Separate directory names and the file name with a forward slash (/). See the following format:

This string must be an absolute path. The XPath processor retrieves the specified document. The new context node is the root node of this document. Suppose you invoke the document() function and the requested document does not exist. If the invocation is in a stylesheet, the XPath processor returns an empty node set. If the invocation is anywhere else, the XPath processor returns an error message.

XML Programming

Simplify XML Programming with Stylus Studio's XML Pipeline, a powerful tool for modeling, programming, debugging and deploying complete XML programs.

XPath Introduction - Using XPath Queries to Extract Data from XML Documents

The XPath introduction covers how to use XPath code completion, XPath syntax highlighting, support for XPath 2.0 functions and XML namespaces to simplify your next XPath application.

Energy Companies That Use Stylus Studio

Forget red bull! Many energy companies are using Stylus Studio 2006 for their quick pick me up during the work day. Come see which energy companies are getting the boost they need with Stylus Studio!

Insurance Companies That Use Stylus Studio

Everyone needs insurance, even insurance companies. That's why these top insurance companies are insured when it comes to XML. Come see which insurance providers are insured by the power of Stylus Studio!

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member