Re: API design principles - HTMLXML literals

On Mon, Oct 12, 2015 at 1:56 AM, John Walker <john.walker@semaku.com> wrote:
>
> > On October 11, 2015 at 11:28 AM Robert Sanderson <azaroth42@gmail.com>
> wrote:
> >
> >  {
> >    "@type": "EmbeddedContent",
> >    "value": "<span>This is some <b>marked up</b> content.</span>",
> >    "language": "en",
> >    "format": "text/html"
> >  }
> >
> >  As RDF 1.1 does not allow both language and format to be associated
> with a
> > literal value, this is the best that we could do.
> Did you consider to put the lang="en" attribute in the HTML?
> If so, what was the reason to go for chosen approach?
>

We did.  The issue is for non HTML/XML such as plain text, markdown or
other formats that could easily be embedded but could not self-describe
with respect to language.

Brings up some interesting questions about if we might look at
> language-based
> content negotiation.  Would be nice in theory, but not sure how widely
> this is supported.
> Also considering the translation processes, the different languages could
> well
> be based on different versions of the primary content, how to deal with
> this in a clean manner?
>

In the Annotation space, as the Annotation and the content could be
controlled all by different parties, making content negotiation impossible,
we have an explicit node in the graph called a Choice that can link between
the options.

For example, a comment in both French and English:

{
  "@type": "Annotation",
  "body": {
      "@type": "Choice",
      "members": [
        { ... comment as above in English ... },
        { ... comment as above in French ...}
      ]
  },
  "target": "http://example.org/somepage"
}

Rob

Received on Monday, 12 October 2015 18:22:08 UTC