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

Re: Proposal

From: Frank Manola <fmanola@mitre.org>
Date: Tue, 15 Jul 2003 11:27:56 -0400
Message-ID: <3F141D7C.1438FDAF@mitre.org>
To: Martin Duerst <duerst@w3.org>
CC: w3c-rdfcore-wg@w3.org, w3c-i18n-ig@w3.org

Martin--

Thanks.  As I said in my original message, this is a related issue
then.  That is, you may think that the XML namespace information
*should* be carried over into the XML literal, per your response to my
question #3, but if you look at the Test Case associated with Example 9
of the Syntax specification, example09.rdf (the RDF/XML) has the "a"
namespace declaration, but that namespace declaration does not appear in
the XML literal generated as the object of the corresponding output RDF
triple (example09.nt).

--Frank



Martin Duerst wrote:
> 
> 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.

-- 
Frank Manola                   The MITRE Corporation
202 Burlington Road, MS A345   Bedford, MA 01730-1420
mailto:fmanola@mitre.org       voice: 781-271-8147   FAX: 781-271-875
Received on Tuesday, 15 July 2003 11:28:04 EDT

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