Problem
The specification says that features introduced in RDF 1.2 require a version announcement on an in-scope node element using rdf:version.
However, the RELAX NG Compact schema currently defines the document wrapper as:
RDF =
element rdf:RDF {
xmllang?, xmlbase?, nodeElementList
}
and node elements as:
nodeElement =
element * - ( local:* | rdf:RDF | rdf:ID | rdf:about | rdf:parseType |
rdf:resource | rdf:nodeID | rdf:datatype | rdf:li |
rdf:aboutEach | rdf:aboutEachPrefix | rdf:bagID ) {
(idAttr | nodeIdAttr | aboutAttr )?, xmllang?, xmlbase?, propertyAttr*, propertyEltList
}
Neither production allows versionAttr.
At the same time, many property element productions allow versionAttr?, which makes the handling of rdf:version inconsistent.
Expected behavior
The RELAX NG schema should allow rdf:version in the places required by the RDF/XML 1.2 versioning mechanism.
At minimum, this should include node elements, because the specification refers to an in-scope node element with an rdf:version attribute.
It may also be useful to allow rdf:version on rdf:RDF if the intent is to support version announcements on the document wrapper, as commonly shown in examples.
Suggested fix
Add versionAttr? to the relevant productions, for example:
RDF =
element rdf:RDF {
xmllang?, xmlbase?, versionAttr?, nodeElementList
}
and:
nodeElement =
element * - (...) {
(idAttr | nodeIdAttr | aboutAttr )?, xmllang?, xmlbase?, versionAttr?, propertyAttr*, propertyEltList
}
The exact placement should be aligned with the normative grammar and the intended scoping rules for rdf:version.
Problem
The specification says that features introduced in RDF 1.2 require a version announcement on an in-scope node element using
rdf:version.However, the RELAX NG Compact schema currently defines the document wrapper as:
and node elements as:
Neither production allows
versionAttr.At the same time, many property element productions allow
versionAttr?, which makes the handling ofrdf:versioninconsistent.Expected behavior
The RELAX NG schema should allow
rdf:versionin the places required by the RDF/XML 1.2 versioning mechanism.At minimum, this should include node elements, because the specification refers to an in-scope node element with an
rdf:versionattribute.It may also be useful to allow
rdf:versiononrdf:RDFif the intent is to support version announcements on the document wrapper, as commonly shown in examples.Suggested fix
Add
versionAttr?to the relevant productions, for example:and:
The exact placement should be aligned with the normative grammar and the intended scoping rules for
rdf:version.