Skip to content

Error for tags using namespaces declared within same tag #40

Open
@ekulno

Description

@ekulno

The RDF/XML parser emits an error for tags whose namespace is declared within that same tag. For example, endDate in the following snippet uses the namespace that appears inside the endDate tag:

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  <rdf:Description rdf:about="http://eurovoc.europa.eu/1">
    <endDate xmlns="http://publications.europa.eu/ontology/euvoc#" rdf:datatype="http://www.w3.org/2001/XMLSchema#date">1995-10-01</endDate>
  </rdf:Description>
</rdf:RDF>

The error message reads as follows:

ParseError: Found both non-rdf:* property attributes and rdf:datatype (http://www.w3.org/2001/XMLSchema#date).

The W3C RDF/XML validation service is able parse the data and resolves it to this triple:

<http://eurovoc.europa.eu/1> <http://publications.europa.eu/ontology/euvoc#endDate> "1995-10-01"^^<http://www.w3.org/2001/XMLSchema#date>.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions