Why SAX needs namespace support

Paul Prescod paul at prescod.net
Wed Jan 27 00:54:43 GMT 1999


David LeBlanc wrote:
> 
> I can, off the top of my head, think of lots of times where mixing elements
> from other dtds would make sense. A few that sprang to mind:
>         Any kind of fiction (include a poem, recipe, formula etc).
>         News articles (ditto above).
>         Linguistics (include a fragment of text in a foreign language).
>         Dictionary.
>         Encyclopedia.
> 
> I know this isn't quite what Mr. Prescod had in mind (I think), but it
> seems like a useful thing to be able to do. 

I define all of those things as single document types for purposes of
processing. Here's why: I must make a stylesheet that handles ALL element
types from ALL of the included components. And, in general, I must make
that stylesheet by hand. Therefore, integrating a poem "fragment" into an
encyclopedia is a fairly intricate, complex job. Deciding how to combine
the two schemas is similarly tricky. In existing schema languages it has
to be done by hand also.

While I am doing this integration effort, I can go in and fix up any
clashing names. The point is:

 * name clashes are a minor problem *

compared to the schema and stylesheet merging. Many people from the SGML
world are skeptical of namespaces because we wonder about the benefits of
solving the simple problem first. I can see how namespaces solve problems
in RDF, but that just pushes the problem up a level: what problems does
RDF solve? And can those problems really be solved by blindly combining
components from various problem domains?

> Why, if you include a
> "poem.dtd" in another kind of document, couldn't you process the fragment
> of the document (the poem or poems) in the "process space" (namespace?) of
> that dtd or stylesheet or whatever?

I don't know what that means. I *do* know that a poem in a newspaper
typically looks a hell of a lot different than a poem in the Encyclopedia
Brittanica which looks a lot different than a poem in a poetry book. So
the poem's stylesheet has to be massively context-sensitive. *That* is the
hard part.

 Paul Prescod  - ISOGEN Consulting Engineer speaking for only himself
 http://itrc.uwaterloo.ca/~papresco

So what if one dark midnight less than a year from now, millions of 
computers around the world suddenly grind to a halt? My computer grinds 
to a halt several times a day. ... [Forget Y2K] We're ignoring a much 
bigger bug problem that's hiding, well, right under our noses. Call it 
the Y-Does-My-Computer-Crash-Three-Times-A-Day Problem.
	- http://www.upside.com/David_Futrelle/

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)




More information about the Xml-dev mailing list