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] What is the name of a document's "type"?

[ Lists Home | Date Index | Thread Index ]

Out of curiosity, I just searched the XML Recommendation for the term
"document type" and found that it's always followed by the words
"declaration" or "definition," so a simple answer to your question,
considering that a document type definition comes within a document type
declaration, would be that if a document type wasn't declared, then you
don't have a document type. Sort of like the way n has no value in a C
"hello world" program if no variable n was declared. 

But I understand if you want a more helpful answer than that, and what Tim
Bray said at http://lists.xml.org/archives/xml-dev/200201/msg01403.html will
take you far. If you know the name of the root element, and you know the
namespace that it's from, then you know a hell of a lot about the potential
processing that you can do with that document. As you pointed out, knowing
the name of the root element ("It's a chapter") doesn't always tell you all
you need to know and knowing the namespace alone ("list the docbook
documents") doesn't either, but the root element and its namespace together
(a chapter from the docbook DTD) tells you a great deal about what you can
do with it.

Bob DuCharme        www.snee.com/bob             <bob@
snee.com>  see http://www.snee.com/bob/xsltquickly for
info on book "XSLT Quickly" from Manning Publications.


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

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