W3C home > Mailing lists > Public > www-rdf-interest@w3.org > March 2002

RE: parseType="literal"

From: Jeremy Carroll <jjc@hplb.hpl.hp.com>
Date: Mon, 11 Mar 2002 15:13:49 -0000
To: "Thomas B. Passin" <tpassin@comcast.net>, <www-rdf-interest@w3.org>
Message-ID: <JAEBJCLMIFLKLOJGMELDIEELCDAA.jjc@hplb.hpl.hp.com>
Jeremy:
> "Whereas the third example (x_3.xml) is:
> [[[
> <a>
>          <foo
>   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
>   xmlns:EG="http://example.org/"/>
>      </a>
> ]]]
>
> NOTE Both namespaces are part of the <foo/> element as far as XSLT is
> concerned, and the namespace prefixes matter. Thus as far as xslt is
> concerned, the xml literals in a_1.xml and a_3.xml are different, even
> though both are "<foo/>" surrounded by identical whitespace.
>
>
> OPINION (uncontroversial?)
> =======
>
> I regard these extracts as illustrating "namespace pollution".
> I think that the two documents a_1.xml and a_3.xml describe the same RDF
> graph despite the difference between them (prefix "eg" replaced by prefix
> "EG")."
>
Tom:
> This is correct except that no "namespace pollution" has occurred, because
> the namepsace is NOT the prefix, which plays the role of a
> temporary alias.
> The namespace ***is*** http://example.org/, not "eg" nor "EG".  The
> namespace Rec is clear on this, and xslt acts accordingly, as does xml
> schema.

Hmmm, both xslt and xml schema use namespace prefixes within attribute
values. (e.g. within qnames and/or xpath expressions). Thus they are
dependent upon the bindings of a prefix to a namespace being part of the XML
document. Indeed these bindings are in infoset, and in the XPath nodeset.
The issue is about how these bindings get serialized on a piece of xml taken
out of its original context.


>
> Of course, anything that assumes that the prefix is fixed, unchanging, and
> forever bound to one uri may get into trouble.
>



All I was trying to get across with this idea of 'namespace pollution' is
that the xml fragment ("<foo/>") *does* contain irrelevant namespace
bindings (between prefixes and uris) by virtue of the containing document.

When you pull this fragment out, and stick it in another document, finding
the namespaces bindings explicit on the element is somewhat surprising.
Hence a cut and paste within XSLT behaves quite differently from a textual
cut and paste. The RDF concept of round-tripping an "xml literal" within M&S
should (IMO) be positioned as to where it sits between these two different
operations.

Jeremy
Received on Monday, 11 March 2002 10:13:59 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:51:53 GMT