Document Structure Description

Document Structure Description or DSD is a schema language that is used to describe classes of XML documents, which all have the same syntactic requirements for its structure and content. DSD was developed in cooperation with BRICS and AT & T Labs Research.

Development Goals

The development goals of DSD were:

  • To contain few and simple -to-understand language components (on Boolean logic and regular expressions based ) and
  • Also for non-XML experts easy to understand
  • To be more expressive than other document type definition languages ​​, for most practical purposes

Concepts

The central concept of DSD is that each DSD schema consists of a list of rules. A validating XML parser has to process all the rules for all elements of an XML document. The rules contained here declare and require sections. Declare sections define what content ( sub-elements and character data ) and which attributes for the element are allowed. Require - sections define extended restrictions on content and attributes. This rule conditions and extended constraints are described by Boolean logic, while the values ​​of the attributes and contents of the elements are described by regular expressions.

Example

An example of a DSD:

< dsd xmlns = " http://www.brics.dk/DSD/2.0 "   xmlns: my = " http://example.com " >                                < / declare >   < / if >                   < / declare >   < / if >   The element "foo" in XML namespace " http://example.com ", the two attributes "first " and " second" have. The content of the "foo " member may consist entirely of the "bar" - element, which must contain it. The "bar " element in turn may not attributes, text contain additional sub-elements, so it must be empty.

An XML document with respect to the above listed DSD specification would be valid, would be for example:

  < / foo > Web Links

  • Document Structure Description 2.0 specification ( English)
  • DSD 2.0 of the authors explained (English)
243510
de