Pregunta

Given This RDF:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE rdf:RDF [<!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'>
<!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#'>
<!ENTITY xsd 'http://www.w3.org/2001/XMLSchema#'>]>
<rdf:RDF xmlns:xsd="http://www.w3.org/2001/XMLSchema#" 
         xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
         xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:dnr="http://www.dotnetrdf.org/configuration#"
         xml:base="http://www.example.org/">

<rdf:Description rdf:about="Fadi">
        <ns:be xmlns:ns="http://example.org/">Nice</ns:be>
      </rdf:Description>

<rdf:Description rdf:about="Fadi">
    <ns:not xmlns:ns="http://example.org/" xml:startTime="00:00:13" xml:endTime="00:00:16">Good</ns:not>
    </rdf:Description>

<rdf:Description rdf:about="She">
    <ns:be xmlns:ns="http://example.org/" xml:startTime="00:00:13" xml:endTime="00:00:16">Good</ns:be>
    </rdf:Description>
    </rdf:RDF>

how can i get the attributes: startTime and endTime, with sparql Query request?!

¿Fue útil?

Solución

You can't, using the xml namespace in this way for attributes means that those attributes are silently ignored by a RDF/XML parser so they don't generate any triples.

From the RDF/XML specification Section 6:

Element information items with reserved XML Names (See Name in XML 1.0) are not mapped to data model element events. These are all those with property [prefix] beginning with xml (case independent comparison) and all those with [prefix] property having no value and which have [local name] beginning with xml (case independent comparison).

Therefore you cannot retrieve this data because it doesn't exist as far as a RDF/XML system is concerned.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top