Generating HTML documentation from an XML schema file

HTML documentation generated from an XML schema contains various information about the schema such as its name, location and namespace, as well as details about various components (such as elements or complex types) contained in the schema. It can be useful for providing a summary of the contents of your schema.

The following instructions were written for the Resource perspective, but they will also work in many other perspectives.

To generate HTML documentation based on an XML schema file:

  1. In the Project Explorer, right-click the XML schema.
  2. Click Generate > HTML. The Generate XML schema documentation dialog opens.
  3. Select the style of the HTML documentation you want:
    1. If you want one HTML file per schema, select Generate XSD Documentation without frames.
    2. Otherwise, select Generate XSD Documentation with frames. If you select this option, several HTML files are generated. They will be set up in a similar fashion to Javadoc files.
  4. Click Next to specify the target folder for your HTML files.
  5. Click Finish. The HTML files are created in the location you specified.

The generated HTML files may contain any of the following details:

Details Description
Schema The XML schema's name, location, and target namespace.
Namespace The target namespace of the XML schema component.
Diagram A visual model of the XML schema components (such as elements or complex types). You can click the header of a parent component to navigate to the documentation details for that component. For complex types, you can click the element's type name to navigate to the documentation details for that type.
Type A component's type (for example, a complex type).
Inheritance Hierarchy A component's hierarchy of inherited types. You can click an inherited type to navigate to the documentation details for that type.
Content Details The list of elements in a complex type and any documentation associated with those elements as defined in the XML schema file.
Allowable Values The list of allowable values (or enumerations) for a simple type and their associated documentation.
Source The XML source code for the XML schema component.

When Hebrew Logical (ISO-8859-8-I) encoding is selected as a preference for encoding of HTML files (Window > Preferences > Web and XML Files > HTML files in the "When creating files" section), the HTML documentation files generated from an XML schema file will still have a UTF-8 encoding. This is a known problem.

Related concepts
Generating files
Related tasks
Creating XML schemas

Feedback