XSD Mapping

Stylus Studio® includes a visual XSD-to-XSD mapping tool that allows you to easily implement sophisticated XML data mappings involving multiple data sources and customized data processing using either XSLT or XQuery code. The process is simple — just load one or more target data sources (note that you can use any data source, for example, XSD(s), relational database(s), EDI files, flat files, etc.), visually create the mapping from your data source(s) to a desired output format, generate the Java code to implement the the transformation, then finally, deploy your data mapping application using DataDirect XML Converters™. In this tutorial we'll show you how it's done — illustrated below is an example of an XSD Mapping project in Stylus Studio (click to enlarge).

XSD Mapping - Click to enlarge.

Implement XSD Mappings in either XSLT or XQuery

When it comes to Schema mapping, developers can choose two different approaches: XSLT or XQuery, and Stylus Studio supports them both. The W3C's Dr. Michael Kay has written a bit about when to use XSLT vs. XQuery, and both are excellent choices. Stylus Studio® provides visual tools to create XML mappings, which in turn generates either XSLT or XQuery code to implement the specified XML data mapping. The visual mapper is synchronized with an XML text editor, which shows you exactly what XSLT or XQuery code is being generated as you create your custom XML data mappings. At any time, you can edit the underlying XSLT or XQuery code, which will result in a synchronized change in the visual model.

Support for Advanced XSD Mappings Involving Multiple XSDs

For mappings involving multiple data sources, just load them all up in Stylus Studio® and visually create XML data mappings. Stylus Studio® will automatically generate the XSLT or XQuery code required to implement the specified XML data mapping involving multiple data sources.

Edit Target XSD On The Fly

Stylus Studio® provides numerous ways to specify a target schema for an XML data mapping project, for example, you could:

  • Build a custom XSD using Stylus Studio®'s built-in XSD Editor
  • Use one of the hundreds of industry standard XSDs and DTD included with Stylus Studio®
  • Build a target data schema on the fly!

If you drag and drop a data node from a data source to the target schema pane, and if no target schema is set, Stylus Studio® will simply prompt you for an element or attribute name. The target schema is displayed in a tree-view control that supports drag and drop operations, allowing you to change the target output format on the fly.

Support for Custom XML Data Mappings

Data integration projects are rarely as simple a matter as mapping between two similar XSDs. It is more likely that you will need to perform data manipulation operations on the source data in order to get it into a desired output format. Possible data manipulations could include:

  • Converting units: e.g. Imperial to Metric, etc.
  • Data Calculations: e.g. Calculating weekly sales, summing total inventory, etc.
  • Logical Comparisons: e.g. "For purchase orders from the USA", etc.
  • String Operations: e.g. string concatenation, lower-casing, parsing, etc.
  • Flow Control: Looping, testing for a condition, etc.

Stylus Studio®'s visual XSD mapper fully supports a wide degree of customization, including support for creating standard XSLT instructions, XSLT functions, external Java functions, and other logical comparisons and string operations, all through a visual interface. Any custom XML data manipulation is visually expressed in the form of a function block, which takes in one or more inputs and outputs a value. A custom data mapping is then accomplished by simply "wiring" together data inputs to the input ports of a function block, and mapping the output of the function block to the target schema. Of course you can also create more sophisticated data processing functions by chaining together function blocks in series or in parallel.

Support for Various Input and Output Data Formats

Stylus Studio®'s XSD Mapper is not limited to mapping between XSDs! Many other common data formats including Document Type Definitions (DTD's), XML instance documents, Relational Databases, flat files, EDI, and even live Web service data can be seamlessly used as either source or destination for data integration projects. The fact that you are using say, an XSD or a relational database requires no additional work — Stylus Studio® takes care of generating the appropriate XSLT or XQuery code and if necessary, connecting to the database or Web service using various built-in data adaptors.

Deploying the XSD Mapping Application

So what happens after you've gotten your XQuery or XSLT data integration code to work in Stylus Studio? Most other XML XML tools leave you stranded here, but not Stylus Studio — use the Java code generator along with DataDirect XML Converters™ to automatically generate the Java code required to invoke and run your application.

Stylus Studio® provides advanced support for any XSD mapping project!

PURCHASE STYLUS STUDIO ONLINE TODAY!!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Try Stylus XSD Mapping Tools

Download a free trial of our award-winning XSD Mapping Tools today!

Learn Stylus Studio in 6 Minutes

Can six minutes change your life? A new action-packed online video demonstration covers how to use Stylus Studio in just six minutes! Watch this video and change the way you develop XML applications forever!

Ask Someone You Know

Does your company use Stylus Studio? Do your competitors? Engineers from over 100,000 leading companies use Stylus Studio, and now you can ask someone from your own organization about their experiences using Stylus Studio.

 
Free Stylus Studio XML Training:
W3C Member