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.

Translating X12 Documents to XML

The X12 to XML Converter is a built-in function of the adapter library. The XML that is generated is well commented and indented, and can be used anywhere XML is normally used — with XML Schemas, XSLT, XQuery, etc.

DTD vs. Schema

Stylus Studio provides tools for working with both W3C XML Schema and DTD's - this tutorial explains what the differences are between the two, providing a technical comparison of DTD vs Schema.

XML-to-HTML Mapper

Stylus Studio simplifies XML-to-HTML mapping through the industry's first and only XML to HTML mapping tool based on industry standard XSLT.

Government Agencies That Use Stylus Studio

Government agencies all around the nation are pledging their allegiance to Stylus Studio. Come see which government agencies are using the only XML IDE by the people and for the people.

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member