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

Re: DOCTYPE (was Re: Announcement: SAX 1998-01-12 Draft)

  • From: agreene@b... (Andrew Greene)
  • To: peter@u...
  • Date: Tue, 13 Jan 1998 11:28:22 -0500

reading doctype sax java
   Date: Tue, 13 Jan 1998 16:39:28
   From: Peter Murray-Rust <peter@u...>


   My current reading is:

   <!DOCTYPE FOO PUBLIC "-//FOO-BAR//DTD V1.23//" "foo.dtd">

   The FOO simply means that the root of the document is a single FOO element.
   The only reason things it can be used for are:
        - telling you what is in the document (i.e. you might want to keep on
          reading if the document root was POEM).
        - telling that parser that if the document does NOT have a
          root element of type FOO it can throw a Draconian error and 
          not do any more work.

   IMO I can live without this :-)

You left out another use of the FOO in that declaration, which is
that it identfies which element type in the DTD is "topmost". 

I have a collection of pages which are a catalog of sheet music.
The various pages have different high-level structure but the
low-level "paragraphs" are the same. I can have a single DTD that
describes each of the following:

  * ComposerPage    (contains a biography and a list of compositions)
  * PublisherPage   (contains contact information, shipping costs,
                     and a list (sorted by title) of compositions)
  * NationalityPage (contains a description of national musical history
                     and a list (sorted by composer) of compositions)
And so each of these XML files can start off with the appropriate
document type identifier:

 <!DOCTYPE ComposerPage SYSTEM "musicDB.dtd">
 <!DOCTYPE PublisherPage SYSTEM "musicDB.dtd">
 <!DOCTYPE NationalityPage SYSTEM "musicDB.dtd">

I *can* live without this, but I'd rather not have to! :-)

- Andrew Greene

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/
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...)


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.
First Name
Last Name
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.