W3C home > Mailing lists > Public > www-tag@w3.org > February 2002

[namespaceDocument-8] Re: Namespace dispatching

From: Jonathan Borden <jonathan@openhealth.org>
Date: Wed, 20 Feb 2002 23:01:25 -0500
Message-ID: <01cc01c1ba8c$705fd140$0301a8c0@ne.mediaone.net>
To: "Paul Prescod" <paul@prescod.net>
Cc: "TAG" <www-tag@w3.org>
Paul Prescod wrote:
>
> So I find an XML document at my desk. Where do I find the regular
> expression to figure out its type. I'm trying to make XML documents
> *self-descriptive*.
>

I posed a similar question on XML-DEV last month in an attempt to get people
to focus on what 'document type' might mean in a practical sense:
http://lists.xml.org/archives/xml-dev/200201/msg01355.html

The most compelling answer is that when an XML document lands on your desk,
you probably have an idea of what to do with it.  In any case I might use
any and all of the aforementioned pieces of information in deciding what to
do. Clearly the root element namespace is the most important link to find
out some useful information. On following it, I hope that I would find
something to read describing the namespace.

On the other hand, suppose I find an embedded <xslt:value-of > element
within an XHTML document. On following _that_ namespace URI I might read
that such a document can be interpreted as an XSLT stylesheet. The relevent
_pattern_ would be: *//xslt:* -- roughly: any well formed document with an
embedded XSLT element may be interpreted as a stylesheet.

This comes down to pattern matching, and regular expressions are patterns.

Can this ever be done in an automated fashion? Perhaps, but that would be a
research project. _Today_ a smart person could sit down with the revelent
namespace documents and with a little luck, figure it out. That is to say:
you know the pattern when you see it.

Jonathan
Received on Wednesday, 20 February 2002 22:29:34 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:47:04 GMT