From: Geraint E. <rd...@co...> - 2006-02-28 11:20:34
|
I am building a mozilla datasource but am having some difficulties with RDF containers. As far as I can tell Mozilla cannot handle Seq or Bag entries of type RDF:_/n/ , expecting an RDF:li in both cases. RAP serializes these nodes as RDF:_/n/ in all cases (as far as I can tell). Am I missing something or is there a way to tell RAP to serialize these nodes as RDF:li (tracking the order with another attribute possibly?) or does someone have experience in getting gecko/mozilla to recognise RDF:_/n/ nodes within containers? thanks Geraint |
From: Richard C. <ri...@cy...> - 2006-03-01 00:59:52
|
Hi Geraint, On 28 Feb 2006, at 12:20, Geraint Edwards wrote: > I am building a mozilla datasource but am having some difficulties > with RDF containers. As far as I can tell Mozilla cannot handle > Seq or Bag entries of type RDF:_n , expecting an RDF:li in both cases. That's weird, because rdf:_n is the basic form, and rdf:li is the syntactic sugar. (Does it work when you change the rdf:_n to rdf:li manually?) > RAP serializes these nodes as RDF:_n in all cases (as far as I can > tell). > > Am I missing something or is there a way to tell RAP to serialize > these nodes as RDF:li Sorry, no, RAP has no support for this at the moment. Richard > (tracking the order with another attribute possibly?) or does > someone have experience in getting gecko/mozilla to recognise > RDF:_n nodes within containers? > > thanks > > Geraint |
From: Geraint E. <rd...@co...> - 2006-03-01 09:49:16
|
Thanks for the response Richard. Richard Cyganiak wrote: > On 28 Feb 2006, at 12:20, Geraint Edwards wrote: > >> I am building a mozilla datasource but am having some difficulties >> with RDF containers. As far as I can tell Mozilla cannot handle Seq >> or Bag entries of type RDF:_n , expecting an RDF:li in both cases. > > That's weird, because rdf:_n is the basic form, and rdf:li is the > syntactic sugar. (Does it work when you change the rdf:_n to rdf:li > manually?) Yes - in fact I am moving from long established (working) simple perl code and local files which present container members as <RDF:li>. I have also followed an example at xulplanet (see http://www.xulplanet.com/tutorials/mozsdk/rdfsyntax.php) written to demonstrate mozilla/rdf and the rdf:_n syntax gives empty containers whereas the rdf:li syntax works as expected. >> (tracking the order with another attribute possibly?) or does >> someone have experience in getting gecko/mozilla to recognise RDF:_n >> nodes within containers? > I suspect what I will need to do is to create a new serialization class extending RdfSerializer and override the writeContentStatements function (I know its meant to be private but its better than hacking the core code!) to rewrite the RDF:_n tags as RDF:_li and adding a custom attribute to pass the order number to firefox. I can then use this custom attribute to create the appropriate RDF:_n based modification statements I send back from the browser to the server. It should work but is a bit of a pain :-(. Geraint |
From: Richard C. <ri...@cy...> - 2006-03-01 11:24:39
|
Hi Geraint, On 1 Mar 2006, at 10:49, Geraint Edwards wrote: >>> I am building a mozilla datasource but am having some >>> difficulties with RDF containers. As far as I can tell Mozilla >>> cannot handle Seq or Bag entries of type RDF:_n , expecting an >>> RDF:li in both cases. >> >> That's weird, because rdf:_n is the basic form, and rdf:li is the >> syntactic sugar. (Does it work when you change the rdf:_n to >> rdf:li manually?) > > Yes - in fact I am moving from long established (working) simple > perl code and local files which present container members as > <RDF:li>. I have also followed an example at xulplanet (see http:// > www.xulplanet.com/tutorials/mozsdk/rdfsyntax.php) written to > demonstrate mozilla/rdf and the rdf:_n syntax gives empty > containers whereas the rdf:li syntax works as expected. Oh, OK. Actually, there's a Mozilla bug filed for this: https:// bugzilla.mozilla.org/show_bug.cgi?id=106516 . Doesn't seem to get much attention. I voted for it. >>> (tracking the order with another attribute possibly?) or does >>> someone have experience in getting gecko/mozilla to recognise >>> RDF:_n nodes within containers? >> > I suspect what I will need to do is to create a new serialization > class extending RdfSerializer and override the > writeContentStatements function (I know its meant to be private but > its better than hacking the core code!) to rewrite the RDF:_n tags > as RDF:_li and adding a custom attribute to pass the order number > to firefox. I can then use this custom attribute to create the > appropriate RDF:_n based modification statements I send back from > the browser to the server. > It should work but is a bit of a pain :-(. Why don't you take a stab at adding rdf:li support to the RdfSerializer? I'm sure that would benefit other folks as well. Look at writeDescriptions() and writeGroup() for a place to start. Best, Richard > > Geraint > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting > language > that extends applications into web and mobile media. Attend the > live webcast > and join the prime developer group breaking into this new coding > territory! > http://sel.as-us.falkag.net/sel? > cmd=lnk&kid=110944&bid=241720&dat=121642 > _______________________________________________ > Rdfapi-php-interest mailing list > Rdf...@li... > https://lists.sourceforge.net/lists/listinfo/rdfapi-php-interest > |
From: Geraint E. <rd...@co...> - 2006-03-01 12:24:57
|
Richard Cyganiak wrote: > Oh, OK. Actually, there's a Mozilla bug filed for this: https:// > bugzilla.mozilla.org/show_bug.cgi?id=106516 . Doesn't seem to get > much attention. I voted for it. Yes - I found that after my message :-( > Why don't you take a stab at adding rdf:li support to the > RdfSerializer? I'm sure that would benefit other folks as well. Look > at writeDescriptions() and writeGroup() for a place to start. Yes - a generic rdf:li serializer should be straightforward. I'd probably suggest adding a configuration constant to allow the switch? My requirements are a bit more involved than just serialization since I want Mozilla to pass back to the server information about changes made to the datasource locally. I therefore need to make sure that Mozilla is given enough information that it can pass back to the server and allow me to identify and modify my DBmodel statements as necessary. I'll certainly pass back to the community what I come up with as a solution. since RAP seems like the ideal backend to a server based Mozilla datasource. Geraint |
From: Richard C. <ri...@cy...> - 2006-03-01 15:59:37
|
Geraint, On 1 Mar 2006, at 13:24, Geraint Edwards wrote: > Richard Cyganiak wrote: >> Oh, OK. Actually, there's a Mozilla bug filed for this: https:// >> bugzilla.mozilla.org/show_bug.cgi?id=106516 . Doesn't seem to get >> much attention. I voted for it. > > Yes - I found that after my message :-( > >> Why don't you take a stab at adding rdf:li support to the >> RdfSerializer? I'm sure that would benefit other folks as well. >> Look at writeDescriptions() and writeGroup() for a place to start. > > Yes - a generic rdf:li serializer should be straightforward. I'd > probably suggest adding a configuration constant to allow the switch? Sounds good to me. > My requirements are a bit more involved than just serialization > since I want Mozilla to pass back to the server information about > changes made to the datasource locally. I therefore need to make > sure that Mozilla is given enough information that it can pass back > to the server and allow me to identify and modify my DBmodel > statements as necessary. That's an interesting scenario. Would it work if you replaced the whole model on the server with the changed version from the Mozilla client? Just for the record, the RAP parser can deal with rdf:li just fine. > I'll certainly pass back to the community what I come up with as a > solution. since RAP seems like the ideal backend to a server based > Mozilla datasource. Let us know how it goes and if we can help. Richard > > Geraint > |