xerces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bor...@apache.org
Subject svn commit: r696226 - /xerces/c/trunk/src/xercesc/parsers/SAX2XMLReaderImpl.cpp
Date Wed, 17 Sep 2008 10:05:01 GMT
Author: borisk
Date: Wed Sep 17 03:05:00 2008
New Revision: 696226

URL: http://svn.apache.org/viewvc?rev=696226&view=rev
Log:
Pass raw names to start/endElement if namespaces are disabled. Patch by David Bertoni.

Modified:
    xerces/c/trunk/src/xercesc/parsers/SAX2XMLReaderImpl.cpp

Modified: xerces/c/trunk/src/xercesc/parsers/SAX2XMLReaderImpl.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/parsers/SAX2XMLReaderImpl.cpp?rev=696226&r1=696225&r2=696226&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/parsers/SAX2XMLReaderImpl.cpp (original)
+++ xerces/c/trunk/src/xercesc/parsers/SAX2XMLReaderImpl.cpp Wed Sep 17 03:05:00 2008
@@ -698,11 +698,11 @@
     {
         const QName* qName=elemDecl.getElementName();
         const XMLCh* baseName=qName->getLocalPart();
-        XMLCh* elemQName = 0;
+        const XMLCh* elemQName = 0;
         if(elemPrefix==0 || *elemPrefix==0)
-            elemQName=(XMLCh*)baseName;
+            elemQName=baseName;
         else if(XMLString::equals(elemPrefix, qName->getPrefix()))
-            elemQName=(XMLCh*)qName->getRawName();
+            elemQName=qName->getRawName();
         else
         {
             fTempQName->set(elemPrefix);
@@ -771,8 +771,8 @@
             if(fDocHandler)
             {
                 fDocHandler->startElement(XMLUni::fgZeroLenString,
-                                          baseName,
-                                          elemQName,
+                                          XMLUni::fgZeroLenString,
+                                          qName->getRawName(),
                                           fAttrList);
             }
         }
@@ -807,8 +807,8 @@
                 if(fDocHandler)
                 {
                     fDocHandler->endElement(XMLUni::fgZeroLenString,
-                                    baseName,
-                                    elemQName);
+                                    XMLUni::fgZeroLenString,
+                                    qName->getRawName());
                 }
             }
         }
@@ -843,11 +843,11 @@
     {
         const QName* qName=elemDecl.getElementName();
         const XMLCh* baseName=qName->getLocalPart();
-        XMLCh* elemQName = 0;
+        const XMLCh* elemQName = 0;
         if(elemPrefix==0 || *elemPrefix==0)
-            elemQName=(XMLCh*)baseName;
+            elemQName=baseName;
         else if(XMLString::equals(elemPrefix, qName->getPrefix()))
-            elemQName=(XMLCh*)qName->getRawName();
+            elemQName=qName->getRawName();
         else
         {
             fTempQName->set(elemPrefix);
@@ -881,12 +881,9 @@
         {
             if(fDocHandler)
             {
-                fDocHandler->endElement
-                (
-                    XMLUni::fgZeroLenString,
-                    baseName,
-                    elemQName
-                );
+              fDocHandler->endElement(XMLUni::fgZeroLenString,
+                                      XMLUni::fgZeroLenString,
+                                      qName->getRawName());
             }
         }
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org


Mime
View raw message