[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: X-Schema

  • From: Paul Prescod <paul@p...>
  • To: "XML Developers' List" <xml-dev@i...>
  • Date: Sun, 27 Jun 1999 17:27:06 -0400

isodate next
"Hunter, David" wrote:
> 
> Don't get me wrong, I happen to like Schemas much better than DTDs, and the
> data typing alone makes them a better choice for many things.  I'm just
> wondering if we wouldn't be better off adding the extra functionality to
> DTDs, instead of creating a new language.  Are there technical reasons why
> we can't?  (Does it have something to do with SGML compatibility?  If so I'd
> be willing to shut up right now.  :-)

There are two major features that DTDs lack:

 * namespace support

 * some built-in form of subtyping

There is also the politically much more important feature of using XML
instance syntax.

Data types can be built as a convention on top of DTDs. That is, in part,
the point of XML's notation feature.

From: http://www.sgmlsource.com/ISOstds.PDF

<!NOTATION ISOdate SYSTEM "url of ISO date handler">
<!NOTATION ISOtime SYSTEM "url of ISO time handler">

<!ELEMENT record (date, time %record-stuff;)>

<!ELEMENT date (#PCDATA)>
<!ATTLIST date e-dtype NOTATION (ISOdate)#FIXED "ISOdate">

<!ELEMENT time (#PCDATA)>
<!ATTLIST time e-dtype NOTATION (ISOtime)#FIXED "ISOtime">

<record>
<date>17 November 1998</date>
<time>0543Z</time>
...
</record>

<!NOTATION ISOdate SYSTEM "url of ISO date handler">
<!NOTATION ISOtime SYSTEM "url of ISO time handler">
<!ELEMENT chapter (%chapter-stuff;)>
<!ATTLIST chapter a-dtypes CDATA #FIXED "date ISOdate time ISOtime"
	date CDATA #IMPLIED
	time CDATA #IMPLIED
>
<chapter date="17 November 1998" time="0543Z">

--

Recently SGML was also extended to do data types more directly:

<!ELEMENT chapter (%chapter-stuff;)>
<!ATTLIST chapter
date DATA regexp [model="[0-9]+-[0-9]+]" max="7"]#IMPLIED
>
<chapter date="12-97">


-- 
 Paul Prescod  - ISOGEN Consulting Engineer speaking for only himself
 http://itrc.uwaterloo.ca/~papresco

Perhaps the war in Kosovo would get more press if it were directed by
George Lucas.

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)



  • References:

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.