Re: Expanded names are not enough

John Cowan (cowan@locke.ccil.org)
Thu, 06 Aug 1998 15:23:06 -0400


James Clark wrote:
> The point is that if a parser just gives me the expanded names
> for element type names and attribute names then I can't do the match on
> the underlying URI because I can't get the underlying URI for the prefix
> in the stylesheet. If I have in attribute in the stylesheet:
>
> match="foo:bar"
>
> the application needs to be able to map "foo" to the associated URI.
> The parser can't do it automatically, because it has no way of knowing
> that the value of the match attribute is supposed to be treated as a
> qualified name.

The parser can export an API for converting QNames to UniversalNames,
which allows you to make the match. The real problem is more serious:
as long as the same prefix can map to different namespaces in
different part of the document, stylesheets that depend on prefixed
names don't work. If a document maps the "foo" prefix to multiple
namespaces, then in CSS1, if you have a rule:

foo:p {indent 1em}

just which foo:p is that? It has to be both, eliminating the
whole utility of the local prefix.

Block-structured prefix defining (as opposed to block-structured
prefix defaulting) just isn't very useful, because too many
other tools assume that identical GIs imply identical semantics.

-- 
John Cowan	http://www.ccil.org/~cowan		cowan@ccil.org
	You tollerday donsk?  N.  You tolkatiff scowegian?  Nn.
	You spigotty anglease?  Nnn.  You phonio saxo?  Nnnn.
		Clear all so!  'Tis a Jute.... (Finnegans Wake 16.5)