Creating transformation input files from XML Schema Definitions

An XML Schema Definition (XSD) is generated when you run the Update Project command. You can use the XML Schema Definition to create XML input files for a JET transformation. Creating XML input files using the XML Schema Definition ensures that your XML input files conform to the transformation input schema.

Before you begin

You must have a JET transformation project in your workspace, and the transformation project must also contain an XML Schema Definition file that represents the transformation input schema.
Note: To use an XML Schema Definition from a transformation that is not in your workspace, you must publish the schema using the org.eclipse.wst.xml.core.catalogContributions extension point.

About this task

Note: You can download an XML editor that is XML schema-aware from the Eclipse Web site if this type of editor is not available in the product.

To create an XML input file using the XML Schema Definition:

Procedure

  1. Click File > New > Other.
  2. In the New window, expand the XML folder; then click XML.
  3. Click Next.
  4. In the Create XML File wizard, on the Create XML File page, click Create XML file from an XML schema file.
  5. Click Next.
  6. In the Create XML File wizard, on the XML File Name page, specify a name and destination for the new XML file; then click Next.
  7. On the Select XML Schema File page, click Select file from workbench. In the Workbench Files list, expand the JET transformation project; then click schema.xsd.
  8. Click Next.
  9. Click Finish. For the schema.xsd file, no changes are necessary on the Select Root Element page of the Create XML File wizard. The new XML file opens in the XML editor.
  10. In either the Design view or the Source view, perform any necessary edits to the new XML file. For example, you might modify the output location attribute value, or add attributes with test input values.
    Tip: Press Ctrl+Spacebar to activate the Content Assist feature, which displays a list of appropriate choices from the information in the schema.xsd file.
  11. Click File > Save.

What to do next

The XML file is ready to use as input when you run the JET transformation.

Feedback