On Fri, 9 Feb 2007, Harry Halpin wrote:

I made the following test-cases.

http://www.w3.org/2001/sw/grddl-wg/td/testlist3.html#grddlonrdf1
http://www.w3.org/2001/sw/grddl-wg/td/testlist3.html#grddlonrdf2
http://www.w3.org/2001/sw/grddl-wg/td/testlist3.html#grddlonrdf3

They cover the GRDDL 3 options of a GRDDL transform being on a RDF doc:
1) You just have as a result the GRDDL result
2) You have as the result the GRDDL source document
3) You have the merge of 1) and 2)

Hmm...it seems to break Chime's implementation. Anyone want to try it on
others? Some "RuntimeError: maximum recursion depth exceeded". Hmm....

The patch is attached (could you apply this Dan? - I can't push to homer). Below is a successful run (GRDDL.py chooses to output the merge of both the original RDF/XML and the result of applying the transform):

[EMAIL PROTECTED]:~/.workspace/GRDDL/grddl-client$ python GRDDL.py --debug 
--zone=http http://www.w3.org/2001/sw/grddl-wg/td/grddlonrdf.rdf | python 
/home/chimezie/.workspace/Fuxi-cvs/RDFPipe.py --stdin 
--ns=pim=http://www.w3.org/2000/10/swap/pim/contact#
Attempting a comprehensive glean of http://www.w3.org/2001/sw/grddl-wg/td/grddlonrdf.rdf
graph size before: 0
@@fetching: http://www.w3.org/2001/sw/grddl-wg/td/grddlonrdf.rdf with types ('application/rdf+xml', 'application/xml', 'text/xml', 'application/xhtml+xml', 'text/html')
applying transformation http://www.w3.org/2001/sw/grddl-wg/td/foaf2con.xsl
@@fetching:  http://www.w3.org/2001/sw/grddl-wg/td/foaf2con.xsl with types 
('application/xml',)
Parsed 1 triples as RDF/XML
graph size after: 4

@prefix _8: <http://musicbrainz.org/mm-2.1/artist/33>.
@prefix _9: <http://musicbrainz.org/mm-2.1/album/6>.
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
@prefix pim: <http://www.w3.org/2000/10/swap/pim/contact#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.

_9:b050dcf-7ab1-456d-9e1b-c3c41c18eed2 foaf:maker _8:b3c323-77c2-417c-a5b4-af7e6a111cc9.

 _8:b3c323-77c2-417c-a5b4-af7e6a111cc9 a pim:SocialEntity,
         foaf:Agent;
     foaf:name "The Jimi Hendrix Experience".

Chimezie Ogbuji
Lead Systems Analyst
Thoracic and Cardiovascular Surgery
Cleveland Clinic Foundation
9500 Euclid Avenue/ W26
Cleveland, Ohio 44195
Office: (216)444-8593
[EMAIL PROTECTED]
# HG changeset patch
# User [EMAIL PROTECTED]
# Date 1171072226 18000
# Node ID 6d7d38577f3e8b17b29e73798360ac712ac1b78c
# Parent  1a3aac38f06be1655c6c9d0b781a9ecac04aa8d7
Fixed gleaning of RDF/XML document 
(http://www.w3.org/2001/sw/grddl-wg/td/testlist3.html#grddlonrdf1).  Comparison 
of rdflib.URIRef and unicode was failing, so builtin NS dispatch termination 
for RDF/XML namespace URI was kicking in

diff -r 1a3aac38f06b -r 6d7d38577f3e GRDDL.py
--- a/GRDDL.py  Mon Jan 29 08:39:08 2007 -0500
+++ b/GRDDL.py  Fri Feb 09 20:50:26 2007 -0500
@@ -75,7 +75,7 @@ XHTML_NS = u"http://www.w3.org/1999/xhtm
 
 #Built-in list of namespace uri's that should terminate any recursive
 #namespace dispatch
-NSDispatchTermination = [XHTML_NS, RDF.RDFNS]
+NSDispatchTermination = [XHTML_NS, unicode(RDF.RDFNS)]
 
 #Flag to determine whether or not to only attempt to parse a URL as
 #XML if it's mime-type is appropriate

Reply via email to