FreeXmlToolkit

XSD Tools

This part of the application provides a suite of tools for working with XML Schemas (XSD). These tools help you understand, document, and use XSD files effectively.

1. XSD Viewer

The XSD Viewer is the central feature for exploring and editing your schemas. It has two main views:

Graphical View

Screenshot of XSD Controller

Text View

2. Documentation Generator

This powerful feature automatically creates user-friendly HTML documentation from your XSD file.

Screenshot of XSD Controller

Adding Technical Documentation (XsdDocInfo)

In addition to the standard <xs:documentation> tag for user-friendly descriptions, you can embed structured, Javadoc-style technical information directly into your XSDs. This is done by adding multiple <xs:appinfo> tags within an <xs:annotation>. The Documentation Generator recognizes this information and displays it in a distinct, technical section of the generated HTML, separate from the main documentation.

This allows you to keep technical notes for developers alongside the general-purpose documentation.

Supported Annotations

The following annotations are supported inside the source attribute of an <xs:appinfo> tag:

Example

Here is the correct way to structure your XSD to include this technical information. Each piece of metadata is placed in its own <xs:appinfo> tag using the source attribute.

<xs:element name="Transaction">
  <xs:annotation>
    <!-- This is the standard, user-facing documentation -->
    <xs:documentation>
      Represents a single financial transaction.
    </xs:documentation>

    <!-- This is the technical, developer-facing documentation -->
    <xs:appinfo source="@since 4.0.0"/>
    <xs:appinfo source="@see {@link /FundsXML4/ControlData/RelatedDocumentIDs/RelatedDocumentID}"/>
    <xs:appinfo source="@see Attention. See also other values."/>
    <xs:appinfo source="@deprecated do not use any more. use {@link /FundsXML4/AssetMasterData} and {@link /FundsXML4/AssetMasterData/AssetDetails} instead."/>

  </xs:annotation>
  <xs:complexType>
    <!-- ... element definition ... -->
  </xs:complexType>
</xs:element>

When the HTML documentation is generated, it will clearly display the “since,” “see,” and “deprecated” information in a formatted block. Any {@link} tags will be converted into clickable hyperlinks, providing valuable, interactive context for developers using the schema.

3. Sample XML Generator

This tool creates a sample XML file based on your XSD schema. This is very useful for testing or for providing an example of what a valid XML document should look like.

4. XSD Flattener

If you have a complex XSD that imports other XSD files, the flattener tool can combine them all into a single, self-contained XSD file.


Previous: XML Editor Home Next: XSD Validation