- From: Stian Soiland-Reyes <soiland-reyes@cs.manchester.ac.uk>
- Date: Thu, 14 Aug 2014 08:51:40 +0100
- To: Gregg Kellogg <gregg@greggkellogg.net>
- Cc: Linked JSON <public-linked-json@w3.org>, azaroth42@gmail.com
- Message-ID: <CAPRnXtmZY8iAaBiF+mV4b1_3MtX2_QxVuDFdXb=8ezVzOxW4Rw@mail.gmail.com>
One could argue that as soon as you have used a different datatype it is no longer text in that language. English language does not have <p> as one of it's constructs. I would probably have used Content-in-RDF for that use case. XML literals in RDF are fragile and a relic of the RDF/XML days. On 14 Aug 2014 01:07, "Gregg Kellogg" <gregg@greggkellogg.net> wrote: > On Aug 13, 2014, at 4:31 PM, Robert Sanderson <azaroth42@gmail.com> wrote: > > > Dear all, > > We have a use case that would require all three of @value, @type and > @language for a single resource, which is not allowed according to the > specification (eg section 8.3) > > We would like to use either plain literals (and hence @value/@language) or > X/HTML in the same space to allow basic styling and linking within the > text. We want to do this in a way that doesn't involve introspection of > the value to determine whether it's text/plain or text/xml if at all > possible. > > For example: > > > { > "description": { > "@value":"<p>Some <b>description</b></p>", > "@type": "rdf:XMLLiteral", > "@language" : "en-latn" > } > } > > > Is there any existing best practice for how to accommodate this? > > > Note that the RDF data model allows literals to have either a datatype or > a language, but not both. JSON-LD is just being consistent here. > > In most applications (e.g., RDFa markup), the language is included in the > markup: > > { > "description": { > "@value":"<p lang="en-latn">Some <b>description</b></p>", > "@type": "rdf:XMLLiteral" > } > } > > > Of course, it could be that you'd like to use @container=language, to > index into different markup, but as you see, this isn't supported either in > RDF or JSON-LD. > > Gregg > > Thanks! > > Rob > > -- > Rob Sanderson > Technology Collaboration Facilitator > Digital Library Systems and Services > Stanford, CA 94305 > > >
Received on Thursday, 14 August 2014 07:52:08 UTC