diff --git a/index.html b/index.html index 01a0879..a0cca3e 100644 --- a/index.html +++ b/index.html @@ -22,6 +22,11 @@ url: "https://ruben.verborgh.org/", company: "Ghent University – imec", companyURL: "http://idlab.ugent.be/" + }, { + name: "Ruben Taelman", + url: "https://www.rubensworks.net/", + company: "Ghent University – imec", + companyURL: "http://idlab.ugent.be/" }], authors: [{ name: "Thomas Bergwinkl", @@ -47,6 +52,11 @@ url: "https://ruben.verborgh.org/", company: "Ghent University – imec", companyURL: "http://idlab.ugent.be/" + }, { + name: "Ruben Taelman", + url: "https://www.rubensworks.net/", + company: "Ghent University – imec", + companyURL: "http://idlab.ugent.be/" }], bugTracker: { open: "https://github.com/rdfjs/data-model-spec/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aopen%20", @@ -225,6 +235,7 @@

Literal interface

attribute DOMString termType; attribute DOMString value; attribute DOMString language; + attribute DOMString? direction; attribute NamedNode datatype; boolean equals(optional Term? other); }; @@ -241,11 +252,17 @@

Literal interface

language the language as lowercase [[BCP47]] string (examples: "en", "en-gb") or an empty string if the literal has no language.

+

+ direction is not falsy if the string is a directional language-tagged string. + In this case, the direction MUST be either be "ltr" or "rtl". +

datatype a NamedNode whose IRI represents the datatype of the literal.

- If the literal has a language, its datatype has the IRI + If the literal has a language and a direction, its datatype has the IRI + "http://www.w3.org/1999/02/22-rdf-syntax-ns#dirLangString". + If the literal has a language without direction, its datatype has the IRI "http://www.w3.org/1999/02/22-rdf-syntax-ns#langString". Otherwise, if no datatype is explicitly specified, the datatype has the IRI "http://www.w3.org/2001/XMLSchema#string". @@ -254,7 +271,8 @@

Literal interface

equals() returns true if all general Term.equals conditions hold, term.value is the same string as other.value, - term.language is the same string as other.language, and + term.language is the same string as other.language, + term.direction is the same string as other.direction or are both falsy, and term.datatype.equals(other.datatype) evaluates to true; otherwise, it returns false.

@@ -383,13 +401,19 @@

DataFactory interface

interface DataFactory { NamedNode namedNode(DOMString value); BlankNode blankNode(optional DOMString value); - Literal literal(DOMString value, optional (DOMString or NamedNode) languageOrDatatype); + Literal literal(DOMString value, optional (DOMString or NamedNode or DirectionalLanguage) languageOrDatatype); Variable variable(DOMString value); DefaultGraph defaultGraph(); Quad quad(Term subject, Term predicate, Term _object, optional Term? graph); Term fromTerm(Term original); Quad fromQuad(Quad original); }; + + [Exposed=(Window,Worker)] + interface DirectionalLanguage { + attribute DOMString language; + attribute DOMString? direction; + };

@@ -404,10 +428,13 @@

DataFactory interface

parameter is undefined a new identifier for the blank node is generated for each call.

- literal() returns a new instance of Literal. If - languageOrDatatype is a NamedNode, then it is used for the value of - datatype. Otherwise languageOrDatatype is used for the value of - language. + literal() returns a new instance of Literal. + If languageOrDatatype is a NamedNode, + then it is used for the value of datatype. + If languageOrDatatype is a DirectionalLanguage, + then its language and direction attributes + are respectively used for the literal's language and direction, where direction is optional or can be falsy. + Otherwise languageOrDatatype is used for the value of language.

variable() returns a new instance of Variable. This method is