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

Re: Which elements can be root elements?

  • From: Norman Walsh <ndw@n...>
  • To: Andrew n marshall <amarshal@z...>
  • Date: 23 Jun 2000 16:32:50 -0400

must match doctype
/ Andrew n marshall <amarshal@z...> was heard to say:
| <thinking-outloud>
| I suppose you could say that is it left to be specifified above the level
| of DTD, but that would mean that validation to the DTD is an incomplete
| validation of the document.  Well, I guess that is true anyway since

I'd interpret that differently. It's a complete validation of the
document you provided (since the document element is named in the
<!DOCTYPE declaration and must match the actual document element
used). You're correct that it doesn't enforce that a particular
element or elements always occur in every document, but, as Foghorn
Leghorn might say, "that, that, that's a *feature*, son, not a bug" :-)

| neither #CDATA nor #PCDATA format cannot be checked.  Nevertheless, it
| still seems weird to me.

For simple data types XML Schema will let you check PCDATA content,
but it preserves the notion that documents can start wherever they
please.

|   Does XML provide a embed another entire document into another document?  
| For example, if I wrote a DocBook article as a complete document including
| the doctype declaration, my understanding is that it could not be included
| into a higher level book document as a external entity.  Is there a good
| way of allowing both a book document and an article docuement without
| breaking it into three files (article element, article docuemnt, and book
| document)?

No. And it's worse than that. You can't even have an article element
and an article document because the document element must appear
literally in the document entity, it cannot be in an external
entity. You *can't* say:

 <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook V4.0//EN"
                   SYSTEM "urn:oasis:..." [
 <!ENTITY article-body SYSTEM "article-body.xml">
 ]>
 &article-body;

much as you'd like to. Though you can manufacture dummy wrappers to
make this work (sortof).

 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V4.0//EN"
                   SYSTEM "urn:oasis:..." [
 <!ENTITY article-body SYSTEM "article-body.xml">
 ]>
 <book>
 &article-body;
 </book>

The xinclude proposal will provide an alternate way of embedding
documents that operates on the infoset and can, therefore, embed real
documents in real documents.

                                        Be seeing you,
                                          norm

-- 
Norman.Walsh@E... | "Bother", said Pooh, as he deleted his
XML Technology Center     | root directory.
Sun Microsystems, Inc.    | 

***************************************************************************
This is xml-dev, the mailing list for XML developers.
To unsubscribe, mailto:majordomo@x...&BODY=unsubscribe%20xml-dev
List archives are available at http://xml.org/archives/xml-dev/
***************************************************************************

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.