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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: Which elements can be root elements?

[ Lists Home | Date Index | Thread Index ]
  • From: Norman Walsh <ndw@nwalsh.com>
  • To: Andrew n marshall <amarshal@zig.usc.edu>
  • Date: 23 Jun 2000 16:32:50 -0400

/ Andrew n marshall <amarshal@zig.usc.edu> 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@East.Sun.COM | "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@xml.org&BODY=unsubscribe%20xml-dev
List archives are available at http://xml.org/archives/xml-dev/
***************************************************************************




 

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

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