Multilingual Linked Open Data Patterns

Structured literals

Description

Literals in the RDF model can also be structured values in XML or HTML.

Using structured literals, it is possible to offer longer descriptions leveraging the Internationalization practices that have already been proposed for those languages.

Context

When longer descriptions are obtained from external sources it is better to keep them in their original form or to encode them using XML or HTML.

Also, when there are long textual descriptions with lot of internationalization information (localization workflows, multilingualism, etc.) it may be better to employ structured literals following the proposed XML internationalization techniques.

Example

A description of the University of León could be:

:unileón :desc
  "<p>University of  
     <span translate="no">León</span>,
     Spain.
   </p>"^^rdf:XMLLiteral .

Notice that the example uses the translate attribute from HTML5 to indicate that León should not be translated.

Discussion

Using structured literals makes it possible to leverage existing Internationalization techniques like bi-directionality, ruby annotations, localization notes, etc.

One issue is the interaction between the two abstraction levels: RDF and XML/HTML. Including large portions of structured literals can hinder the linked data approach.

See also

The W3c developed a document on Best Practices for XML internationalization which are complemented by the Internationalization Tag Set (ITS).

The new version ITS 2.0 contains categories that are format neutral, supporting both XML, HTML and the RDF based NIF (NLP Interchange Format). It also gives support to localization workflows like those expressed in XLIFF.