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

Is document type useful? was: Re: What is the name of a docume


is document type definition
W. E. Perry wrote:


> ... The 'markup' answer to the original question is
> that the type of a document is the GI of its root element. The wisdom of
that
> definition, as expressed by DOCTYPE, seems to become ever clearer as this
thread
> of discussion progresses.

It is not totally clear to me that the GI and DOCTYPE definition need define
the same 'type'. That is to say, the GI of the root element, particularly
when the element is namespace qualified, points to the namespace as 'half'
of the type and the 'local name' which is qualified by the namespace, as the
other 'half'.

DOCTYPE however, allows the document instance to have a particular
association of root element name and a DTD. Presumably the DTD _could_
change from instance to instance. In practice, DTDs, when they do change,
may change over the lifespan of an instance, e.g. during edit mode, and are
more properly associated with the how the document is to be processed,
rather than some 'instrinsic' property of the instance itself. I suspect
that you would agree with this, as I am restating the 'local control'
position.

>... I would argue that, if we allow markup to control,
> there might in a native XML database be many document instances which must
be
> considered of the same type though they exhibit vastly different
structures
> below the name of their root element. And of course there many be many
schemata
> and document processing strategies anchored to that one
lexically-identified
> root element type.
>

The question is whether a non-DTD hardwired replacement for DOCTYPE would be
useful http://lists.xml.org/archives/xml-dev/200201/msg01278.html

The position that 'document type' has primacy over root element name is
articulated:
http://lists.xml.org/archives/xml-dev/200201/msg01518.html
(e.g. AF is an easy way to change the root element name).

I posed the hypothetical question in order to help sort out this issue
("Strategies for a lowly XML document"):
http://lists.xml.org/archives/xml-dev/200201/msg01355.html

Gavin feels strongly that the instance ought not dictate the processing:
http://lists.xml.org/archives/xml-dev/200201/msg01408.html

So perhaps the conclusion is that 'document type' is not a useful way to
direct processing. The question remains whether 'instance centric semantics'
has meaning beyond 'root element name' but this remains a theoretical
issue -- that is to say, the user of the document 'knows' what he or she
wants to do with it, and has final say.

When the author of a document has a specific and single intended 'semantics'
to be associated with the instance, the markup ought be highly constrained
and reflex this intent. In such cases the root element name does need to
know, or have the means to find out about, all its offspring. It is in such
cases where XML namespace qualification is particularly helpful, because the
root element namespace name/URI is a means of obtaining information about
the namespace and hence the intended semantics of the root element. The
creator of such a document has the responsability to ensure that users will
have the means to obtain its _intended_ semantics, because ultimately the
processor has the final say. RDDL via the namespace name is a means of
communicating intentions.

Jonathan




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.