More Complex Example of Aggregating Modifiers in DTDs

Following is a more complicated example. Suppose you want book elements to include

  • Exactly one title
  • Either an author or an editor, but it is okay if neither appear
  • Zero or more paragraphs

To accomplish this, you would perform steps that generate the following tree representation:

book
               

              
Sequence
                   
title
                   
Optional
                   
	Choice
                   
		author
                   
		editor
                   
Zero or More
                   
	paragraph
                   

                

In the Text view of the DTD, the definition for the book element is as follows:

<!ELEMENT book (title, (author|editor)?, paragraph*)>
               

            

Map between EDIFACT and X12

Anything can be mapped to anything: EDIFACT to X12 or vice-versa, either to XML, and any of those to flat files or other formats. Both the XSLT and XQuery mappers can help bridge complex formats with ease.

EDIFACT Sample Converted to XML

A sample EDIFACT document before and after conversion to XML, showing markup and full automatically-generated internal documentation.

XQuery Mapper

Stylus Studio has the industry's only XQuery mapper, enabling you to develop sophisticated XML mappings consisting of queries and data transformation in an intuitive, visual manner.

Using DTD in Microsoft Applications

Learn how to integrate DTD's into your Microsoft applications using MSXML or System.XML DTD processing components.

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member