Re: JSON results format document

On 01/09/11 02:39, Paul Gearon wrote:
> Hi,
>
> Recently I've had cause to work with the JSON results format, and I
> noticed a couple of things about the example in section 5.
>
> - The first binding should contain the variable "mbox" bound to a
> literal with a value set to an empty string. This variable has been
> skipped.

Technically, yes.  Fixed.

Actually, I think the output.srx example is unhelpful.  mbox of a "" is 
silly - I wonder if it meant to be an OPTIONAL.

> - The first binding for the variable "blurb" is to a literal with a
> datatype of rdf:XMLLiteral has a "type" property of "typed-literal".
> However, section 3.2.2 specifies that this should be "literal".

Fixed. (This only occurs in an example, once, so it's editorial.)

> - This same binding for "blurb" has used entity escaping in the text
> of the value. While this is a valid XML fragment, I believe it was
> intended for this fragment to encode an element. JSON does not require
> entities to replace the<  and>  characters, and even if it were to be
> used in literal JavaScript in a web page, the convention is to use a
> CDATA wrapper on the script section to avoid problems with these
> characters.

Fixed.  It's wrong as-is: the &lt; would have been turned into < by XML 
parsing transparently so it really is < and >.

----------

Errata for the XML document (also added to the wiki errata page)

In the XML Result example, the data file has

_:a  ex:blurb  "....  <em>Alice</em> ...."^^rdf:XMLLiteral

but the output.srx has

... <b>Alice</b> ...

<em> => <b>

> Regards,
> Paul Gearon

Changes to json-results.xml commited to CVS.

Thanks

	Andy

Received on Thursday, 1 September 2011 09:19:35 UTC