OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   RE: [xml-dev] Help creating DTD

[ Lists Home | Date Index | Thread Index ]

Don't know if this makes a difference, but...
It is the value of the <ITEM /> node which must be numeric > 0
The property "id" of <ITEM /> can be anything (numerical or character).

Also - should I be creating a DTD or a Schema?


-----Original Message-----
From: Karl Stubsjoen [mailto:karl@excelbus.com]
Sent: Tuesday, July 09, 2002 1:19 PM
To: Xml-Dev
Subject: [xml-dev] Help creating DTD


I need help creating a DTD.  Actually, is it a DTD that I mean to create?  I
have an existing XML document, from this I need to create a *template*
(dtd?) which I can then use to validate future XML documents.

My XML document looks like this:

  <?xml version="1.0" encoding="UTF-8" ?>
  	<ITEM id="0116602800">7</ITEM>
  	<ITEM id="1106500706">8</ITEM>
  	<ITEM id="1106502706">9</ITEM>
  	<ITEM id="1106700706">5</ITEM>
  	<ITEM id="1106702706">7</ITEM>
  	<ITEM id="0100102883">3</ITEM>
  	<ITEM id="0100100805">333</ITEM>
  	<ITEM id="0101000725">5</ITEM>

I'll try and describe the above:

<ORDER> can contain any number of child elements
<UID> must be included
<DEALER> must be included
<ORDERS> must be included

<ORDERS> can contain multiple ITEM(s) but restricted to just ITEM nodes
<ITEM> must have unique id property and the value of item must be numeric >

Thanks for the help!
*meanwhile I will give this a go myself!*


The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
initiative of OASIS <http://www.oasis-open.org>

The list archives are at http://lists.xml.org/archives/xml-dev/

To subscribe or unsubscribe from this list use the subscription
manager: <http://lists.xml.org/ob/adm.pl>


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS