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

l Choose the element from the XML Schema or DTD you want to use as the root element
l 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 512.

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 Associate with XML Instance dialog box, shown in Figure 512.

 
Free Stylus Studio XML Training: