RDF C14N InclusiveNamespaces

> RDF C14N InclusiveNamespaces
> ============================
> Discussion of this aspect of C14N exclusive.


Under exclusive canonicalization it is possible to specify an
InclusiveNamespace-PrefixList.
http://www.w3.org/TR/xml-exc-c14n#def-InclusiveNamespaces-PrefixList

This lists namespaces that are treated like under inclusive c14n.

If we choose to use exclusive c14n, we can either:
- set this parameter always to null.
or
- provide a syntax for modifying this parameter (e.g. modifying the
attribute value "Literal" of rdf:parseType).
or
- permit applications to set this parameter outside our specs


Of these, I discuss the first two here. The last one is discussed in the
"RDF C14N XML Literal Equality"
message that I will write next.

M&S allows for future groups (e.g. us) to extend the rdf:parseType syntax.
A possible extension is that we could allow the word "Literal" to be
followed by a space separated list of namespace prefixes, e.g. "Literal
xsd".

Hence the example from the earlier message:

<rdf:Description
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xml:lang="en"
  xmlns:eg="http://example.org/">
  <eg:bar rdf:parseType="Literal">
    <foo xsi:type="xsd:decimal">10.09</foo>
  </eg:bar>
</rdf:Description>

Under exclusive C14N with empty InclusiveNamespace-PrefixList the literal
value is:
'\n    <foo xmlns="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="xsd:decimal">10.09</foo>\n  '

If the author modified the document to:


<rdf:Description
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xml:lang="en"
  xmlns:eg="http://example.org/">
  <eg:bar rdf:parseType="Literal xsd">
    <foo xsi:type="xsd:decimal">10.09</foo>
  </eg:bar>
</rdf:Description>


then the literal value would be (still not getting attribute order right).

'\n    <foo xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="xsd:decimal">10.09</foo>\n  '


which does not leave the xsd namespace unbound.

Note, that under exclusive C14N there is no other way of forcing the
namespace declaration in the canonical value, other than significant
modification to the XML (e.g. adding a spurious xsd:foo attribute to visibly
use the namespace). In particular, the addition of an explicit namespace
declaration 'xmlns:xsd="http://www.w3.org/2001/XMLSchema"' on the node where
we want it to appear does not impact the XPath nodeset, and does not impact
the canonical value.


Jeremy

Received on Monday, 4 March 2002 10:00:49 UTC