Expanded names are not enough

John Cowan cowan at locke.ccil.org
Thu Aug 6 21:24:15 BST 1998


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 at 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)

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