Validating XQuery Results

You can optionally validate the XML document that results from XQuery processing. You can validate using the

  • Stylus Studio built-in processor. If you use the Stylus Studio built-in processor, you can optionally specify one or more XML Schemas against which you want the result document to be validated.
  • Any of the customizable processors supported by Stylus Studio, such as the .NET XML Parser, Xerces-J, and XSV.
To validate XQuery scenario result documents:
1. Open the XQuery whose results you want to validate.
2. In the XQuery Editor, in the scenario name field, click the down arrow and click the name of the scenario for which you want to perform validation.
3. Click Browse to open the Scenario Properties dialog box.
4. Click the Validation tab.

Figure 339. Validation Tab for XQuery Scenarios

5. Click Validate query result.
6. If you are using Stylus Studio's built-in validation engine, optionally, specify the XML Schemas against which you want to validate the XML result document. Otherwise, go to step 7
a. Click the Open file button ( ).

The Open dialog box appears.

b. Select the XML Schema you want to use for validation.
c. Click the Open button to add the XML Schema to the Validation tab.
d. Optionally, add other XML Schemas.
e. Go to step 8.
7. Click the Use custom validator button, and select the validation engine you want to use from the drop-down list box.
8. Click OK.

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.

XQuery Functions - User Defined Functions in XQuery

Dr. Michael Kay's tutorial entitled: 'Defining your own Functions in XQuery' explains how to write powerful User Defined Functions in XQuery.

XQuery API for Java (XQJ)

DataDirect XQuery is an embeddable software product based on the XQuery and XQJ standards that enables Java developers to access both relational and XML data sources using a single XQuery query. Runs on Oracle, SQL Server, DB2, and more!

XSD Documentation Generator

Stylus Studio®'s XSD Editor includes an integrated XSD documentation generator, allowing you to easily publish XML content models defined in XSD in a convenient, HTML format.

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member