Warning:
This wiki has been archived and is now read-only.

TF-RDF-XML

From RDF Working Group Wiki
Jump to: navigation, search

Changes from Task Force "RDF-XML"

List of the changes considered for the RDF 1.1 XML Syntax Specification.

Changes include the Errata for RDF Syntax

Change 1: typo "tiple"

status:done.

initial erratum

Syntax typo “tiple” in 7.2.11 Production nodeElement: "and the following tiple is added to the graph"

Change 2: hard coded reference to XML and Unicode versions

status: done.

initial erratum

Hard coded reference to XML 1.0 and to Unicode 3.0 are unduly restrictive. Both reference should be exchanged against a normative reference to the generically latest versions of both standards.

Change 3: signature resolve(e, s)

status: done.

initial erratum

Section 6.3.3 Grammar Action Notation of the RDF/XML Syntax Specification defines the resolve action with the signature resolve(e, s), i.e. taking two arguments, and yet we find the following:

in 7.2.11 Production nodeElement

u:=uri(identifier:=resolve(a.string-value))

in 7.2.21 Production emptyPropertyElt

u:=uri(identifier:=resolve(a.string-value))

while both should read:

u:=uri(identifier:=resolve(e, a.string-value))

Change 4: missing parent accessor

status: done.

initial erratum Section 6 of the RDF/XML Syntax Specification (Revised) says that the parent property of the element information item in the XML Infoset is required, but section 6.1.2 Element Event does not create a parent accessor for that event. Element events therefore do not have a parent accessor, and yet a parent accessor on element events is made use of in a number or sections. See the error submission for further details.

Change 5: datatyped empty literals

status: done.

inital erratum with email 1 and email 2

RDF 1.1 WG mailing list: initial mail for requesting opinions on that issue

Serialization of datatyped empty literals is not anticipated by the RDF/XML grammar. This is believed by several developers and former WG-members to be an omission in the grammar defined by the RDF/XML Syntax Specification: a bug was reported (and acknowledged by the editor), relating to the use of an rdf:datatype attribute on empty RDF properties. See the archived mailing list thread for technical details. In addition to the question of the RDF/XML grammar's syntactic completeness, note that this issue identifies a construct that occurs within RDF graphs that cannot be serialized in the RDF/XML syntax.

current state:

Current section "7.2.16 Production literalPropertyElt" says
start-element(URI == propertyElementURIs ), attributes == set(idAttr?, datatypeAttr?))
text()
end-element()
Note that the empty literal case is defined in production emptyPropertyElt.
(...)

Current section "7.2.21 Production emptyPropertyElt" says
start-element(URI == propertyElementURIs ),
    attributes == set(idAttr?, ( resourceAttr | nodeIdAttr )?, propertyAttr*))
end-element()
(...)

with section "7.2.7 Production propertyAttributeURIs" specifying and
anyURI - ( coreSyntaxTerms | rdf:Description | rdf:li | oldTerms )
(...)

with section "7.2.2 Production coreSyntaxTerms" including datatypes:
rdf:RDF | rdf:ID | rdf:about | rdf:parseType | rdf:resource | rdf:nodeID | rdf:datatype
(...)

proposed change:

7.2.21 Production emptyPropertyElt
start-element(URI == propertyElementURIs ),
    attributes == set(idAttr?, ( resourceAttr | nodeIdAttr | datatypeAttr)?, propertyAttr*))
end-element()

Change 6: ID and datatype exclusion on literal property

status: done.

intial mail

Concerning the RELAX NG Compact Schema for RDF/XML. The production rules only allow either an rdf:ID attribute or an rdf:datatype attribute to be specified on a literal property, but not both. This is different from the normative grammar in chapter 7. The result of following this grammar would be that triples with a datatyped literal as object cannot be reified in the normal way.

(Changes are required in the document and the linked rdfxml.rnc)


actual grammar:

literalPropertyElt =
    element * - ( local:* | rdf:RDF | rdf:ID | rdf:about | rdf:parseType |
                  rdf:resource | rdf:nodeID | rdf:datatype |
                  rdf:Description | rdf:aboutEach | rdf:aboutEachPrefix |
                  rdf:bagID | xml:* ) {
        (idAttr | datatypeAttr )?, xmllang?, xmlbase?, text
    }

proposed change:

literalPropertyElt =
    element * - ( local:* | rdf:RDF | rdf:ID | rdf:about | rdf:parseType |
                  rdf:resource | rdf:nodeID | rdf:datatype |
                  rdf:Description | rdf:aboutEach | rdf:aboutEachPrefix |
                  rdf:bagID | xml:* ) {
        idAttr?, datatypeAttr?, xmllang?, xmlbase?, text
    }

Change 7: HTML5 in RDF-XML

status: abandoned.

We should decide whether rdf/xml will be extended to support html5 datatype and to include special syntactic support for our new HTML datatype

Current position: just include examples of HTML using CDATA

Change 8: named graph support in RDF-XML

status: abandoned

We could consider an extension of the RDF/XML syntax e.g. an attribute rdf:graph may be inserted in an RDF/XML document to specify the label of the graph.

The label of a triple is:

  • the label specified by a rdf:graph attribute on the XML element encoding this triple, if one exists, otherwise
  • the label of the element's parent element (obtained following recursively the same rules), otherwise
  • the default label otherwise.

The scope of a graph label declaration extends from the beginning of the start-element in which it appears to the end of the corresponding end-element, excluding the scope of any graph label declarations. Such a graph label declaration applies to all elements and attributes within its scope. In the case of an empty element, the scope is the element itself.

Only one graph label can be declared as attribute of a single element.

Thus the rdf:graph attribute can be used on any node element or property element to indicate that the included content belongs to a specific graph. The most specific in-scope graph label present (if any) is applied.

We allow explicitly default graph : the rdf:graph="" form indicates the default graph.