|
View:
New views
6 Messages
—
Rating Filter:
Alert me
|
|
|
Reply protocolsHi, I'm finally getting round to implementing the Reply protocols in Annozilla, and I'm having a few problems. One is that Amaya seems to be pretty crash-happy at the moment, but I suppose that's best for another list. Anyway, looking at http://www.w3.org/2002/12/AnnoteaProtocol-20021219#ReplyProtocol I find a few typos. 1. Figure 3.1 has a typo with a colon instead of an equals sign: xmlns:rt:"http://www.w3.org/2001/12/replyType" (The rt namespace doesn't seem to be used in the sample anyway.) 2. Figure 3.1 also has a mismatched "</a>" tag in the annotation body. 3. Figure 3.3 specifies the query parameter as "w3c_reply_tree", where "w3c_replyTree" seems to be what is implemented. With these corrected, I'm trying to perform a simple POST, containing more or less the same content as the sample, but I don't get the expected response back. If I add "Accept: text/rdf" to the request, then the response I get is a 404 error with <?xml version="1.0"?> <!-- session-id 1199813896.488673" --> <r:RDF xmlns:r="<a href="http://www.w3.org/1999/02/22-rdf-syntax-ns#">http://www.w3.org/1999/02/22-rdf-syntax-ns#</a>"> </pre> <h3>error: found no annotation or reply.</h3> <pre class="printAnnotation_plainText">ARRAY(0x8b633c4) The RDF submitted is listed below. <r:RDF xmlns:r="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:a="http://www.w3.org/2000/10/annotation-ns#" xmlns:d="http://purl.org/dc/elements/1.1/" xmlns:tr="http://www.w3.org/2001/03/thread#" xmlns:h="http://www.w3.org/1999/xx/http#" xmlns:rt="http://www.w3.org/2001/12/replyType"> <r:Description> <r:type r:resource="http://www.w3.org/2001/03/thread#Reply"/> <r:type r:resource="http://www.w3.org/2001/12/replyType#Agree"/> <tr:root r:resource="http://annotest.w3.org/annotations/annotation/1199813022.945436"/> <tr:inReplyTo r:resource="http://annotest.w3.org/annotations/annotation/1199813022.945436"/> <d:title>Annotation of Sample Page</d:title> <d:creator>Matthew Wilson</d:creator> <a:created>1999-10-14T12:10Z</a:created> <d:date>1999-10-14T12:10Z</d:date> <a:body> <r:Description> <h:ContentType>text/html</h:ContentType> <h:Body r:parseType="Literal"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Matthew\'s Reply</title> </head> <body> <p>I agree with Ralph. What would be the next step?.</p> </body> </html> </h:Body> </r:Description> </a:body> </r:Description> </r:RDF> Matthew Wilson |
|
|
Re: Reply protocolsHi Matthew > I'm finally getting round to implementing the Reply protocols in > Annozilla, and I'm having a few problems. One is that Amaya seems to > be pretty crash-happy at the moment, but I suppose that's best for > another list. Amaya has always been like this ;-) As far as I know, there is still a problem with Annotations in Amaya. It crashes at the next http request after loading Annotations. :-( > Anyway, looking at > http://www.w3.org/2002/12/AnnoteaProtocol-20021219#ReplyProtocol I > find a few typos. > > [...] > > 3. Figure 3.3 specifies the query parameter as "w3c_reply_tree", > where "w3c_replyTree" seems to be what is implemented. Good you mention that. In my own server software I implemented w3c_reply_tree. It seems I have to accept w3c_replyTree too. > With these corrected, I'm trying to perform a simple POST, containing > more or less the same content as the sample, but I don't get the > expected response back. If I add "Accept: text/rdf" to the request, > then the response I get is a 404 error with > [...] Does application/rdf+xml or application/xml work? The latter is actually the Content-type the server uses in it's replies in the examples in the document you mentioned. If this solves the problem, the server should better answer with "not acceptable" rather than 404. Greetings Urs |
|
|
Re: Reply protocolsUrs Holzer wrote: > Hi Matthew > >> I'm finally getting round to implementing the Reply protocols in >> Annozilla, and I'm having a few problems. One is that Amaya seems to >> be pretty crash-happy at the moment, but I suppose that's best for >> another list. > > Amaya has always been like this ;-) > As far as I know, there is still a problem with Annotations in Amaya. It > crashes at the next http request after loading Annotations. :-( I found an earlier version (around 8.5 I think) which seemed to work OK. >> Anyway, looking at >> http://www.w3.org/2002/12/AnnoteaProtocol-20021219#ReplyProtocol I >> find a few typos. >> >> [...] >> >> 3. Figure 3.3 specifies the query parameter as "w3c_reply_tree", >> where "w3c_replyTree" seems to be what is implemented. > > Good you mention that. In my own server software I implemented > w3c_reply_tree. It seems I have to accept w3c_replyTree too. > >> With these corrected, I'm trying to perform a simple POST, containing >> more or less the same content as the sample, but I don't get the >> expected response back. If I add "Accept: text/rdf" to the request, >> then the response I get is a 404 error with >> [...] > > Does application/rdf+xml or application/xml work? The latter is actually > the Content-type the server uses in it's replies in the examples in the > document you mentioned. > If this solves the problem, the server should better answer with "not > acceptable" rather than 404. I think the problem is in the RDF posted. By observing Amaya, I found a form of RDF content which worked. It seemed to need an "<a:context>" describing the portion of the annotation body being replied to, and, strangely, to need a Dublin Core 1.0 namespace instead of 1.1. Also, in retrieving replies, the documentation shows retrieval of /Annotation?w3c_reply_tree=<url>, but the server seems to need /Annotation?w3c_annotates=<url>&w3c_replyTree=<url>. Mattthew |
|
|
Re: Reply protocolsMatthew Wilson wrote: > I think the problem is in the RDF posted. By observing Amaya, I found > a form of RDF content which worked. It seemed to need an > "<a:context>" describing the portion of the annotation body being > replied to, and, strangely, to need a Dublin Core 1.0 namespace > instead of 1.1. Does it reject all posts containing properties (from namespaces) it does not know or does it only expect some properties to be present? > Also, in retrieving replies, the documentation shows retrieval of > /Annotation?w3c_reply_tree=<url>, but the server seems to need > /Annotation?w3c_annotates=<url>&w3c_replyTree=<url>. The second one is for retrieving annotations that annotate the annotation <url> and replies to the annotation <url> in one request. w3c_reply_tree (or w3c_replyTree) does only get the replies to an annotation. So I'm puzzled why the server always needs both of them. Crazy. However, I ask myself when the server code was last updated. I am not from the W3C, so I can not tell, but I believe the software is quite outdated. I recommend we stick to http://www.w3.org/2001/Annotea/User/Protocol.html In Annozilla, the exact behaviour should be configurable on a per server basis in order to work with the w3c's annotea server. Do you have any other annotea servers you can test against? My own server is not running right now (some library dependency problems). But if you want, I can get it running again next week and send you username and password so you can access it. |
|
|
Re: Reply protocolsUrs Holzer wrote: > Matthew Wilson wrote: >> I think the problem is in the RDF posted. By observing Amaya, I found >> a form of RDF content which worked. It seemed to need an >> "<a:context>" describing the portion of the annotation body being >> replied to, and, strangely, to need a Dublin Core 1.0 namespace >> instead of 1.1. > > Does it reject all posts containing properties (from namespaces) it does > not know or does it only expect some properties to be present? I'm not sure. It seems to accept a post with DC1.1, but not to retrieve it again. >> Also, in retrieving replies, the documentation shows retrieval of >> /Annotation?w3c_reply_tree=<url>, but the server seems to need >> /Annotation?w3c_annotates=<url>&w3c_replyTree=<url>. > > The second one is for retrieving annotations that annotate the > annotation <url> and replies to the annotation <url> in one request. > w3c_reply_tree (or w3c_replyTree) does only get the replies to an > annotation. So I'm puzzled why the server always needs both of them. > > Crazy. However, I ask myself when the server code was last updated. I am > not from the W3C, so I can not tell, but I believe the software is > quite outdated. I recommend we stick to > http://www.w3.org/2001/Annotea/User/Protocol.html I tend to treat the W3C Server and Amaya as a reference implementation. > In Annozilla, the exact behaviour should be configurable on a per server > basis in order to work with the w3c's annotea server. That sounds like too much of an effort to put on the user, to expect them to know the exact behaviour of the server they're using. Matthew |
|
|
Re: Reply protocolsMatthew Wilson wrote: > I tend to treat the W3C Server and Amaya as a reference > implementation. True, they are reference implementations, however even reference implementations can have quirks. But you are right, it is important that our software can interoperate with Amaya and the W3C annotea server. I know that there is at least one other server implementation. Perhaps we should take a look at that one too? We also could contact the developers/admins of the W3C annotea server. We also have to get the Amaya developers to fix those crashes. > > In Annozilla, the exact behaviour should be configurable on a per > > server basis in order to work with the w3c's annotea server. > > That sounds like too much of an effort to put on the user, to expect > them to know the exact behaviour of the server they're using. You are right about that. Perhaps we can sort out these problems somehow. (But never mind, I will adapt my own server code so that it works with Annozilla anyway.) I will be able help (as far as I can) in two weeks. Right now I don't have enough time. By the way, is there someone else reading this Mailinglist? I would really like to hear more opinions. |
| Free embeddable forum powered by Nabble | Forum Help |