W3C home > Mailing lists > Public > public-rdf-in-xhtml-tf@w3.org > March 2006

Grddl Squirrel 6 test cases

From: McBride, Brian <brian.mcbride@hp.com>
Date: Thu, 9 Mar 2006 14:06:48 -0000
Message-ID: <DE62D3D0BDEF184FBB5089C7D387C3748BDC95@sdcexc04.emea.cpqcorp.net>
To: <public-rdf-in-xhtml-tf@w3.org>

7 GRDDL test cases exploring what happens when the namespace document is
an RDF document.

Brian


Consider the XML document D at http://example.org/D

<foo xmlns="http://example.org/foo.rdf#"/>

What GRDDL transforms apply in the following cases?

Case 1: The namespace document is an RDF document served with a generic
application/xml mime type.

At http://example.org/foo.rdf# we have

<rdf:RDF
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:dataview="http://www.w3.org/2003/g/data-view#">
 <rdf:Description
    rdf:about="http://example.org/foo.rdf#">
   <dataview:namespaceTransformation
       rdf:resource="http://example.org/t1.xsl"/>
 </rdf:Description>
</rdf:RDF>

Case 2: As case 1 but the RDF document is served with mimetype
application/xml+rdf

Case 3:  The namespace document is an RDF document served with mimetype
application/xml
   with a GRDDL transform attribute on the rdf:RDF root element (which
is not legal RDF/XML)

At http://example.org/foo.rdf# 

<rdf:RDF
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:dataview="http://www.w3.org/2003/g/data-view#"
  dataview:transformation="http://example.org/t2.xsl" >  <!-- *note* -->
 <rdf:Description
    rdf:about="http://example.org/foo.rdf#">
   <dataview:namespaceTransformation
       rdf:resource="http://example.org/t1.xsl"/>
 </rdf:Description>
</rdf:RDF>

And at http://example.org/t2.xsl we have

<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/1999/xhtml">

<!-- Output method XML -->
<xsl:output method="xml" 
  indent="yes"
  omit-xml-declaration="no" 
  encoding="utf-8"  />

  <xsl:template match="/">
    <rdf:RDF  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
      <rdf:Description rdf:about="http://example.org/foo.rdf#">
   <dataview:namespaceTransformation
       rdf:resource="http://example.org/t3.xsl"/>
      </rdf:Description>
    </rdf:RDF>
  </xsl:template>
</xsl:stylesheet>

Case 4: As for case 3 but the RDF document is served with mimetype
application/xml+rdf.

Case 5: The namespace document is an RDF document served as mimetype
application/xml+rdf,
   with a GRDDL transform attribute on the root element (which is legal
RDF/XML)

At http://example.org/foo.rdf# 

<rdf:Description
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:dataview="http://www.w3.org/2003/g/data-view#"
  dataview:transformation="http://example.org/t2.xsl"
  rdf:about="http://example.org/foo.rdf#">
   <dataview:namespaceTransformation
       rdf:resource="http://example.org/t1.xsl"/>
 </rdf:Description>

And at http://example.org/t2.xsl same as case 3

Case 6: The namespace document is an RDF document served as mimetype
application/xml+rdf,
   with a GRDDL transform attribute about itself in the content.

At http://example.org/foo.rdf# 

<rdf:RDF
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:dataview="http://www.w3.org/2003/g/data-view#">
 <rdf:Description
    rdf:about="http://example.org/foo.rdf#">
   <dataview:namespaceTransformation
       rdf:resource="http://example.org/t1.xsl"/>
 </rdf:Description>
 <rdf:Description rdf:about="">
   <dataview:transformation
       rdf:resource="http://example.org/t2.xsl"/>    <!-- *note* -->
 </rdf:Description>
</rdf:RDF>

And at http://example.org/t2.xsl same as case 3

Case 7: The namespace document is served as mimetype application/xml+rdf
and contains a
  a dataview:transform property about the original document.

<rdf:RDF
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:dataview="http://www.w3.org/2003/g/data-view#">
 <rdf:Description
    rdf:about="http://example.org/foo.rdf#">
   <dataview:namespaceTransformation
       rdf:resource="http://example.org/t1.xsl"/>
 </rdf:Description>
<rdf:Description rdf:about="http://example.org/D">
   <dataview:transformation
       rdf:resource="http://example.org/t2.xsl"/>    <!-- *note* -->
</rdf:description>
</rdf:RDF>
Received on Thursday, 9 March 2006 14:07:04 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:15:01 GMT