cargilld    2005/02/19 15:44:17

  Modified:    c/src/xercesc/internal IGXMLScanner.cpp SGXMLScanner.cpp
                        XSAXMLScanner.cpp
  Log:
  Prefix mapping fix from Dave Bertoni.
  
  Revision  Changes    Path
  1.86      +8 -16     xml-xerces/c/src/xercesc/internal/IGXMLScanner.cpp
  
  Index: IGXMLScanner.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/internal/IGXMLScanner.cpp,v
  retrieving revision 1.85
  retrieving revision 1.86
  diff -u -r1.85 -r1.86
  --- IGXMLScanner.cpp  12 Jan 2005 10:37:32 -0000      1.85
  +++ IGXMLScanner.cpp  19 Feb 2005 23:44:17 -0000      1.86
  @@ -942,9 +942,8 @@
           ? fElemStack.getCurrentURI() : fEmptyNamespaceId;
   
       // these get initialized below
  -    const ElemStack::StackElem* topElem = 0;
  -    XMLElementDecl *tempElement = 0;
  -    XMLCh *elemName = 0;
  +    const ElemStack::StackElem* topElem = 0;    
  +    const XMLCh *elemName = 0;
   
       // Make sure that its the end of the element that we expect
       // special case for schema validation, whose element decls,
  @@ -952,14 +951,12 @@
       if(fGrammarType == Grammar::SchemaGrammarType)
       {
           elemName = fElemStack.getCurrentSchemaElemName();
  -        topElem = fElemStack.popTop(); 
  -        tempElement = topElem->fThisElement; 
  +        topElem = fElemStack.popTop();         
       }
       else
       {
  -        topElem = fElemStack.popTop(); 
  -        tempElement = topElem->fThisElement;
  -        elemName = (XMLCh *)tempElement->getFullName();
  +        topElem = fElemStack.popTop();         
  +        elemName = topElem->fThisElement->getFullName();
       }
       if (!fReaderMgr.skippedString(elemName))
       {
  @@ -1157,17 +1154,12 @@
       // If we have a doc handler, tell it about the end tag
       if (fDocHandler)
       {
  -        int prefixColonPos = XMLString::indexOf(elemName, chColon);
  -        if (prefixColonPos == -1)
  -            fPrefixBuf.reset();
  -        else
  -            fPrefixBuf.set(elemName, prefixColonPos);
           fDocHandler->endElement
           (
               *topElem->fThisElement
               , uriId
  -            , isRoot
  -            , fPrefixBuf.getRawBuffer()
  +            , isRoot           
  +            , topElem->fThisElement->getElementName()->getPrefix()
           );
       }
   
  
  
  
  1.108     +4 -9      xml-xerces/c/src/xercesc/internal/SGXMLScanner.cpp
  
  Index: SGXMLScanner.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/internal/SGXMLScanner.cpp,v
  retrieving revision 1.107
  retrieving revision 1.108
  diff -u -r1.107 -r1.108
  --- SGXMLScanner.cpp  7 Jan 2005 08:33:15 -0000       1.107
  +++ SGXMLScanner.cpp  19 Feb 2005 23:44:17 -0000      1.108
  @@ -870,7 +870,7 @@
           ? fElemStack.getCurrentURI() : fEmptyNamespaceId;
   
       // Make sure that its the end of the element that we expect
  -    XMLCh *elemName = fElemStack.getCurrentSchemaElemName();
  +    const XMLCh *elemName = fElemStack.getCurrentSchemaElemName();
       const ElemStack::StackElem* topElem = fElemStack.popTop(); 
       if (!fReaderMgr.skippedString(elemName))
       {
  @@ -1012,17 +1012,12 @@
       // If we have a doc handler, tell it about the end tag
       if (fDocHandler)
       {
  -        int prefixColonPos = XMLString::indexOf(elemName, chColon);
  -        if (prefixColonPos == -1)
  -            fPrefixBuf.reset();
  -        else
  -            fPrefixBuf.set(elemName, prefixColonPos);
           fDocHandler->endElement
           (
               *topElem->fThisElement
               , uriId
  -            , isRoot
  -            , fPrefixBuf.getRawBuffer()
  +            , isRoot            
  +            , topElem->fThisElement->getElementName()->getPrefix()
           );
       }
   
  
  
  
  1.6       +6 -8      xml-xerces/c/src/xercesc/internal/XSAXMLScanner.cpp
  
  Index: XSAXMLScanner.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/internal/XSAXMLScanner.cpp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- XSAXMLScanner.cpp 7 Jan 2005 08:33:15 -0000       1.5
  +++ XSAXMLScanner.cpp 19 Feb 2005 23:44:17 -0000      1.6
  @@ -75,7 +75,7 @@
       unsigned int uriId = fElemStack.getCurrentURI();
   
       // Make sure that its the end of the element that we expect
  -    XMLCh *elemName = fElemStack.getCurrentSchemaElemName();
  +    const XMLCh *elemName = fElemStack.getCurrentSchemaElemName();
       const ElemStack::StackElem* topElem = fElemStack.popTop(); 
       if (!fReaderMgr.skippedString(elemName))
       {
  @@ -157,14 +157,12 @@
       // If we have a doc handler, tell it about the end tag
       if (fDocHandler)
       {
  -        int prefixColonPos = XMLString::indexOf(elemName, chColon);
  -        if (prefixColonPos == -1)
  -            fPrefixBuf.reset();
  -        else
  -            fPrefixBuf.set(elemName, prefixColonPos);
           fDocHandler->endElement
           (
  -            *topElem->fThisElement, uriId, isRoot, fPrefixBuf.getRawBuffer()
  +            *topElem->fThisElement
  +            , uriId
  +            , isRoot
  +            , topElem->fThisElement->getElementName()->getPrefix()
           );
       }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to