[
Lists Home |
Date Index |
Thread Index
]
- To: xml-dev@lists.xml.org
- Subject: What is the name of a document's "type"?
- From: Bill Lindsey <bill@b-bop.com>
- Date: Fri, 25 Jan 2002 15:00:30 -0800
- Organization: B-Bop Associates, Inc.
- User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4) Gecko/20011128 Netscape6/6.2.1
It's a question I've frequently been asked, and I haven't
been able to come up with any answer that I feel
confident of. Still, I think it's a useful question
to answer.
In my day job, writing software for a native XML database,
I get customer requests such as "list the docbook documents".
If they've configured our database to know about the public
ID for their local modifications to the DTD, and if they
include a DOCTYPE declaration when they store the document,
and if they don't do anything egregious with the internal
subset, we can do that.
If the customer request is "list the XSLT stylesheets"
then DTD's won't do. I'll need to look at the namespace
qualified root element name.
If the request is "list the RDDL documents", the root element
name by itself won't do. I can hope they've included a DOCTYPE
declaration, or see if they've got an xhtml root element,
and some elements from the RDDL namespace, and hope
that there aren't any elements from some other namespaces
that modify the conventional meaning of RDDL elements.
I could answer all of the above requests by requiring
out-of-band signalling of "type information", but that
complicates interfaces and introduces the potential for
inconsistancies between the instance and the metadata.
Note that in the above examples, all I need to know
is the answer to the question "Is this document an
instance of type 'x'?" I don't need or necessarily
want the document or type 'x' to automagically tell
me how I should process, or validate it. I can figure
that out for myself, thank-you-very-much, based on
what it is I'm trying to do with it at that particular
moment.
What I (think I) want is a reliable, minimally intrusive
mechanism to associate documents (and perhaps elements) to
with some type name(s).
I think the most successful solution would be one that
can give the most specific answer to 1) "what is this
thing's type name" and accurately answer 2) "is this
thing an instance of the type named 'x'?" while
having the least to say about what types "mean" or
imposing any particular processing model or information
set rewriting.
While architectural forms appear to do a good job of
answering the two questions, I'm having trouble
with the special lenses one needs to see the instances.
Hoping to learn,
Bill
|