peiyongz 2004/06/28 11:35:27 Modified: c/src/xercesc/internal DGXMLScanner.cpp IGXMLScanner2.cpp ReaderMgr.cpp SGXMLScanner.cpp Log: normalize URI Revision Changes Path 1.50 +8 -6 xml-xerces/c/src/xercesc/internal/DGXMLScanner.cpp Index: DGXMLScanner.cpp =================================================================== RCS file: /home/cvs/xml-xerces/c/src/xercesc/internal/DGXMLScanner.cpp,v retrieving revision 1.49 retrieving revision 1.50 diff -u -r1.49 -r1.50 --- DGXMLScanner.cpp 15 Jun 2004 21:28:02 -0000 1.49 +++ DGXMLScanner.cpp 28 Jun 2004 18:35:27 -0000 1.50 @@ -2473,13 +2473,15 @@ InputSource* DGXMLScanner::resolveSystemId(const XMLCh* const sysId) { - // Create a buffer for expanding the system id - XMLBufBid bbSys(&fBufMgr); - XMLBuffer& expSysId = bbSys.getBuffer(); - - XMLBuffer& normalizedSysId = bbSys.getBuffer(); + //Normalize sysId + XMLBufBid nnSys(&fBufMgr); + XMLBuffer& normalizedSysId = nnSys.getBuffer(); XMLString::removeChar(sysId, 0xFFFF, normalizedSysId); const XMLCh* normalizedURI = normalizedSysId.getRawBuffer(); + + // Create a buffer for expanding the normalized system id + XMLBufBid bbSys(&fBufMgr); + XMLBuffer& expSysId = bbSys.getBuffer(); // Allow the entity handler to expand the system id if they choose // to do so. 1.65 +13 -9 xml-xerces/c/src/xercesc/internal/IGXMLScanner2.cpp Index: IGXMLScanner2.cpp =================================================================== RCS file: /home/cvs/xml-xerces/c/src/xercesc/internal/IGXMLScanner2.cpp,v retrieving revision 1.64 retrieving revision 1.65 diff -u -r1.64 -r1.65 --- IGXMLScanner2.cpp 25 May 2004 18:09:50 -0000 1.64 +++ IGXMLScanner2.cpp 28 Jun 2004 18:35:27 -0000 1.65 @@ -1712,17 +1712,19 @@ parser.setUserEntityHandler(fEntityHandler); parser.setUserErrorReporter(fErrorReporter); + //Normalize loc + XMLBufBid nnSys(&fBufMgr); + XMLBuffer& normalizedSysId = nnSys.getBuffer(); + XMLString::removeChar(loc, 0xFFFF, normalizedSysId); + const XMLCh* normalizedURI = normalizedSysId.getRawBuffer(); + // Create a buffer for expanding the system id XMLBufBid bbSys(&fBufMgr); XMLBuffer& expSysId = bbSys.getBuffer(); - XMLBuffer& normalizedSysId = bbSys.getBuffer(); - - XMLString::removeChar(loc, 0xFFFF, normalizedSysId); // Allow the entity handler to expand the system id if they choose // to do so. InputSource* srcToFill = 0; - const XMLCh* normalizedURI = normalizedSysId.getRawBuffer(); if (fEntityHandler) { if (!fEntityHandler->expandSystemId(normalizedURI, expSysId)) @@ -1892,13 +1894,15 @@ InputSource* IGXMLScanner::resolveSystemId(const XMLCh* const sysId) { + //Normalize sysId + XMLBufBid nnSys(&fBufMgr); + XMLBuffer& normalizedSysId = nnSys.getBuffer(); + XMLString::removeChar(sysId, 0xFFFF, normalizedSysId); + const XMLCh* normalizedURI = normalizedSysId.getRawBuffer(); + // Create a buffer for expanding the system id XMLBufBid bbSys(&fBufMgr); XMLBuffer& expSysId = bbSys.getBuffer(); - - XMLBuffer& normalizedSysId = bbSys.getBuffer(); - XMLString::removeChar(sysId, 0xFFFF, normalizedSysId); - const XMLCh* normalizedURI = normalizedSysId.getRawBuffer(); // Allow the entity handler to expand the system id if they choose // to do so. 1.27 +11 -8 xml-xerces/c/src/xercesc/internal/ReaderMgr.cpp Index: ReaderMgr.cpp =================================================================== RCS file: /home/cvs/xml-xerces/c/src/xercesc/internal/ReaderMgr.cpp,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- ReaderMgr.cpp 22 Jun 2004 09:42:48 -0000 1.26 +++ ReaderMgr.cpp 28 Jun 2004 18:35:27 -0000 1.27 @@ -507,13 +507,14 @@ , InputSource*& srcToFill , const bool calcSrcOfs) { - // Create a buffer for expanding the system id - XMLBuffer expSysId(1023, fMemoryManager); - - XMLBuffer& normalizedSysId = expSysId; + //Normalize sysId + XMLBuffer normalizedSysId(1023, fMemoryManager); XMLString::removeChar(sysId, 0xFFFF, normalizedSysId); const XMLCh* normalizedURI = normalizedSysId.getRawBuffer(); + // Create a buffer for expanding the system id + XMLBuffer expSysId(1023, fMemoryManager); + // // Allow the entity handler to expand the system id if they choose // to do so. @@ -653,12 +654,14 @@ , InputSource*& srcToFill , const bool calcSrcOfs) { + //Normalize sysId + XMLBuffer normalizedSysId(1023, fMemoryManager); + XMLString::removeChar(sysId, 0xFFFF, normalizedSysId); + const XMLCh* normalizedURI = normalizedSysId.getRawBuffer(); + // Create a buffer for expanding the system id XMLBuffer expSysId(1023, fMemoryManager); - XMLBuffer& normalizedSysId = expSysId; - XMLString::removeChar(sysId, 0xFFFF, normalizedSysId); - const XMLCh* normalizedURI = normalizedSysId.getRawBuffer(); // // Allow the entity handler to expand the system id if they choose // to do so. 1.86 +13 -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.85 retrieving revision 1.86 diff -u -r1.85 -r1.86 --- SGXMLScanner.cpp 21 Jun 2004 18:02:13 -0000 1.85 +++ SGXMLScanner.cpp 28 Jun 2004 18:35:27 -0000 1.86 @@ -3635,17 +3635,19 @@ parser.setUserEntityHandler(fEntityHandler); parser.setUserErrorReporter(fErrorReporter); + //Normalize sysId + XMLBufBid nnSys(&fBufMgr); + XMLBuffer& normalizedSysId = nnSys.getBuffer(); + XMLString::removeChar(loc, 0xFFFF, normalizedSysId); + const XMLCh* normalizedURI = normalizedSysId.getRawBuffer(); + // Create a buffer for expanding the system id XMLBufBid bbSys(&fBufMgr); XMLBuffer& expSysId = bbSys.getBuffer(); - XMLBuffer& normalizedSysId = bbSys.getBuffer(); - - XMLString::removeChar(loc, 0xFFFF, normalizedSysId); // Allow the entity handler to expand the system id if they choose // to do so. InputSource* srcToFill = 0; - const XMLCh* normalizedURI = normalizedSysId.getRawBuffer(); if (fEntityHandler) { if (!fEntityHandler->expandSystemId(normalizedURI, expSysId)) @@ -3794,13 +3796,15 @@ InputSource* SGXMLScanner::resolveSystemId(const XMLCh* const sysId) { + //Normalize sysId + XMLBufBid nnSys(&fBufMgr); + XMLBuffer& normalizedSysId = nnSys.getBuffer(); + XMLString::removeChar(sysId, 0xFFFF, normalizedSysId); + const XMLCh* normalizedURI = normalizedSysId.getRawBuffer(); + // Create a buffer for expanding the system id XMLBufBid bbSys(&fBufMgr); XMLBuffer& expSysId = bbSys.getBuffer(); - - XMLBuffer& normalizedSysId = bbSys.getBuffer(); - XMLString::removeChar(sysId, 0xFFFF, normalizedSysId); - const XMLCh* normalizedURI = normalizedSysId.getRawBuffer(); // Allow the entity handler to expand the system id if they choose // to do so.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]