knoaman 2003/01/02 08:38:00
Modified: c/src/xercesc/internal ElemStack.cpp
Log:
Some cleanup.
Revision Changes Path
1.4 +13 -12 xml-xerces/c/src/xercesc/internal/ElemStack.cpp
Index: ElemStack.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/xercesc/internal/ElemStack.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ElemStack.cpp 4 Dec 2002 02:23:50 -0000 1.3
+++ ElemStack.cpp 2 Jan 2003 16:38:00 -0000 1.4
@@ -56,6 +56,9 @@
/*
* $Log$
+ * Revision 1.4 2003/01/02 16:38:00 knoaman
+ * Some cleanup.
+ *
* Revision 1.3 2002/12/04 02:23:50 knoaman
* Scanner re-organization.
*
@@ -234,8 +237,8 @@
}
// Set up the new top row
- fStack[fStackTop]->fThisElement = 0;
- fStack[fStackTop]->fReaderNum = 0xFFFFFFFF;
+ fStack[fStackTop]->fThisElement = toSet;
+ fStack[fStackTop]->fReaderNum = readerNum;
fStack[fStackTop]->fChildCount = 0;
fStack[fStackTop]->fMapCount = 0;
fStack[fStackTop]->fValidationFlag = false;
@@ -243,10 +246,6 @@
fStack[fStackTop]->fCurrentScope = Grammar::TOP_LEVEL_SCOPE;
fStack[fStackTop]->fCurrentGrammar = 0;
- // And store the new stuff
- fStack[fStackTop]->fThisElement = toSet;
- fStack[fStackTop]->fReaderNum = readerNum;
-
// Bump the top of stack
fStackTop++;
@@ -459,14 +458,16 @@
, const unsigned int xmlId
, const unsigned int xmlNSId)
{
- // Flush the prefix pool and put back in the standard prefixes
- fPrefixPool.flushAll();
- fGlobalPoolId = fPrefixPool.addOrFind(XMLUni::fgZeroLenString);
- fXMLPoolId = fPrefixPool.addOrFind(XMLUni::fgXMLString);
- fXMLNSPoolId = fPrefixPool.addOrFind(XMLUni::fgXMLNSString);
-
// Reset the stack top to clear the stack
fStackTop = 0;
+
+ // if first time, put in the standard prefixes
+ if (fXMLPoolId == 0) {
+
+ fGlobalPoolId = fPrefixPool.addOrFind(XMLUni::fgZeroLenString);
+ fXMLPoolId = fPrefixPool.addOrFind(XMLUni::fgXMLString);
+ fXMLNSPoolId = fPrefixPool.addOrFind(XMLUni::fgXMLNSString);
+ }
// And store the new special URI ids
fEmptyNamespaceId = emptyId;
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]