Your American History Reference Guide!
- Document Structure Description

HistoryMania Information Site on Document Structure Description American History American History Search        American History Browse welcome to our free resource site for all enthusiasts!

Document Structure Description

Document Structure Description, or DSD, is an XML schema language, for describing valid XML documents. It's an alternative to DTD or XML Schema.

An example of DSD in its simplest form:

<dsd xmlns="http://www.brics.dk/DSD/2.0"
 xmlns:my="http://example.com">
  
 <if><element name="my:foo"/>
  <declare>
   <attribute name="first"/>
   <attribute name="second"/>
   <contents>
    <element name="my:bar"/>
   &lt/contents>
  </declare>
 </if>
  
 <if><element name="my:bar"/>
  <declare>
   <contents>
   &lt/contents>
  </declare>
 </if>
  
</dsd>

This says that element named "foo" in the XML namespace "http://example.com" may have two attributes, named "first" and "second". A "foo" element may not have any character data. It must contain one subelement, named "bar", also in the "http://example.com" namespace. A "bar" element is not allowed any attributes, character data or subelements.

One XML document that would be valid under the above DSD would be:

<foo xmlns="http://example.com" second="2">
 <bar/>
</foo>

External links

Last updated: 05-29-2005 09:28:03
The contents of this article are licensed from Wikipedia.org under the
GNU Free Documentation License. How to see transparent copy
Search | Browse | Contact | Legal info