How to Add a Source Document

To add a source document to XSLT mapper:
1. Click the Mapper tab if necessary.
2. Click the Add Source Document button at the top left of the Mapper tab.

The Open dialog box appears.

3. Select the document you want to use as the source document to map to the target document.
4. Click Open.

If you selected an XML document in step 3, the document appears in the source document pane of the Mapper tab. Go to step 5.

If you selected an XSD or DTD document, Stylus Studio displays the Choose Root Element dialog box.

Figure 237. Choose Root Element Dialog Box

You use the Associate With field to associate the XSD or DTD with an XML instance.

Note

 

The Associate With field appears only when you add a second document to the XSLT mapper source and that document is an XSD or DTD. You use it to specify the XML instance that you want to associate with the XSD or DTD. This field does not appear if the XSD or DTD is the first source document you add to the XSLT mapper - Stylus Studio uses the XML Source document specified in the Scenario Properties dialog box as the XML instance in this case.

a. Select the element from the XSD or DTD document that you want to use as the root element. The Choose root element drop-down list displays elements defined in the document you selected in step 3.
b. Use the Browse ( ) button to specify the XML instance to which you want to associate the document you have chosen as your structure. The root element of the XML document you select should be the same as the element you selected as the root element from the XSD or DTD document.
c. Click OK.

The document appears in the source document pane of the Mapper tab. Go to step 5.

5. To add another source document, return to step 2.
 
Free Stylus Studio XML Training:
W3C Member