Re: Issue http://www.w3.org/2000/03/rdf-tracking/#rdf-ns-prefix-confusion

Hi Dave,

Good proposal.  Like the use of test cases.

When you said:
 
>   <Description xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
>                about="http://example.org/">

did you mean:

 
>   <Description xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
                 ^^^^^
>                about="http://example.org/">

Regarding handling non-syntactic properties, I'd suggest that whatever
we
do, we do it consistently.

One thing to note is that the current grammar specifies that syntactic
attributes can always be unqualified.  If we are going to change that
we should check what, if anything will break and perhaps we should
deprecate rather than immediately outlaw.

I've written up some test cases as an XML file (text at the end of this
message in lieu of getting a directory set up to hold test cases), and
run them through the parsers I have access to.

RDFFilter basically regards unqualified attributes as being in the same 
namespace as the element containing them.

The online SiRPAC accepts qualified attributes.  It will accept
unqualified
syntactic attributes in elements in the RDF namespace.

The online SWI-Prolog RDF parser interprets unqualified attributes as
being
in the namespace of the containing element.  Unlike RDFFilter it doesn't
barf on names in the RDF namespace it doesn't recognise.

Cara too is like RDFFilter, treating all unqualified attributes as
belonging
to the namespace of the enclosing element, except it silently drops
properties
in the RDF namespace it doesn't recognise.

Brian



----------------------------------------------------------------------------

<?xml version="1.0" encoding="ISO-8859-1"?>
<rdf:RDF xmlns:rdf  = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns:rdfs = "http://www.w3.org/2000/01/rdf-schema#"
         xmlns:foo  = "http://example.org/foo">
  <!-- test cases for RDF Issue:

    http://www.w3.org/2000/03/rdf-tracking/#rdf-ns-prefix-confusion

    $Id$

  -->

  <!-- a qualified syntactic attribute on a Description element -->

  <rdf:Description rdf:ID="test1">
    <rdf:type resource="#test1"/>
  </rdf:Description>

  <!-- an unqualified syntactic attribute on a Description element -->

  <rdf:Description ID="test2">
    <rdf:type rdf:resource="#test2"/>
  </rdf:Description>
  
  <!-- a non syntactic unqualified attribute in the RDF namespace on
       a Description element -->

  <rdf:Description ID="test3" value="test3"/>

  <!-- an unqualified attribute not in the RDF namespace
       on a Description element  -->

  <rdf:Description ID="test4" foo="test4"/>

  <!-- a qualified syntactic attribute on a typed node element in the
       RDF namespace -->

  <rdf:Statement rdf:ID="test5"/>

  <!-- an unqualified syntactic attribute on a typed node element in the
       RDF namespace -->

  <rdf:Statement ID="test6"/>

  <!-- an unqualified non syntactic attribute on a typed node element
       in the RDF namespace -->

  <rdf:Statement ID="test7" value="test7"/>

  <!-- an unqualified attribute not in the RDF namespace on a typed node
       element in the RDF namespace -->

  <rdf:Statement ID="test8" foobar="test8"/>

  <!-- a qualified syntactic attribute on a typed node element not in
the
       RDF namespace -->

  <foo:bar rdf:ID="test9"/>

  <!-- an unqualified syntactic attribute on a typed node element not in
       the RDF namespace -->

  <foo:bar ID="test10"/>

  <!-- an unqualified syntactic attribute on a typed node element in
       another namespace -->

  <foo:bar rdf:ID="test11" attr="test11"/>

  <!-- a qualified syntactic attribute on a property element production
-->

  <rdf:Description rdf:ID="test12">
    <rdf:type rdf:resource="#test12"/>
  </rdf:Description>

  <!-- an unqualified syntactic attribute in a property element in the
RDF
       namespace -->

  <rdf:Description rdf:ID="test13">
    <rdf:type resource="#test13"/>
  </rdf:Description>

  <!-- an unqualified non-syntactic attribute in the RDF namespace on a
       property element in the RDF namespace -->

  <rdf:Description rdf:ID="test14">
    <rdf:subject value="test14"/>
  </rdf:Description>

  <!-- an attribute not in the RDF namespace on a property element in
the
       RDF namespace -->

  <rdf:Description rdf:ID="test15">
    <rdf:type foobar="test15"/>
  </rdf:Description>

  <!-- an unqualified attribute in the RDFS namespace on an element in
the
       RDFS namespace -->

  <rdfs:Class rdf:ID="test16" label="test16"/>

  <!-- qualified container membership property -->

  <rdf:Bag rdf:_1="test17"/>

  <!-- unqualified container membership property -->

  <rdf:Bag _1="test18"/>

</rdf:RDF>

Received on Monday, 23 April 2001 02:50:29 UTC