W3C home > Mailing lists > Public > w3c-rdfcore-wg@w3.org > July 2003

Re: Proposal

From: Martin Duerst <duerst@w3.org>
Date: Mon, 14 Jul 2003 17:54:47 -0400
Message-Id: <4.2.0.58.J.20030714174726.024f81e8@localhost>
To: Frank Manola <fmanola@mitre.org>
Cc: w3c-rdfcore-wg@w3.org, w3c-i18n-ig@w3.org

Hello Frank,

At 14:43 03/07/10 -0400, Frank Manola wrote:

>I have what I believe is a related question(s)...at least, it's related to 
>the question of whether/how much RDF drops from the surrounding XML 
>context "inside" the value of a parseType="Literal" attribute.  Section 
>2.8 of Syntax (which covers parseType="Literal") has the example:
>
><?xml version="1.0"?>
><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
>          xmlns:ex="http://example.org/stuff/1.0/">
>   <rdf:Description rdf:about="http://example.org/item01">
>     <ex:prop rdf:parseType="Literal"
>              xmlns:a="http://example.org/a#"><a:Box required="true">
>         <a:widget size="10" />
>         <a:grommit id="23" /></a:Box>
>     </ex:prop>
>   </rdf:Description>
></rdf:RDF>
>
>The test cases show that the namespace information 
>xmlns:a="http://example.org/a#" is effectively dropped (it appears nowhere 
>in the triples).  The questions are:
>
>1.  Is the namespace information for the a: prefix there simply so the 
>parser doesn't complain ?.

No.


>2.  Is the following supposed to be equivalent to the above?
>
><?xml version="1.0"?>
><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
>          xmlns:a="http://example.org/a#"
>          xmlns:ex="http://example.org/stuff/1.0/">
>   <rdf:Description rdf:about="http://example.org/item01">
>     <ex:prop rdf:parseType="Literal"><a:Box required="true">
>         <a:widget size="10" />
>         <a:grommit id="23" /></a:Box>
>     </ex:prop>
>   </rdf:Description>
></rdf:RDF>

Yes, it should create the same literal.


>3.  Wouldn't it be a good idea to point out somewhere that this namespace 
>information doesn't get carried over into the RDF?  (One of the reasons 
>I'm asking is that, if I'm going to wind up explaining 
>rdf:parseType="Literal", I'm going to want to point this out).

Actually, the namespace information does get carried over into
the XML literal. The literal will look like this:

"<a:Box xmlns:a="http://example.org/a#" required="true">
         <a:widget size="10" />
         <a:grommit id="23" /></a:Box>
    "

Exclusive canonicalization checks all element names and attribute names,
and makes sure that a namespace declaration is available for all the
prefixes they use. What exclusive canonicalization does not do is to
copy over superfluous namespace declarations (such as those for ex:
and rdf:); this is generally seen as a good thing. What exclusive
canonicalization also does not do is to copy over namespace declarations
for Qnames that appear as/in attribute values or element content.
Your example doesn't have any of those. This is not necessarily
seen as a good thing.

Regards,    Martin.
Received on Monday, 14 July 2003 18:19:29 EDT

This archive was generated by hypermail pre-2.1.9 : Wednesday, 3 September 2003 09:58:45 EDT