Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Type definition does not recognize xml:base #11

@greenTara

Description

@greenTara

According to the specs (http://www.w3.org/TR/REC-rdf-syntax/#section-Syntax-ID-xml-base), rdf:ID="name" is equivalent to rdf:about="#name", both resolve to IRIs against the base IRI of the infoset.

OO jDREW associates the type referenced in

<Var type="string">X</Var>

with the type specified in

<rdf:Description rdf:ID="string">
      <rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
    </rdf:Description>
</rdf:RDF>

This itself is incorrect, as it should be <Var type="#string">X</Var> assuming xml:base is the same in both cases.

However, the content model of @type in <Var> should be xs:anyURI, so

<Var type="http://www.w3.org/2001/XMLSchema#string">X</Var>

should reference the type defined in

<rdf:Description rdf:ID="string" xml:base="http://www.w3.org/2001/XMLSchema">
      <rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
    </rdf:Description>
</rdf:RDF>

Instead, the error message "There is no type http://www.w3.org/2001/XMLSchema#string defined." appears.

Because rdf:ID is of type xs:ID, it is not correct to have

<rdf:Description rdf:ID="http://www.w3.org/2001/XMLSchema#string" xml:base="http://www.w3.org/2001/XMLSchema">
<rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class&quot;/>
</rdf:Description>
</rdf:RDF>

A correct alternative (valid according to RDF, RDFS specs) would be

<rdf:Description rdf:about="http://www.w3.org/2001/XMLSchema#string" >
<rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class&quot;/>
</rdf:Description>
</rdf:RDF>

but this is also not parsed by OO jDREW.

A test KB is

<RuleML  xmlns="http://ruleml.org/spec">
  <Assert>
    <Atom>
       <Rel>P</Rel>
       <Ind type="http://www.w3.org/2001/XMLSchema#string">stringParam</Ind>
   </Atom> 
  </Assert>
</RuleML>

which does not parse, compared to

<RuleML  xmlns="http://ruleml.org/spec">
  <Assert>
    <Atom>
       <Rel>P</Rel>
       <Ind>stringParam</Ind>
   </Atom> 
  </Assert>
</RuleML>

which does parse.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions