When I use xerces-c_2_6 SAX2 parser to parse the testCategory.rdf,I get the event sequence:
// parser->setFeature(XMLUni::fgSAX2CoreNameSpaces, true);
... ...
startElement(...,qName = "rdf:RDF" ...)
startElement(...,qName = "cims:ClassCategory" ...
startElement(...,qName = "rdfs:label" ...
endElement(...,qName = "rdfs:label")
startElement(...,qName = "rdfs:comment" ...
endElement(...,qName = "rdfs:comment")
endElement(...,qName = "rdfs:ClassCategory")
endElement(...,qName = "rdfs:RDF")
Is this event sequence correct? Especially the endElement() event's qName argument of the "cims:ClassCategory" element or the "rdf:RDF" element? The qName argument of "cims:ClassCategory" element's endElement() event should be passed with the "cims:" prefix instead of "rdfs:" prefix,is that right?
/// testCategory.rdf
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:cims="
http://iec.ch/TC57/1999/rdf-schema-extensions-19990926#" xmlns:rdf="
http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="
http://www.w3.org/2000/01/rdf-schema#">
<cims:ClassCategory rdf:about="
http://iec.ch/TC57/2003/CIM-schema-cim10#CIM">
<rdfs:label xml:lang="en">CIM</rdfs:label>
<rdfs:comment>The Common Information Model (CIM) represents a common logical view of EMS public data. The CIM definition consists of a comprehensive information model. This information model is largely independent of any specific technological implementation methods.</rdfs:comment>
</cims:ClassCategory>
</rdf:RDF>
// parser->setFeature(XMLUni::fgSAX2CoreNameSpaces, true);
The event sequence is:
... ...
startElement(...,qName = "rdf:RDF" ...)
startElement(...,qName = "cims:ClassCategory" ...
startElement(...,qName = "rdfs:label" ...
endElement(...,qName = "rdfs:label")
startElement(...,qName = "rdfs:comment" ...
endElement(...,qName = "rdfs:comment")
endElement(...,qName = "cims::ClassCategory")
endElement(...,qName = "rdf:RDF")