XDTD to XSD converter

XDTD code to convert: (have a look a the XDTD example snippets)

Quick syntax reference


An element declaration: <!ELEMENT name spec>

A simple type declaration: <!TYPE # name simple-type-spec>

A complex type declaration: <!TYPE @ name complex-type-spec>

An attribute group declaration: <!GROUP ## name attr-group-spec>

Complex type spec

Model groups

A sequence of elements: elem1, elem2, elem3

A choice between elements: elem1 | elem2 | elem3

XSD-all content model: elem1 & elem2 & elem3


An empty content model: EMPTY or ()

Any element: #ANY


An extension over another complex type: @base-type;,structure-spec

A restriction over another complex type: @base-type;\structure-spec\

Simple type spec

The generic structure is #base-type;restrictions

A list of strings: #string;+

A string restricted to a pattern: #string;/[0-9]+[a-z]+/

A limited integer: #integer;[10,100]

A list of 3-byte hex octets: (#hexBinary;{3})+


A simple comment: <!-- comment -->

A documentation comment (inside a type spec): --# comment --

An application comment (inside a type spec): --@ comment--