Re: @value/@type/@language combination

On Thu, Aug 14, 2014 at 3:51 AM, Stian Soiland-Reyes <
soiland-reyes@cs.manchester.ac.uk> wrote:

> 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.
>
When you say “Content-in-RDF,” are you referencing Representing Content in
RDF 1.0 <http://www.w3.org/TR/Content-in-RDF10/>? Is there something more
recent or canonical?

Cheers,
Jason Whittle



> 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 14:52:16 UTC