Mapping Nodes in Sample Files

This topic is part of a sequence that starts with Opening the XSLT Mapper.

To define links and examine the stylesheet Stylus Studio creates:
1. In the Mapper tab, expand the tree for both books.xml and catalog.xml.
2. In books.xml, place the pointer over the book repeating element.
3. Press and hold the left mouse button, and drag from book to the Book repeating element in catalog.xml.

Stylus Studio draws a line as you drag.

4. Release the mouse button to create the link between book and Book.

Stylus Studio creates an xsl:for-each block that links the book and Book repeating elements. (If you mouse over the block, xsl:for-each appears in a pop-up to indicate the XSLT operation represented by the link.)

Also notice that the complete xsl:for-each instruction has been added to the XSLT source, which appears in the XSLT source pane under the XSLT Mapper canvas. The back-mapping pointer identifies the line of XSLT that was just added to stylesheet.

The template contains an xsl:for-each instruction that selects the book element, which is the node you selected in step 2. The output from this template is an empty Book element, which is the node that was the target of the link. Stylus Studio created the Catalog element automatically, to provide the document structure necessary to support the Book element.

In the Output method: field, display the drop-down list and select xml. (Even if the setting for Output method is unspecified, Stylus Studio still generates XML.) Other choices for the output method include text and HTML.

6. Click the Mapper tab.

The xsl:output instruction is added to the XSLT source:

8. Click the XSLT Source tab to see the new instructions in the template. (If you prefer, you can simply adjust the splitter between the XSLT source pane and the XSLT Mapper canvas.

Stylus Studio User Guides (PDF Download)

Download Stylus Studio User Guides in printer-friendly PDF format, including documentation of past (older) versions of Stylus Studio.

Building Web Services With Stylus Studio

This video demonstration shows you how to use Stylus Studio's Web Service call composer to locate a WSDL file on the Internet, inspect, create SOAP envelope, invoke and inspect Web service data.

XML Schema Validator, DTD Validator

Stylus Studio lets you validate XML documents using integrated XML Schema or DTD validators. Use the Stylus Studio built-in validator, or any number of supported XML parsers and XML validators like MSXML SAX and DOM, Xerces, .NET, and more!

Consumer Food Products

Want to know what special ingredient is in these consumer food product companies work enviornment? Well it's a touch Stylus Studio that give these consumer food product companies the extra edge they need for producing such high quality food products!

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member