XML document templates > Generating XML document templates from DTDs and XSDs

Generating XML document templates from DTDs and XSDs
If you have the appropriate DTD/XSD, you can use the XMLOUT tool to generate a template based on the DTD/XSD.
Methods
You can use two methods to generate an XML document template based on a DTD/XSD:
Manually – typical. With this method, you can specify the number of instances and recursion level for the elements. What you specify here applies to all elements. You can also specify which element is the root element, and where to store the temporary file. See Typical configuration.
Manually – custom. With this method, you can customize the number of instances and recursion level per element. You can also specify which element is the root element, and where to store the temporary file. See Custom configuration.
Recursion level and Number of instances
The DTD/XSD contains information about the number of allowed instances of an element type within another element type. This information does not explicitly say “five type A elements, ten type B elements” etc. Instead it says “one type A element, one or more type B elements, zero or more type C elements” etc. If no more information were provided, the XMLOUT tool would not know when to stop generating the XML template. To know when to stop, the XMLOUT tool needs the following input:
Recursion level – specifies how many instances of itself an element type can contain. See Recursion level.
Number of instances – specifies how many instances of other element types an element type can contain. See Number of instances.
Example 1
This DTD example illustrates how many instances of itself the <article> element can contain when Recursion level is set to 1 and 2.Click to enlarge
 
Example 2
This DTD example illustrates how many instances of the <description> element the <article> element can contain when Number of instances is set to 1 and 3.Click to enlarge
 
OpenText StreamServe 5.6 Updated: 2013-03-01