dbertoni 01/06/14 12:25:56
Modified: c/src/XSLT StylesheetRoot.cpp
Log:
Use new StringTokenizer overload.
Revision Changes Path
1.44 +14 -7 xml-xalan/c/src/XSLT/StylesheetRoot.cpp
Index: StylesheetRoot.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/StylesheetRoot.cpp,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- StylesheetRoot.cpp 2001/05/02 15:56:00 1.43
+++ StylesheetRoot.cpp 2001/06/14 19:25:53 1.44
@@ -196,8 +196,6 @@
setupFormatterListener(outputTarget, executionContext);
- executionContext.resetCurrentState(sourceTree);
-
executionContext.setRootDocument(sourceTree);
if(executionContext.doDiagnosticsOutput())
@@ -486,16 +484,25 @@
}
else
if(equals(aname,Constants::ATTRNAME_OUTPUT_CDATA_SECTION_ELEMENTS))
{
- StringTokenizer tokenizer(atts.getValue(i));
+ StringTokenizer theTokenizer(atts.getValue(i));
+
+ unsigned int theTokenCount =
+ theTokenizer.countTokens();
+
+ m_cdataSectionElems.reserve(theTokenCount);
- while(tokenizer.hasMoreTokens())
+ XalanDOMString theToken;
+
+ while(theTokenCount > 0)
{
- const XalanDOMString token = tokenizer.nextToken();
+ theTokenizer.nextToken(theToken);
- const QNameByValue qname(token,
getNamespaces());
+ --theTokenCount;
- m_cdataSectionElems.push_back(qname);
+ m_cdataSectionElems.push_back(QNameByValue(theToken,
getNamespaces()));
}
+
+ assert(theTokenizer.hasMoreTokens() == false);
}
else if (isAttrOK(aname, atts, i, constructionContext) == false)
{
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]