Lists Home |
Date Index |
"Simon St.Laurent" wrote:
> I'm working on a couple of projects which rely on multiple namespaces
> mixed up in the same document as a matter of course. For example:
the uncertainty results from expecting too much from namespaces.
expressions do not become useful until they manifest a tripartite relation. look at rdf, semantic networks, or whatever abstract conceptualization you chose. to
take your example, "value" means nothing. neither does (e:result "value"). it is only when you assert (b:rule e:result "value") that you have asserted anything meaningful.
> The general notion is that when you encounter a namespace your processor
> doesn't understand, you try its following sibling instead.
to the extent that one can judge an oversimplified description such as this, such a method will produce bogus results. that is, an attempt to do this will
likely infer things which were not intended. when it does succeed, it is because, instead of admitting the relation ("value" is x) & (b:rule e:result x) to some
concept, your ontology recognized ("value" is x) & (a:container b:rule x) in some concept, or (a:container c:result x), or (y a:container x), or ...
which means that the method is effecting ontological mapping.
so one might as well admit that and do it explicitly.
(something for which sax is not particularly well suited, and the dom is not intended.)
as an aside, the question points out why, as comforting as namespace descriptions may be to the casual observer, they will do little to advance automated processing.
> If there is
> no sibling, you go back up to your parent to see if it has any following
> siblings to offer, etcetera, and if you land at the root element again,
> you're out of luck.
> This is an area that Namespaces in XML pretty plainly avoided,
which is as it should be. the problem has nothing to do with the relationships between qualified names and universal names, but with those which can be inferred
among universal names once identified.
> but it
> may be an area that we need to consider more and more as we get deeper
> into documents which mix and match namespaces on terms which aren't
> always clearly defined in advance. (I haven't seen Microsoft request
> that the W3C add the extra namespaces and elements it uses in the
> old-style Office-generated HTML to the XHTML spec, for instance, though
> perhaps they've written a module for it.)
> Any thoughts? I don't see any obvious answers here.
the obvious method woud be to drive the process with an abstract domain model. at least with a document schema.