Using XML Schema or DTD as a Data Source

If you use XML Schema or DTD documents as sources for XML Publisher reports, you need to

  • Choose the element from the XML Schema or DTD you want to use as the root element
  • Associate the XML Schema or DTD with an XML instance

This section describes how to perform these procedures.

Choosing a Root Element

When you add an XML Schema or a DTD to the data sources panel, Stylus Studio displays the Choose Root Element dialog box, shown in Figure 445.

Figure 445. Choose Root Element Dialog Box

The Choose root element drop-down list displays all the child elements of the XML Schema or DTD document you selected as a data souce. Select the element you want to use as the document root and click OK.

Associating an XML Instance with the Schema

Before you can preview or generate code for an XML Publisher report, you need to associate an XML document, referred to as an XML instance, with any XML Schema or DTD documents you are using as source documents.

When you click the Preview or Generate buttons on the XML Publisher toolbar, if you have not already associated an XML instance with the schema you are using as data sources, Stylus Studio displays the Schema Instances dialog box, shown in Figure 445.

Figure 446. Schema Instance Dialog Box

Each entry in the Schema field represents an XML Schema or DTD document used as a data source. To associate it with an XML instance:

1. Click the XML Instance field.

Stylus Studio displays the Open dialog box.

2. Choose the XML document you want to use as the XML instance and click the Open button.

The Open dialog box closes; the URL for the file you selected appears in the XML Instance field.

3. Click OK.

Stylus Studio previews the XML Publisher report, or begins the code generation process.

XML Project

Stylus Studio's Project Window is an intuitive, visual feature for organizing files belonging to a project. It supports different file-type icons and nested folders; many helpful options are available from the context menu.

WYSIWYG XSLT Designer

Stylus Studio's powerful and easy-to-use WYSIWYG ("What you see is what you get") XSLT Designer lets you create XSLT stylesheets without writing any code! Go from a blank slate to solid, robust XSLT in minutes, using simple drag-and-drop operations.

Learn XSLT and XQuery Profiling

Stylus Studio's Profiler can help you evaluate the performance of your XQuery and XSLT. Automatically generated, customizable, easy-to-read HTML reports provide insight into performance bottlenecks.

The XML Primer: Editing and Validating XML in Stylus Studio

The XML primer demonstrates editing and validating XML in Stylus Studio demonstrates XML editing tools and utilities to simplify working with XML documents. Learn how to automate XML editing operations and troubleshoot XML documents today!

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member