Channel #semsol: Logs

This is a public chat log generated from the #semsol IRC channel.

16:50:54 peterdm: hey bengee
16:51:06 bengee: heya
16:51:54 peterdm: so I'm still struggling to get ARC to output rdfxml that Mozilla (that picky monster) can grok.
16:52:32 peterdm: if you remember, you added the 'prettyprint' to RDFXMLSerializer for me a while back to get rdf:Seq and rdf:li output.
16:54:24 peterdm: My latest discovery (that took waay too long to discover), is that if you have a rdf:Seq that contains elements besides rdf:li (like other attributes), then Mozilla's ContainerUtils can't correctly instantiate the sequence in javascript.
16:54:37 bengee: ah
16:54:39 peterdm: e.g.
16:54:44 bengee: like rdf:type etc
16:54:53 peterdm: right. for example:
16:54:58 peterdm: <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
16:55:00 peterdm: xmlns:dc="http://purl.org/dc/elements/1.1/">
16:55:01 peterdm: <rdf:Seq rdf:about="rdf:#$AAAAAA">
16:55:02 peterdm: <dc:title>ARC RDF Sample that Mozilla cannot handle</dc:title>
16:55:04 peterdm: <dc:description>An RDF resource that is a Container but also contains other elements</dc:description>
16:55:05 peterdm: <rdf:li rdf:resource="rdf:#$BBBBBB" />
16:55:06 peterdm: <rdf:li>some literal</rdf:li>
16:55:28 peterdm: (sorry, didn't realize that would come out multi-line)
16:56:10 peterdm: if you can see, the dc:title and dc:description are enclosed in the <rdf:Seq> along with the rdf:li
16:57:48 peterdm: but if I wrap up the non- rdf:li elements in their own <rdf:Description rdf:about="rdf:#$AAAAAA">... Mozilla is happy.
17:00:34 peterdm: <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
17:00:35 peterdm: xmlns:dc="http://purl.org/dc/elements/1.1/">
17:00:36 peterdm: <rdf:Description rdf:about="rdf:#$AAAAAA">
17:00:38 peterdm: <dc:title>Sample that Mozilla can handle</dc:title>
17:00:39 peterdm: <dc:description>An RDF resource that is a Container but also contains other elements</dc:description>
17:00:42 peterdm: <rdf:Seq rdf:about="rdf:#$AAAAAA">
17:00:43 peterdm: <rdf:li rdf:resource="rdf:#$BBBBBB" />
17:00:44 peterdm: <rdf:li>some literal</rdf:li>
17:04:57 peterdm: I think that the spec doesn't care how you cluster your triples in rdfxml... and both of those examples run fine in Twinkle... but again, Moz has the problem.
17:05:19 peterdm: How difficult would it be to group the <rdf:Seq> with their <rdf:li> and create a seperate <rdf:Description>... for the rest?
17:06:35 bengee: simply dropping the other attributes would be straight-forward
17:07:20 bengee: serializing them a separate nodes would require different processing
17:11:49 peterdm: They would have the same node name as the Seq node.
17:12:18 peterdm: b/c the RDF structure wouldn't change. Just the serialization.
17:12:37 bengee: yeah, but the serializer is a single-pass writer
17:13:06 bengee: I'd have to buffer/append the other attributes somehow
17:14:02 bengee: which is doable, of course, but uglifies the code
17:16:00 peterdm: is it more straightforward to buffer/append the sequence attributes... and treat everything else normally?
17:16:21 peterdm: or same-same?
17:16:56 bengee: dunno, prolly same
17:18:31 bengee: does it work when you put the non-li elements to the bottom of the node?
17:18:46 bengee: I could maybe just re-order things
17:25:04 peterdm: I'll check.
17:28:27 peterdm: no luck.
17:28:44 peterdm: but there's another possible solution.... not optimal, but let me know what you think.
17:29:15 peterdm: if you don't group by subject at all. Just output <s> <p>"o"</p></s>
17:29:28 peterdm: for every triple... I think it'll parse.
17:29:45 peterdm: that would really be a single-pass serializer :-)
17:29:59 peterdm: not very human readable though.
17:30:53 bengee: heh, but then I'd have to write a separate serializer
17:33:37 peterdm: It would be mostly the same I think... I can take a whack at it. It's just a question of writing out the <subject>...</subject> in the inner loop.
17:33:49 peterdm: instead of the outer (I think.
17:33:50 peterdm: )
17:34:26 peterdm: if so, that could be triggered with a switch too.
17:35:44 bengee: isn't mozilla moving away from rdf anyway?
17:37:02 peterdm: I wasn't aware they were moving at all :-)
17:37:09 bengee: heh
17:37:42 bengee: splitting out non-li predicates would be the best solution, I think
17:38:02 bengee: not sure re prioritization, though. lots of other things on my todo list
17:38:08 peterdm: of course.
17:38:35 bengee: you don't have funding for this, do you?
17:39:06 peterdm: not really. sweat and tears.
17:39:20 bengee: yeah, same here
17:39:27 peterdm: I'll try to do the single triple serialization for now.
17:39:37 peterdm: If I get it working, I'll post you back the code.
17:39:46 bengee: cool, thx
17:39:54 peterdm: thank you.
20:21:14 peterdm: emailed changes to (you) (at) semsol.com
20:21:34 bengee: cheers
20:21:52 peterdm: no problem. keep up the great work!
20:28:26 bengee: thx :)