Visibility of explicit namespace decls

I have been actioned [1] by the RDF Core WG to raise an issue concerning the
XQuery/XPath data model.

It is a comment about the XPath 1.0 node set, and we are unclear of its
status in your current work.

The comment is that one part of the RDF recommendation could be improved to
enhance interoperability if namespace declarations like
   xmlns:eg="http://example.org/"
were present rather than absent from the data model.

===

Detail about our problem
------------------------

Our specific problem is how to represent the content of an xml element when
excised from the enclosing document.

This occurs in the RDF Model&Syntax recommendation [2] e.g.


in paragraph 202 [3]
[[[
if parseType="Literal" is specified in the start tag of E then v is the
content of E (a literal).
]]]

Later (paragraph 257 [4]) there is this example

<rdf:Description
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:dc="http://purl.org/metadata/dublin_core#"
  xmlns="http://www.w3.org/TR/REC-mathml"
  rdf:about="http://mycorp.com/papers/NobelPaper1">
  <dc:Title rdf:parseType="Literal">
    Ramifications of
       <apply>
      <power/>
      <apply>
        <plus/>
        <ci>a</ci>
        <ci>b</ci>
      </apply>
      <cn>2</cn>
    </apply>
    to World Peace
  </dc:Title>
</rdf:Description>

Contains such an element for which the element content clearly contains the
visibly used MathML namespace.

We have decided that Exclusive XML Canonicalization [5] is the best way
forward for understanding this construct in RDF. Essentially this asserts
that visibly used [6] namespaces are part of the element content, whereas
other namespaces are not.


We worry about examples with invisibly used namespaces.

e.g.
<rdf:Description
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:eg="http://example.org/#"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  >
  <eg:prop rdf:parseType="Literal">
     <bar xsi:type="xsd:decimal">3.0</bar>
  </eg:prop>
</rdf:Description>


Here the xsi is visibly used within the element and the xsd is not.
Using techniques from exclusive C14N we attach the declaration of the xsi
namespace to the bar element, but we miss the xsd namespace declaration.

The alternative of adding all in-scope namespaces such as in the main C14N
recommendation [7] was considered and rejected because of the pollution
caused as elements get copied from one document to another.

Our ideal solution is to provide the user with some clear way of indicating
on an element which namespaces are being invisibly used. The simplest would
be to take note of a redeclaration of an enclosing namespace.

We were not inclined to invent our own solution, since this seemed to be a
generic XML problem. It is present, for example, when re-enveloping soap
messages.


Jeremy Carroll
HP Rep W3C RDF Core WG


[1]
http://lists.w3.org/Archives/Public/w3c-rdfcore-wg/2002Mar/0235.html
ACTION 2002-03-15#9 (jeremy) raise a comment on xquery/xpath about
	corner case on behalf of rdfcore

[2] Resource Description Framework
(RDF) Model and Syntax Specification
http://www.w3.org/TR/1999/REC-rdf-syntax-19990222

[3] para 202 in RDF Model & Syntax
http://lists.w3.org/Archives/Public/www-archive/2001Jun/att-0021/00-part#202

[4] para 257
http://lists.w3.org/Archives/Public/www-archive/2001Jun/att-0021/00-part#257

[5] Exclusive XML Canonicalization
http://www.w3.org/TR/xml-exc-c14n

[6]
http://www.w3.org/TR/xml-exc-c14n#def-visibly-utilizes

[7] Canonical XML
http://www.w3.org/TR/xml-c14n

Received on Wednesday, 10 April 2002 14:38:17 UTC