RE: Java API for GRDDL processing and namespace question about GRDDL

Dan,

I downloaded and ran your glean.py program, and kind of found the answer to
my question about the result of loops. I see that the GRDDL result of the
original input document will have only the merge of the results of its own
dataview:transformations, namespacetransformations of its "immediate"
namespaces and profiletransformations of its "immediate" profiles. So, since
the GRDDL result is just the transformations of the original document and
transformations from its "immediate" namespaces or profiles, which are
listed in the original document, then why would there be a need to go
through loops to get to other namespaces of namespaces of namespaces or
profiles and so on?

Also, wouldn't we have a problem if:

?D has namespaces ?NS and ?NSS
?NS has namespace ?NSS

The program first visits ?NS from ?D, and puts ?NS on the already list.
Then, immediately, program visits ?NSS from ?NS, and puts ?NSS on the
already list. When the program returns back to ?D, and continues to get
namespaces, this time it gets ?NSS, but ?NSS is in the already list from
earlier, so it doesn't visit ?NSS from ?D. This could be a problem if ?NSS
has namespacetransformation for ?D.

Thanks,

Gokhan

 





-----Original Message-----
From: Gokhan Soydan [mailto:gsoydan@topquadrant.com] 
Sent: Wednesday, November 08, 2006 2:20 PM
To: 'public-grddl-comments@w3.org'
Subject: RE: Java API for GRDDL processing and namespace question aboutGRDDL

Dan,

Thank you very much for the detailed reply. Now, I see how the loops don't
become infinite.

However, in your loop case at
http://www.w3.org/2001/sw/grddl-wg/td/testlist3#loop, the
namespaceTransformations for both loop and loop-ns-b documents have the
stylesheet http://www.w3.org/2003/g/sq1t.xsl which doesn't contain anything.
How should be the rdf output for your loop case, if instead of
http://www.w3.org/2003/g/sq1t.xsl, we had a working namespaceTransformation
like http://dev.w3.org/cvsweb/~checkout~/2005/grddl-ts/sq1t.xsl. Will the
GRDDL result of loop-ns-b as a result of namespacetransformation from loop
(where loop acts as the namespace of loop-ns-b), and GRDDL result of loop as
result of namespacetransformation from loop-ns-b merge with the GRDDL result
of loop by its own dataview:transformation?

Thanks,

Gokhan





-----Original Message-----
From: Dan Connolly [mailto:connolly@w3.org] 
Sent: Sunday, November 05, 2006 1:33 AM
To: Gokhan Soydan
Cc: public-grddl-comments@w3.org
Subject: Re: Java API for GRDDL processing and namespace question aboutGRDDL

On Thu, 2006-11-02 at 10:52 -0800, Gokhan Soydan wrote:
> Hello,
> 
> Thank you very much for the information. I have a question about the
> specification. When using GRDDL with namespace documents, the formal
> definition is that:
> 
> - if an information resource ?D has an XML representation whose root
element
> has a namespace name ?NS then any GRDDL result of the resource identified
by
> ?NS is a GRDDL result of ?D 
> 
> - if an information resource ?D has an XML representation whose root
element
> has a namespace name ?NSDOC** and ?D has a GRDDL result that includes, for
> any ?TX, the RDF triple { ?NSDOC
> <http://www.w3.org/2003/g/data-view#namespaceTransformation> ?TX } then
?TX
> is also a transformation of ?D 
>
> Is this case possible: we have ?D, ?NS as defined above, and also ?NSS,
> which is a namespace of ?NS. ?NSS has a GRDDL result, which is also a
GRDDL
> result of ?NS and by definition also of ?D. Also, ?NSS has a
> namespaceTransformation, which produces another GRDDL result for ?NS,
which
> becomes GRDDL result of ?D. So, is it possible for GRDDL results to
> propagate through namespaces recursively and end up in the original
> document?
>
>  If this is the case, wouldn't there be an infinite situation, if
> there is a namespace ?NSA, that has a namespace ?NSB, and the namespace
?NSB
> has the namespace ?NSA?

Well, it's a loop, but there need not be anything infinite about it.

At least I don't think so.

These rules were in flux for other reasons.
I have revised them in a recent editor's draft.
http://www.w3.org/2004/01/rdxh/spec 1.151


> Is the above case possible for also profiles?

yes, I suppose so.

I should make a test case for this loop case...
OK... there... I made one...
http://www.w3.org/2001/sw/grddl-wg/td/testlist3#loop


For fun, here's a trace of it running with my glean.py
implementation.
http://www.w3.org/2003/g/glean.py
Note the "already" test on line 149 of glean.py
that keeps it from going into an infinite loop.

connolly@dirk:~/w3ccvs/WWW/2001/sw/grddl-wg/td$
PYTHONPATH=../../../../2000/10/swap/.. python testHarness.py --debug
--run ./gleanWrapper testlist3.rdf
Saving result to  loop-output.rdf.result
grddl(('file:///home/connolly/w3ccvs/WWW/2001/sw/grddl-wg/td/loop.xml',
None, ['http://www.w3.org/2003/g/data-view',
'http://www.w3.org/1999/xhtml']))
grddl(('file:///home/connolly/w3ccvs/WWW/2001/sw/grddl-wg/td/loop.xml',
'/tmp/grddl-xformsF8lc60.txt', ['http://www.w3.org/2003/g/data-view',
'http://www.w3.org/1999/xhtml']))
SPAWN: xsltproc --novalid -o /tmp/grddl-xformsKdJ2zP.txt --stringparam
xmlfile file:///home/connolly/w3ccvs/WWW/2001/sw/grddl-wg/td/loop.xml
getTransforms.xsl /tmp/grddl-xformsF8lc60.txt
getTransforms line:R http://www.w3.org/2001/sw/grddl-wg/td/loop-ns-b
getTransforms line:T http://www.w3.org/2003/g/embeddedRDF.xsl
Profile/Namespace: http://www.w3.org/2001/sw/grddl-wg/td/loop-ns-b
grddl(('http://www.w3.org/2001/sw/grddl-wg/td/loop-ns-b', None,
['http://www.w3.org/2003/g/data-view', 'http://www.w3.org/1999/xhtml',
'http://www.w3.org/2001/sw/grddl-wg/td/loop-ns-b']))
grddl(('http://www.w3.org/2001/sw/grddl-wg/td/loop-ns-b',
'/tmp/grddl-xformst6Wc2x.txt', ['http://www.w3.org/2003/g/data-view',
'http://www.w3.org/1999/xhtml',
'http://www.w3.org/2001/sw/grddl-wg/td/loop-ns-b']))
SPAWN: xsltproc --novalid -o /tmp/grddl-xformstZqL60.txt --stringparam
xmlfile http://www.w3.org/2001/sw/grddl-wg/td/loop-ns-b
getTransforms.xsl /tmp/grddl-xformst6Wc2x.txt
getTransforms line:R http://www.w3.org/2001/sw/grddl-wg/td/loop
getTransforms line:T http://www.w3.org/2003/g/embeddedRDF.xsl
Profile/Namespace: http://www.w3.org/2001/sw/grddl-wg/td/loop
grddl(('http://www.w3.org/2001/sw/grddl-wg/td/loop', None,
['http://www.w3.org/2003/g/data-view', 'http://www.w3.org/1999/xhtml',
'http://www.w3.org/2001/sw/grddl-wg/td/loop-ns-b',
'http://www.w3.org/2001/sw/grddl-wg/td/loop']))
grddl(('http://www.w3.org/2001/sw/grddl-wg/td/loop',
'/tmp/grddl-xformsu4ptgX.txt', ['http://www.w3.org/2003/g/data-view',
'http://www.w3.org/1999/xhtml',
'http://www.w3.org/2001/sw/grddl-wg/td/loop-ns-b',
'http://www.w3.org/2001/sw/grddl-wg/td/loop']))
SPAWN: xsltproc --novalid -o /tmp/grddl-xforms0yzeJg.txt --stringparam
xmlfile http://www.w3.org/2001/sw/grddl-wg/td/loop
getTransforms.xsl /tmp/grddl-xformsu4ptgX.txt
getTransforms line:R http://www.w3.org/2001/sw/grddl-wg/td/loop-ns-b
getTransforms line:T http://www.w3.org/2003/g/embeddedRDF.xsl
SPAWN: xsltproc --novalid -o /tmp/grddl-statementsvt6Yyv.rdf
--stringparam xmlfile http://www.w3.org/2001/sw/grddl-wg/td/loop
http://www.w3.org/2003/g/embeddedRDF.xsl /tmp/grddl-xformsu4ptgX.txt
parsing.../tmp/grddl-statementsvt6Yyv.rdf
data size:1
size of result:http://www.w3.org/2001/sw/grddl-wg/td/loop1
NAMESPACE XFORM: http://www.w3.org/2003/g/sq1t.xsl
SPAWN: xsltproc --novalid -o /tmp/grddl-statementsseyybi.rdf
--stringparam xmlfile http://www.w3.org/2001/sw/grddl-wg/td/loop-ns-b
http://www.w3.org/2003/g/embeddedRDF.xsl /tmp/grddl-xformst6Wc2x.txt
parsing.../tmp/grddl-statementsseyybi.rdf
data size:1
SPAWN: xsltproc --novalid -o /tmp/grddl-statementsseyybi.rdf
--stringparam xmlfile http://www.w3.org/2001/sw/grddl-wg/td/loop-ns-b
http://www.w3.org/2003/g/sq1t.xsl /tmp/grddl-xformst6Wc2x.txt
warning: failed to load external entity
"http://www.w3.org/2003/g/sq1t.xsl"
cannot parse http://www.w3.org/2003/g/sq1t.xsl
SPAWN: xsltproc --novalid -o /tmp/grddl-statementsbmg-hh.rdf
--stringparam xmlfile
file:///home/connolly/w3ccvs/WWW/2001/sw/grddl-wg/td/loop.xml
http://www.w3.org/2003/g/embeddedRDF.xsl /tmp/grddl-xformsF8lc60.txt
parsing.../tmp/grddl-statementsbmg-hh.rdf
data size:1
GRDDL size:1
Executing  /home/connolly/w3ccvs/WWW/2000/10/swap/delta.py -f
file:///home/connolly/w3ccvs/WWW/2001/sw/grddl-wg/td/loop-output.rdf -t
loop-output.rdf.result
diff:
All tests were passed!



-- 
Dan Connolly, W3C http://www.w3.org/People/Connolly/
D3C2 887B 0F92 6005 C541  0875 0F91 96DE 6E52 C29E

Received on Thursday, 9 November 2006 21:49:53 UTC