|
Home > Online Product Documentation > Table of Contents > Accessing Other Documents During Query Execution Accessing Other Documents During Query Execution
During execution of a query, you might want to access data in another document. To do this, call the
This section discusses the following topics: Format of the document() Function
To query multiple documents with a single query, call the
The format for the
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
When the First Argument is a Node Set
It is possible for the first argument of the
Specification of Second ArgumentIf you specify a second argument, it must be a node set. The XPath processor examines the first node (in the context of document order) in the node set to determine the document that this node belongs to. The XPath processor retrieves the name of the directory that contains this document and appends the relative path from the first argument to the name of the directory. This creates an absolute path, and the XPath processor retrieves the specified document. If there is no second argument, the query must be an expression in an XSLT stylesheet. The XPath processor appends the relative path to the name of the directory that contains the XSLT stylesheet. This allows the query to examine the stylesheet itself. Example of Calling the document() FunctionSuppose you have the following XML document:
The following query returns the
Now suppose you pass this query to the
This query returns the root nodes of
|
Generate XML Schema
Generate XML Schema data models from one or more XML instance documents, or by converting other data models (DTD's, Relational Schemas, EDIFACT, EDI, etc.)
Hotels, Casinos & Resorts That Use Stylus Studio
What's more romantic than a vacation for two and the world's best XML IDE at your finger tips? Nothing, that's why these hotels, casinos, & resorts are using Stylus Studio to help you get on your dream vacation.
DTD Validator
This page talks about Stylus Studio's DTD Validator it has the ability to specify any third-party XML parsers and validators, real-time syntax checking and DTD validation error reporting, backmapping, integrating third-party DTD validators and more!
Saxon XSLT Processor
Stylus Studio® has partnered with Saxonica, a leading provider of Java-based XSLT and XQuery processing components to offer a robust XSLT 1.0 and 2.0 development environment, featuring development and deployment using the Saxon XSLT processor.