- From: Graham Klyne <Graham.Klyne@MIMEsweeper.com>
- Date: Mon, 11 Mar 2002 12:24:31 +0000
- To: "Jeremy Carroll" <jjc@hplb.hpl.hp.com>
- Cc: <w3c-rdfcore-wg@w3.org>
At 11:27 AM 3/11/02 +0000, Jeremy Carroll wrote: >2: Use of Exclusive Canonicalization >==================================== > >There is only one XML spec that I am aware of which worries in this sort of >way about referring to namespaces; ignoring ones that are not used. That >spec is the exclusive canonicalization spec. The key concept is: >http://www.w3.org/TR/2002/CR-xml-exc-c14n-20020212#def-visibly-utilizes > >[[[ >An element E in a document subset visibly utilizes a namespace declaration, >i.e. a namespace prefix P and bound value V, if E or an attribute node in >the document subset with parent E has a qualified name in which P is the >namespace prefix. A similar definition applies for an element E in a >document subset that visibly utilizes the default namespace declaration, >which occurs if E has no namespace prefix >]]] > >(that is the only new concept in exc-c14n). > > >Using this concept we could imagine a statement like: > >"An xml literal includes the namespaces which are visibly utilized by that >literal, and no others." > >or (more strongly) > >"An xml literal is formed by taking the exclusive canonicalization of the >element content." My natural inclination is to think that namespaces explicitly defined in the literal should be preserved... What about a_4.xml?: [[[ <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:eg="http://example.org/" > <rdf:Description> <eg:a rdf:parseType="Literal"> <foo xmlns:eg="http://example.org/" /> </eg:a> </rdf:Description> </rdf:RDF> ]]] or this: [[[ <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:eg="http://example.org/" > <rdf:Description> <eg:a rdf:parseType="Literal"> <foo xmlns:eg="http://example.org/" xmlns:eg1="http://example1.org/" /> </eg:a> </rdf:Description> </rdf:RDF> ]]] or even this: [[[ <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:eg="http://example.org/" > <rdf:Description> <eg:a rdf:parseType="Literal"> <foo xmlns:eg="http://example.org/" xmlns:eg1="http://example1.org/" attr='eg1:qname' /> </eg:a> </rdf:Description> </rdf:RDF> ]]] Does the declaration of a namespace within the XML fragment constitute a "visible utilization" of the namespace? ... I see you've addressed this in the following sections, and conclude that the answer is "No": an explicit namespace declaration does not constitute a visible utilization. Which, as you point out, creates a problem. I'm bothered with all the solutions you propose -- XML schema uses qnames in attributes, so I think we'd ignore this at some risk. The solution of using rdf:parseType="literal ns1 ns2 ..." doesn't seem to be XSLT-safe. I find myself foundering on exactly what it means to be XSLT-safe: it seems that any XSLT solution that naively extracts literal content is likely to fall foul if this goal. #g ------------------------------------------------------------ Graham Klyne MIMEsweeper Group Strategic Research <http://www.mimesweeper.com> <Graham.Klyne@MIMEsweeper.com>
Received on Monday, 11 March 2002 07:24:15 UTC