amassari 2004/10/04 04:30:51 Modified: c/src/xercesc/parsers SAX2XMLReaderImpl.cpp SAX2XMLReaderImpl.hpp Log: As start/endPrefixMapping doesn't use the XMLBufMgr variable, we need only one XMLBuffer Revision Changes Path 1.40 +15 -13 xml-xerces/c/src/xercesc/parsers/SAX2XMLReaderImpl.cpp Index: SAX2XMLReaderImpl.cpp =================================================================== RCS file: /home/cvs/xml-xerces/c/src/xercesc/parsers/SAX2XMLReaderImpl.cpp,v retrieving revision 1.39 retrieving revision 1.40 diff -u -r1.39 -r1.40 --- SAX2XMLReaderImpl.cpp 4 Oct 2004 09:26:31 -0000 1.39 +++ SAX2XMLReaderImpl.cpp 4 Oct 2004 11:30:51 -0000 1.40 @@ -16,6 +16,9 @@ /* * $Log$ + * Revision 1.40 2004/10/04 11:30:51 amassari + * As start/endPrefixMapping doesn't use the XMLBufMgr variable, we need only one XMLBuffer + * * Revision 1.39 2004/10/04 09:26:31 amassari * Use an XMLStringPool+ValueStackOf(int) object to store the prefixes currently in scope, instead of a XMLBufMgr+ValueStack(XMLBuffer), that has a limitation of 32 items (jira#866) * @@ -285,7 +288,6 @@ */ #include <xercesc/util/IOException.hpp> -#include <xercesc/util/XMLChTranscoder.hpp> #include <xercesc/util/RefStackOf.hpp> #include <xercesc/util/XMLUniDefs.hpp> #include <xercesc/util/Janitor.hpp> @@ -344,7 +346,7 @@ , fValidator(0) , fMemoryManager(manager) , fGrammarPool(gramPool) - , fStringBuffers(manager) + , fBuffer(1023,manager) { try { @@ -949,12 +951,12 @@ if (fDocHandler) { - XMLBufBid elemQName( &fStringBuffers ) ; + fBuffer.reset(); if (elemPrefix && *elemPrefix) { - elemQName.set(elemPrefix); - elemQName.append(chColon); + fBuffer.set(elemPrefix); + fBuffer.append(chColon); } - elemQName.append(elemDecl.getBaseName()); + fBuffer.append(elemDecl.getBaseName()); if (getDoNamespaces()) { @@ -1007,7 +1009,7 @@ ( fScanner->getURIText(elemURLId) , elemDecl.getBaseName() - , elemQName.getRawBuffer() + , fBuffer.getRawBuffer() , fAttrList ); } @@ -1031,7 +1033,7 @@ ( fScanner->getURIText(elemURLId) , elemDecl.getBaseName() - , elemQName.getRawBuffer() + , fBuffer.getRawBuffer() ); unsigned int numPrefix = fPrefixCounts->pop(); @@ -1081,18 +1083,18 @@ // get the prefixes back so that we can call endPrefixMapping() if (getDoNamespaces()) { - XMLBufBid elemQName( &fStringBuffers ) ; + fBuffer.reset(); if (elemPrefix && *elemPrefix) { - elemQName.set(elemPrefix); - elemQName.append(chColon); + fBuffer.set(elemPrefix); + fBuffer.append(chColon); } - elemQName.append(elemDecl.getBaseName()); + fBuffer.append(elemDecl.getBaseName()); fDocHandler->endElement ( fScanner->getURIText(uriId) , elemDecl.getBaseName() - , elemQName.getRawBuffer() + , fBuffer.getRawBuffer() ); unsigned int numPrefix = fPrefixCounts->pop(); 1.28 +9 -4 xml-xerces/c/src/xercesc/parsers/SAX2XMLReaderImpl.hpp Index: SAX2XMLReaderImpl.hpp =================================================================== RCS file: /home/cvs/xml-xerces/c/src/xercesc/parsers/SAX2XMLReaderImpl.hpp,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- SAX2XMLReaderImpl.hpp 4 Oct 2004 09:26:31 -0000 1.27 +++ SAX2XMLReaderImpl.hpp 4 Oct 2004 11:30:51 -0000 1.28 @@ -16,6 +16,9 @@ /* * $Log$ + * Revision 1.28 2004/10/04 11:30:51 amassari + * As start/endPrefixMapping doesn't use the XMLBufMgr variable, we need only one XMLBuffer + * * Revision 1.27 2004/10/04 09:26:31 amassari * Use an XMLStringPool+ValueStackOf(int) object to store the prefixes currently in scope, instead of a XMLBufMgr+ValueStack(XMLBuffer), that has a limitation of 32 items (jira#866) * @@ -211,7 +214,6 @@ #include <xercesc/util/RefStackOf.hpp> #include <xercesc/util/SecurityManager.hpp> #include <xercesc/util/ValueStackOf.hpp> -#include <xercesc/framework/XMLBufferMgr.hpp> XERCES_CPP_NAMESPACE_BEGIN @@ -1788,8 +1790,8 @@ // Tells the parser whether it should reuse the grammar or not. // If true, there cannot be any internal subset. // - // fStringBuffers - // Any temporary strings we need are pulled out of this pool + // fPrefixesStorage + // the namespace prefixes will be allocated from this pool // // fPrefixes // A Stack of the current namespace prefixes that need calls to @@ -1847,6 +1849,9 @@ // The grammar pool passed from external application (through derivatives). // which could be 0, not owned. // + // fBuffer + // A buffer used to store the element name + // // ----------------------------------------------------------------------- bool fNamespacePrefix; bool fAutoValidation; @@ -1876,7 +1881,7 @@ XMLValidator* fValidator; MemoryManager* fMemoryManager; XMLGrammarPool* fGrammarPool; - XMLBufferMgr fStringBuffers; + XMLBuffer fBuffer; // ----------------------------------------------------------------------- // internal function used to set the state of the parser
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]