Issue Details (XML | Word | Printable)

Key: XERCESC-1308
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Critical Critical
Assignee: Alberto Massari
Reporter: QingpingXu
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Xerces-C++

SAX2 endElement event's qName parsing error?

Created: 13/Dec/04 09:50 AM   Updated: 09/Mar/06 04:47 PM
Return to search
Component/s: SAX/SAX2
Affects Version/s: 2.6.0
Fix Version/s: None

Time Tracking:
Not Specified

Environment: windows xp(sp2) + vs.net 2003 + debug version

Resolution Date: 23/Dec/04 02:21 PM


 Description  « Hide
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>

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
QingpingXu added a comment - 13/Dec/04 10:44 AM
If the SAX2 Parser's feature "http://xml.org/sax/features/namespaces" is set to false

// 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")


Alberto Massari added a comment - 23/Dec/04 02:21 PM
A fix is in CVS. Please verify.

Alberto

Dominik Stadler added a comment - 09/Mar/06 04:27 PM
We need to patch our local version of Xerces and would like to find out which files were affected by this fix? How do I find out?

Alberto Massari added a comment - 09/Mar/06 04:47 PM
I knew which files were involved, so I searched for a commit on that date having jira#1308 in its comment; once I had the revision (176252), I can see the changeset by going to http://svn.apache.org/viewcvs.cgi?rev=176252&view=rev
I don't know if there is another way...