Overview of the XSLT Mapper

The XSLT mapper helps you compose XSLT that aggregates data from one or more source documents, regardless of their origin or XML. For example, an inventory application might use information from multiple vendors, each of whom organizes invoices in a different way. You can use the XSLT mapper to identify source documents, map the relevant nodes from each to a target document, and in doing that define any required XSLT instructions, XPath or Java functions, and logical operators graphically.

To use the XSLT mapper to create an XSLT stylesheet, you start by specifying one or more source documents and one target document.

Figure 236. Example of XSLT Mapper

The Mapper tab consists of these areas:

  • Source document pane, in which you add one or more source documents.
  • Target structure pane, in which you specify the structure of the result you want the XSLT to return.
  • Mapper canvas, on which you can define conditions, functions, and operations for source document nodes to filter return values that are then mapped to the target node.
  • Source code pane (not shown in Figure 236). The source code pane allows you to view the source code while using the mapper. This is a great way to see how changes to the mapper affect the source, without the need to switch to the XSLT Source tab. Of course, the XSLT Source tab is available if you prefer working with the source using a full-page view. All views - Mapper tab, XSLT Source tab, and the source pane - are synchronized. When displayed, the source pane spans the width of the XSLT editor.

As you link elements and define XSLT instruction and function blocks in the mapper, Stylus Studio composes XSLT for you, which is visible (and editable) any time you click the XSLT editor's XSLT Source tab. When you have finished mapping, you can apply the stylesheet to XML documents that have the same schema as the source document. The result document also has the same schema as the destination document.

As with the XSLT Source tab, you can preview XSLT results from the Mapper tab by clicking the Preview Result button ( ). Debugging, however, can be performed from the XSLT Source tab only.

This section covers the following topics:

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.

Apache XML Project

The Apache XML Project provides standards-based, open-source XML solutions for working with W3C XML technologies including XML, XSL, XSLT, XSL:FO XPath, Web services and more. Learn how Stylus Studio provides support for all Apache XML projects.

DTD Parser

Learn about the powerful DTD parser technologies that are supported in Stylus Studio's DTD tools, including DOM and SAX based DTD parsing components.

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member