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