You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by db...@apache.org on 2008/09/17 21:57:50 UTC
svn commit: r696420 [2/2] - in /xalan/c/trunk: samples/DocumentBuilder/
src/xalanc/DOMSupport/ src/xalanc/Harness/ src/xalanc/ICUBridge/
src/xalanc/NLS/en_US/ src/xalanc/PlatformSupport/ src/xalanc/TestXPath/
src/xalanc/XMLSupport/ src/xalanc/XPath/ sr...
Modified: xalan/c/trunk/src/xalanc/XSLT/ElemAttribute.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XSLT/ElemAttribute.cpp?rev=696420&r1=696419&r2=696420&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XSLT/ElemAttribute.cpp (original)
+++ xalan/c/trunk/src/xalanc/XSLT/ElemAttribute.cpp Wed Sep 17 12:57:48 2008
@@ -156,7 +156,7 @@
assign(origAttrName, attrName);
- const XalanDOMString::size_type origAttrNameLength = length(origAttrName);
+ const XalanDOMString::size_type origAttrNameLength = origAttrName.length();
XalanDOMString::size_type indexOfNSSep = 0;
@@ -170,7 +170,7 @@
indexOfNSSep = indexOf(origAttrName, XalanUnicode::charColon);
- if(isEmpty(attrNameSpace))
+ if (attrNameSpace.empty())
{
// If there's no namespace, but the attribute has a
// prefix, then we must strip the prefix off.
@@ -195,23 +195,20 @@
// it's equal to the prefix on the attribute, then go ahead
// and use that prefix.
if(prefix != 0 &&
- length(*prefix) != 0 &&
+ prefix->empty() == false &&
(indexOfNSSep == origAttrNameLength ||
- equals(c_wstr(*prefix), c_wstr(attrName), indexOfNSSep) == true))
+ equals(prefix->c_str(), attrName.c_str(), indexOfNSSep) == true))
{
if(indexOfNSSep < origAttrNameLength)
{
- reserve(
- attrName,
- length(attrName) - (indexOfNSSep + 1) + DOMServices::s_XMLNamespaceSeparatorStringLength + length(*prefix) + 1);
+ attrName.reserve(attrName.length() - (indexOfNSSep + 1) + DOMServices::s_XMLNamespaceSeparatorStringLength + prefix->length() + 1);
attrName.erase(0, indexOfNSSep + 1);
}
else
{
- reserve(
- attrName,
- length(attrName) + DOMServices::s_XMLNamespaceSeparatorStringLength + length(*prefix) + 1);
+ attrName.reserve(
+ attrName.length() + DOMServices::s_XMLNamespaceSeparatorStringLength + prefix->length() + 1);
}
insert(attrName, 0, DOMServices::s_XMLNamespaceSeparatorString);
@@ -253,7 +250,7 @@
}
}
- if (length(newPrefix) == 0)
+ if (newPrefix.empty() == true)
{
// If there's a prefix, and it's xmlns, then strip it
// off...
@@ -266,9 +263,8 @@
executionContext.getUniqueNamespaceValue(newPrefix);
// Reserve some space in the string.
- reserve(
- attrName,
- length(attrName) + DOMServices::s_XMLNamespaceSeparatorStringLength + length(newPrefix) + 1);
+ attrName.reserve(
+ attrName.length() + DOMServices::s_XMLNamespaceSeparatorStringLength + newPrefix.length() + 1);
insert(attrName, 0, DOMServices::s_XMLNamespaceSeparatorString);
insert(attrName, 0, newPrefix);
@@ -279,7 +275,7 @@
XalanDOMString& nsDecl = nsDeclGuard.get();
- reserve(nsDecl, DOMServices::s_XMLNamespaceWithSeparatorLength + length(newPrefix) + 1);
+ nsDecl.reserve(DOMServices::s_XMLNamespaceWithSeparatorLength + newPrefix.length() + 1);
assign(nsDecl, DOMServices::s_XMLNamespaceWithSeparator);
@@ -344,7 +340,7 @@
}
}
- if (isEmpty(attrNameSpace))
+ if (attrNameSpace.empty())
{
warn(
executionContext,
@@ -364,7 +360,7 @@
XalanDOMString& nsDecl = nsDeclGuard.get();
- reserve(nsDecl, DOMServices::s_XMLNamespaceWithSeparatorLength + length(nsprefix) + 1);
+ nsDecl.reserve(DOMServices::s_XMLNamespaceWithSeparatorLength + nsprefix.length() + 1);
assign(nsDecl, DOMServices::s_XMLNamespaceWithSeparator);
@@ -387,7 +383,7 @@
// If there was no namespace, or the namespace was resolved, process
// the result attribute.
- if (indexOfNSSep == origAttrNameLength || !isEmpty(attrNameSpace))
+ if (indexOfNSSep == origAttrNameLength || !attrNameSpace.empty())
{
executionContext.pushProcessCurrentAttribute(true);
executionContext.pushCopyTextNodesOnly(true);
@@ -473,7 +469,7 @@
indexOfNSSep = indexOf(origAttrName, XalanUnicode::charColon);
- if(isEmpty(attrNameSpace))
+ if(attrNameSpace.empty())
{
// If there's no namespace, but the attribute has a
// prefix, then we must strip the prefix off.
@@ -500,7 +496,7 @@
if(prefix != 0 &&
length(*prefix) != 0 &&
(indexOfNSSep == origAttrNameLength ||
- equals(c_wstr(*prefix), c_wstr(attrName), indexOfNSSep) == true))
+ equals(prefix->c_str(), attrName.c_str(), indexOfNSSep) == true))
{
if(indexOfNSSep < origAttrNameLength)
{
@@ -648,7 +644,7 @@
}
}
- if (isEmpty(attrNameSpace))
+ if (attrNameSpace.empty())
{
// Could not resolve prefix
warn(
@@ -691,7 +687,7 @@
// If there was no namespace, or the namespace was resolved, process
// the result attribute.
- if (indexOfNSSep == origAttrNameLength || !isEmpty(attrNameSpace))
+ if (indexOfNSSep == origAttrNameLength || !attrNameSpace.empty())
{
StylesheetExecutionContext::SetAndRestoreCopyTextNodesOnly theSetAndRestore(executionContext, true);
Modified: xalan/c/trunk/src/xalanc/XSLT/ElemComment.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XSLT/ElemComment.cpp?rev=696420&r1=696419&r2=696420&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XSLT/ElemComment.cpp (original)
+++ xalan/c/trunk/src/xalanc/XSLT/ElemComment.cpp Wed Sep 17 12:57:48 2008
@@ -148,7 +148,7 @@
++theCurrent;
}
- executionContext.comment(c_wstr(theResult));
+ executionContext.comment(theResult.c_str());
executionContext.popCopyTextNodesOnly();
}
Modified: xalan/c/trunk/src/xalanc/XSLT/ElemCopy.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XSLT/ElemCopy.cpp?rev=696420&r1=696419&r2=696420&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XSLT/ElemCopy.cpp (original)
+++ xalan/c/trunk/src/xalanc/XSLT/ElemCopy.cpp Wed Sep 17 12:57:48 2008
@@ -166,7 +166,7 @@
{
endExecuteChildren(executionContext);
- executionContext.endElement(c_wstr(sourceNode->getNodeName()));
+ executionContext.endElement(sourceNode->getNodeName().c_str());
ElemUse::endElement(executionContext);
}
@@ -209,7 +209,7 @@
executeChildren(executionContext);
- executionContext.endElement(c_wstr(sourceNode->getNodeName()));
+ executionContext.endElement(sourceNode->getNodeName().c_str());
}
else
{
Modified: xalan/c/trunk/src/xalanc/XSLT/ElemDecimalFormat.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XSLT/ElemDecimalFormat.cpp?rev=696420&r1=696419&r2=696420&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XSLT/ElemDecimalFormat.cpp (original)
+++ xalan/c/trunk/src/xalanc/XSLT/ElemDecimalFormat.cpp Wed Sep 17 12:57:48 2008
@@ -270,12 +270,12 @@
}
}
- if (length(m_decimalFormatSymbols.getInfinity()) == 0)
+ if (m_decimalFormatSymbols.getInfinity().empty() == true)
{
m_decimalFormatSymbols.setInfinity(Constants::ATTRVAL_INFINITY);
}
- if (length(m_decimalFormatSymbols.getNaN()) == 0)
+ if (m_decimalFormatSymbols.getNaN().empty() == true)
{
m_decimalFormatSymbols.setNaN(Constants::ATTRVAL_NAN);
}
Modified: xalan/c/trunk/src/xalanc/XSLT/ElemElement.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XSLT/ElemElement.cpp?rev=696420&r1=696419&r2=696420&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XSLT/ElemElement.cpp (original)
+++ xalan/c/trunk/src/xalanc/XSLT/ElemElement.cpp Wed Sep 17 12:57:48 2008
@@ -160,9 +160,9 @@
m_namespaceAVT->evaluate(elemNameSpace, *this, executionContext);
}
- XalanDOMString::size_type namespaceLen = length(elemNameSpace);
+ XalanDOMString::size_type namespaceLen = elemNameSpace.length();
- XalanDOMString::size_type len = length(elemName);
+ XalanDOMString::size_type len = elemName.length();
const XalanDOMString::size_type indexOfNSSep = indexOf(elemName, XalanUnicode::charColon);
@@ -210,7 +210,7 @@
if (isIllegalElement == false)
{
- executionContext.startElement(c_wstr(elemName));
+ executionContext.startElement(elemName.c_str());
if(0 == m_namespaceAVT &&
havePrefix == false )
@@ -247,14 +247,8 @@
const XalanDOMString& theParentDefaultNamespace =
getParentDefaultNamespace();
- if (length(theParentDefaultNamespace) == 0)
- {
- if (executionContext.getResultNamespaceForPrefix(s_emptyString) != 0)
- {
- executionContext.addResultAttribute(DOMServices::s_XMLNamespace, elemNameSpace);
- }
- }
- else
+ if (theParentDefaultNamespace.empty() == false ||
+ executionContext.getResultNamespaceForPrefix(s_emptyString) != 0)
{
executionContext.addResultAttribute(DOMServices::s_XMLNamespace, elemNameSpace);
}
@@ -304,7 +298,7 @@
if (!ignoreAttributeElements)
{
- executionContext.endElement(c_wstr(elemName));
+ executionContext.endElement(elemName.c_str());
ElemUse::endElement(executionContext);
}
}
@@ -419,7 +413,7 @@
if (isIllegalElement == false)
{
- executionContext.startElement(c_wstr(elemName));
+ executionContext.startElement(elemName.c_str());
if(0 == m_namespaceAVT &&
(havePrefix == false || foundResultNamespaceForPrefix == true))
@@ -497,7 +491,7 @@
doExecuteChildren(executionContext, false);
- executionContext.endElement(c_wstr(elemName));
+ executionContext.endElement(elemName.c_str());
}
}
}
Modified: xalan/c/trunk/src/xalanc/XSLT/ElemForEach.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XSLT/ElemForEach.cpp?rev=696420&r1=696419&r2=696420&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XSLT/ElemForEach.cpp (original)
+++ xalan/c/trunk/src/xalanc/XSLT/ElemForEach.cpp Wed Sep 17 12:57:48 2008
@@ -395,7 +395,7 @@
bool treatAsNumbers = false;
- if (isEmpty(scratchString) == false)
+ if (scratchString.empty() == false)
{
if (equals(scratchString, Constants::ATTRVAL_DATATYPE_NUMBER) == true)
{
@@ -433,7 +433,7 @@
bool descending = false;
- if (isEmpty(scratchString) == false)
+ if (scratchString.empty() == false)
{
if (equals(scratchString, Constants::ATTRVAL_ORDER_DESCENDING) == true)
{
@@ -459,7 +459,7 @@
XalanCollationServices::eCaseOrder caseOrder = XalanCollationServices::eDefault;
- if (isEmpty(scratchString) == false)
+ if (scratchString.empty() == false)
{
if (equals(scratchString, Constants::ATTRVAL_CASEORDER_UPPER) == true)
{
@@ -589,7 +589,7 @@
bool treatAsNumbers = false;
- if (isEmpty(scratchString) == false)
+ if (scratchString.empty() == false)
{
if (equals(scratchString, Constants::ATTRVAL_DATATYPE_NUMBER) == true)
{
@@ -625,7 +625,7 @@
bool descending = false;
- if (isEmpty(scratchString) == false)
+ if (scratchString.empty() == false)
{
if (equals(scratchString, Constants::ATTRVAL_ORDER_DESCENDING) == true)
{
@@ -650,7 +650,7 @@
XalanCollationServices::eCaseOrder caseOrder = XalanCollationServices::eDefault;
- if (isEmpty(scratchString) == false)
+ if (scratchString.empty() == false)
{
if (equals(scratchString, Constants::ATTRVAL_CASEORDER_UPPER) == true)
{
Modified: xalan/c/trunk/src/xalanc/XSLT/ElemLiteralResult.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XSLT/ElemLiteralResult.cpp?rev=696420&r1=696419&r2=696420&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XSLT/ElemLiteralResult.cpp (original)
+++ xalan/c/trunk/src/xalanc/XSLT/ElemLiteralResult.cpp Wed Sep 17 12:57:48 2008
@@ -227,7 +227,7 @@
const XalanDOMString::size_type theColonIndex = indexOf(theName, XalanUnicode::charColon);
- if (theColonIndex != length(theName))
+ if (theColonIndex != theName.length())
{
if (thePrefix.length() == theColonIndex &&
startsWith(theName, thePrefix) == true)
@@ -323,7 +323,7 @@
{
const XalanDOMString& theElementName = getElementName();
- executionContext.startElement(c_wstr(theElementName));
+ executionContext.startElement(theElementName.c_str());
ElemUse::startElement(executionContext);
@@ -365,7 +365,7 @@
{
endExecuteChildren(executionContext);
- executionContext.endElement(c_wstr(getElementName()));
+ executionContext.endElement(getElementName().c_str());
ElemUse::endElement(executionContext);
}
@@ -405,7 +405,7 @@
{
const XalanDOMString& theElementName = getElementName();
- executionContext.startElement(c_wstr(theElementName));
+ executionContext.startElement(theElementName.c_str());
ElemUse::execute(executionContext);
@@ -459,7 +459,7 @@
executeChildren(executionContext);
- executionContext.endElement(c_wstr(theElementName));
+ executionContext.endElement(theElementName.c_str());
}
#endif
Modified: xalan/c/trunk/src/xalanc/XSLT/ElemSort.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XSLT/ElemSort.cpp?rev=696420&r1=696419&r2=696420&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XSLT/ElemSort.cpp (original)
+++ xalan/c/trunk/src/xalanc/XSLT/ElemSort.cpp Wed Sep 17 12:57:48 2008
@@ -104,8 +104,8 @@
m_dataTypeAVT =
constructionContext.createAVT(
getLocator(),
- c_wstr(Constants::ATTRNAME_DATATYPE),
- c_wstr(Constants::ATTRVAL_DATATYPE_TEXT),
+ Constants::ATTRNAME_DATATYPE.c_str(),
+ Constants::ATTRVAL_DATATYPE_TEXT.c_str(),
*this);
}
@@ -114,8 +114,8 @@
m_orderAVT =
constructionContext.createAVT(
getLocator(),
- c_wstr(Constants::ATTRNAME_ORDER),
- c_wstr(Constants::ATTRVAL_ORDER_ASCENDING),
+ Constants::ATTRNAME_ORDER.c_str(),
+ Constants::ATTRVAL_ORDER_ASCENDING.c_str(),
*this);
}
}
Modified: xalan/c/trunk/src/xalanc/XSLT/ElemTemplateElement.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XSLT/ElemTemplateElement.cpp?rev=696420&r1=696419&r2=696420&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XSLT/ElemTemplateElement.cpp (original)
+++ xalan/c/trunk/src/xalanc/XSLT/ElemTemplateElement.cpp Wed Sep 17 12:57:48 2008
@@ -349,7 +349,7 @@
}
else
{
- reserve(result, length(result) + 1024);
+ result.reserve(result.length() + 1024);
executionContext.beginFormatToText(result);
@@ -1196,12 +1196,12 @@
{
const XalanDOMString& val = child->getNodeValue();
- const XalanDOMString::size_type len = length(val);
+ const XalanDOMString::size_type len = val.length();
if (len > 0)
{
executionContext.characters(
- toCharArray(val),
+ val.c_str(),
0,
len);
}
@@ -1331,7 +1331,7 @@
if (len > 0)
{
executionContext.characters(
- toCharArray(val),
+ val.c_str(),
0,
len);
}
Modified: xalan/c/trunk/src/xalanc/XSLT/ExtensionFunctionHandler.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XSLT/ExtensionFunctionHandler.cpp?rev=696420&r1=696419&r2=696420&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XSLT/ExtensionFunctionHandler.cpp (original)
+++ xalan/c/trunk/src/xalanc/XSLT/ExtensionFunctionHandler.cpp Wed Sep 17 12:57:48 2008
@@ -87,7 +87,7 @@
void
ExtensionFunctionHandler::setFunctions(const XalanDOMString& funcNames)
{
- if (isEmpty(funcNames))
+ if (funcNames.empty())
{
return;
}
Modified: xalan/c/trunk/src/xalanc/XSLT/ExtensionNSHandler.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XSLT/ExtensionNSHandler.cpp?rev=696420&r1=696419&r2=696420&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XSLT/ExtensionNSHandler.cpp (original)
+++ xalan/c/trunk/src/xalanc/XSLT/ExtensionNSHandler.cpp Wed Sep 17 12:57:48 2008
@@ -144,7 +144,7 @@
void
ExtensionNSHandler::setElements(const XalanDOMString& elemNames)
{
- if (length(elemNames) != 0)
+ if (elemNames.empty() == false)
{
StringTokenizer st(elemNames, s_tokenDelimiterCharacters, false);
Modified: xalan/c/trunk/src/xalanc/XSLT/FunctionFormatNumber.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XSLT/FunctionFormatNumber.cpp?rev=696420&r1=696419&r2=696420&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XSLT/FunctionFormatNumber.cpp (original)
+++ xalan/c/trunk/src/xalanc/XSLT/FunctionFormatNumber.cpp Wed Sep 17 12:57:48 2008
@@ -82,7 +82,7 @@
const XalanDOMString& thePattern = arg2->str(executionContext);
const XalanDOMString& theDFSName = arg3->str(executionContext);
- assert(length(theDFSName) != 0);
+ assert(theDFSName.empty() == false);
GetCachedString theString(executionContext);
Modified: xalan/c/trunk/src/xalanc/XSLT/FunctionKey.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XSLT/FunctionKey.cpp?rev=696420&r1=696419&r2=696420&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XSLT/FunctionKey.cpp (original)
+++ xalan/c/trunk/src/xalanc/XSLT/FunctionKey.cpp Wed Sep 17 12:57:48 2008
@@ -68,7 +68,7 @@
{
assert(context != 0);
- if (indexOf(keyname, XalanUnicode::charColon) < length(keyname))
+ if (indexOf(keyname, XalanUnicode::charColon) < keyname.length())
{
executionContext.getNodeSetByKey(
context,
Modified: xalan/c/trunk/src/xalanc/XSLT/FunctionSystemProperty.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XSLT/FunctionSystemProperty.cpp?rev=696420&r1=696419&r2=696420&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XSLT/FunctionSystemProperty.cpp (original)
+++ xalan/c/trunk/src/xalanc/XSLT/FunctionSystemProperty.cpp Wed Sep 17 12:57:48 2008
@@ -114,7 +114,7 @@
assert(arg1.null() == false);
const XalanDOMString& fullName = arg1->str(executionContext);
- const XalanDOMString::size_type fullNameLength = length(fullName);
+ const XalanDOMString::size_type fullNameLength = fullName.length();
const XalanDOMString::size_type indexOfNSSep = indexOf(fullName, XalanUnicode::charColon);
if(indexOfNSSep < fullNameLength)
Modified: xalan/c/trunk/src/xalanc/XSLT/NamespacesHandler.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XSLT/NamespacesHandler.cpp?rev=696420&r1=696419&r2=696420&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XSLT/NamespacesHandler.cpp (original)
+++ xalan/c/trunk/src/xalanc/XSLT/NamespacesHandler.cpp Wed Sep 17 12:57:48 2008
@@ -523,7 +523,7 @@
XalanDOMString& thePrefix = theGuard.get();
- if (indexOfNSSep < length(theElementName))
+ if (indexOfNSSep < theElementName.length())
{
substring(theElementName, thePrefix, 0, indexOfNSSep);
}
@@ -609,10 +609,10 @@
// there's a prefix (so it's not the default), we can continue
// to see if we need to add the result namespace.
if (supressDefault == false ||
- length(thePrefix) != 0)
+ thePrefix.empty() == false)
{
const XalanDOMString& theResultURI = theNamespace.getURI();
- assert(length(theNamespace.getResultAttributeName()) > 0);
+ assert(theNamespace.getResultAttributeName().empty() == false);
// Get the any namespace declaration currently active for the
// prefix.
@@ -718,12 +718,12 @@
const XalanDOMString& thePrefix = theNamespace.getPrefix();
- if (isEmpty(thePrefix) == false)
+ if (thePrefix.empty() == false)
{
// Create a name of the form xmlns:prefix, where "prefix" is the
// text of the prefix.
// Reserve the appropriate amount of space in the string.
- reserve(theName, DOMServices::s_XMLNamespaceWithSeparatorLength + length(thePrefix) + 1);
+ theName.reserve(DOMServices::s_XMLNamespaceWithSeparatorLength + thePrefix.length() + 1);
theName = DOMServices::s_XMLNamespaceWithSeparator;
theName += thePrefix;
Modified: xalan/c/trunk/src/xalanc/XSLT/NodeSorter.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XSLT/NodeSorter.cpp?rev=696420&r1=696419&r2=696420&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XSLT/NodeSorter.cpp (original)
+++ xalan/c/trunk/src/xalanc/XSLT/NodeSorter.cpp Wed Sep 17 12:57:48 2008
@@ -139,7 +139,7 @@
const XalanDOMString& theLanguage,
XalanCollationServices::eCaseOrder theCaseOrder)
{
- if (length(theLanguage) == 0)
+ if (theLanguage.empty() == true)
{
return executionContext.collationCompare(
theLHS,
Modified: xalan/c/trunk/src/xalanc/XSLT/Stylesheet.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XSLT/Stylesheet.cpp?rev=696420&r1=696419&r2=696420&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XSLT/Stylesheet.cpp (original)
+++ xalan/c/trunk/src/xalanc/XSLT/Stylesheet.cpp Wed Sep 17 12:57:48 2008
@@ -118,7 +118,7 @@
m_elemDecimalFormats(constructionContext.getMemoryManager()),
m_namespacesHandler(constructionContext.getMemoryManager())
{
- if (length(m_baseIdent) == 0)
+ if (m_baseIdent.empty() == true)
{
m_includeStack.push_back(m_baseIdent);
}
@@ -132,7 +132,7 @@
constructionContext.getURLStringFromString(m_baseIdent, urlString);
- if (length(urlString) != 0)
+ if (urlString.empty() == false)
{
m_includeStack.push_back(urlString);
@@ -245,9 +245,9 @@
AttributeListImpl templateAttrs(constructionContext.getMemoryManager());
- templateAttrs.addAttribute(c_wstr(Constants::ATTRNAME_NAME),
- c_wstr(Constants::ATTRTYPE_CDATA),
- c_wstr(Constants::ATTRVAL_SIMPLE));
+ templateAttrs.addAttribute(Constants::ATTRNAME_NAME.c_str(),
+ Constants::ATTRTYPE_CDATA.c_str(),
+ Constants::ATTRVAL_SIMPLE.c_str());
ElemTemplateElement* const theNewTemplate =
constructionContext.createElement(
@@ -1287,7 +1287,7 @@
const XalanDOMString* patterns = matchPat->getPattern();
assert(patterns != 0);
- if(!isEmpty(*patterns) &&
+ if(!patterns->empty() &&
!(prevMatchPat != 0 &&
(prevPat != 0 && equals(*prevPat, *patterns)) &&
prevMatchPat->getTemplate()->getPriority() == matchPat->getTemplate()->getPriority()))
@@ -1573,7 +1573,7 @@
}
else
{
- assert(length(*stylesheetNamespace) != 0 && length(*resultNamespace) != 0);
+ assert(stylesheetNamespace->empty() == false && resultNamespace->empty() == false);
m_namespacesHandler.setNamespaceAlias(
constructionContext,
Modified: xalan/c/trunk/src/xalanc/XSLT/Stylesheet.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XSLT/Stylesheet.hpp?rev=696420&r1=696419&r2=696420&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XSLT/Stylesheet.hpp (original)
+++ xalan/c/trunk/src/xalanc/XSLT/Stylesheet.hpp Wed Sep 17 12:57:48 2008
@@ -303,7 +303,7 @@
const XalanDOMString& nodeName,
XalanDOMString& theBuffer) const
{
- return getNamespaceFromStack(c_wstr(nodeName), theBuffer);
+ return getNamespaceFromStack(nodeName.c_str(), theBuffer);
}
/**
Modified: xalan/c/trunk/src/xalanc/XSLT/StylesheetConstructionContextDefault.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XSLT/StylesheetConstructionContextDefault.cpp?rev=696420&r1=696419&r2=696420&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XSLT/StylesheetConstructionContextDefault.cpp (original)
+++ xalan/c/trunk/src/xalanc/XSLT/StylesheetConstructionContextDefault.cpp Wed Sep 17 12:57:48 2008
@@ -1382,7 +1382,7 @@
while(tokenizer.hasMoreTokens())
{
tokenizer.nextToken(qname);
- assert(length(qname) != 0);
+ assert(qname.empty() == false);
theResult[theCurrentIndex++] =
m_xalanQNameByValueAllocator.create(
Modified: xalan/c/trunk/src/xalanc/XSLT/StylesheetExecutionContextDefault.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XSLT/StylesheetExecutionContextDefault.cpp?rev=696420&r1=696419&r2=696420&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XSLT/StylesheetExecutionContextDefault.cpp (original)
+++ xalan/c/trunk/src/xalanc/XSLT/StylesheetExecutionContextDefault.cpp Wed Sep 17 12:57:48 2008
@@ -591,7 +591,7 @@
// the XPath, once the namespace is resolved, but it may
// not be worth it...
const XalanDOMString::size_type index = indexOf(str, XalanUnicode::charColon);
- const XalanDOMString::size_type len = length(str);
+ const XalanDOMString::size_type len = str.length();
// If we found a ':' before the end of the string, and
// it's by itself (:: would indicate an axis), don't
@@ -693,7 +693,7 @@
{
assert(m_xsltProcessor != 0);
- if (length(str) > 0)
+ if (str.empty() == false)
{
m_variablesStack.pushVariable(
name,
@@ -1586,11 +1586,11 @@
{
if (m_collationCompareFunctor == 0)
{
- return s_defaultCollationFunctor(c_wstr(theLHS), c_wstr(theRHS), theCaseOrder);
+ return s_defaultCollationFunctor(theLHS.c_str(), theRHS.c_str(), theCaseOrder);
}
else
{
- return (*m_collationCompareFunctor)(c_wstr(theLHS), c_wstr(theRHS), theCaseOrder);
+ return (*m_collationCompareFunctor)(theLHS.c_str(), theRHS.c_str(), theCaseOrder);
}
}
@@ -1605,11 +1605,11 @@
{
if (m_collationCompareFunctor == 0)
{
- return s_defaultCollationFunctor(c_wstr(theLHS), c_wstr(theRHS), c_wstr(theLocale), theCaseOrder);
+ return s_defaultCollationFunctor(theLHS.c_str(), theRHS.c_str(), theLocale.c_str(), theCaseOrder);
}
else
{
- return (*m_collationCompareFunctor)(c_wstr(theLHS), c_wstr(theRHS), c_wstr(theLocale), theCaseOrder);
+ return (*m_collationCompareFunctor)(theLHS.c_str(), theRHS.c_str(), theLocale.c_str(), theCaseOrder);
}
}
Modified: xalan/c/trunk/src/xalanc/XSLT/StylesheetHandler.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XSLT/StylesheetHandler.cpp?rev=696420&r1=696419&r2=696420&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XSLT/StylesheetHandler.cpp (original)
+++ xalan/c/trunk/src/xalanc/XSLT/StylesheetHandler.cpp Wed Sep 17 12:57:48 2008
@@ -297,15 +297,15 @@
const ElemTemplateStackType::size_type origStackSize = m_elemStack.size();
- if(equals(*ns, m_constructionContext.getXSLTNamespaceURI()))
+ if (equals(*ns, m_constructionContext.getXSLTNamespaceURI()))
{
- if(!isEmpty(m_stylesheet.getXSLTNamespaceURI()))
+ if (!m_stylesheet.getXSLTNamespaceURI().empty())
m_stylesheet.setXSLTNamespaceURI(*ns);
const StylesheetConstructionContext::eElementToken xslToken =
m_constructionContext.getElementToken(m_elementLocalName);
- if(!m_inTemplate)
+ if (!m_inTemplate)
{
processTopLevelElement(name, atts, xslToken, locator, fPreserveSpace, fSpaceAttrProcessed);
}
@@ -622,7 +622,7 @@
{
elem = initWrapperless(name, atts, locator);
}
- else if (length(*ns) == 0 && m_elemStack.size() == 1)
+ else if (ns->empty() == true && m_elemStack.size() == 1)
{
const GetCachedString theGuard(m_constructionContext);
@@ -646,7 +646,7 @@
// is this an extension element call?
ExtensionNSHandler* nsh = 0;
- if (!isEmpty(*ns) &&
+ if (!ns->empty() &&
((nsh = m_stylesheet.lookupExtensionNSHandler(*ns)) != 0))
{
elem = m_constructionContext.createElement(
@@ -745,7 +745,7 @@
{
// If there's a default namespace, then we must output XML.
// Otherwise, we'll set the output method to HTML.
- if (atts.getValue(c_wstr(DOMServices::s_XMLNamespace)) == 0)
+ if (atts.getValue(DOMServices::s_XMLNamespace.c_str()) == 0)
{
m_stylesheet.getStylesheetRoot().setIndentResult(true);
m_stylesheet.getStylesheetRoot().setOutputMethod(OUTPUT_METHOD_HTML);
@@ -1331,7 +1331,7 @@
includeStack.back(),
hrefUrl);
- assert(length(hrefUrl) != 0);
+ assert(hrefUrl.empty() == false);
Stylesheet::URLStackType& importStack = m_stylesheet.getStylesheetRoot().getImportStack();
@@ -1422,7 +1422,7 @@
href.assign(atts.getValue(i));
- assert(c_wstr(m_stylesheet.getIncludeStack().back()) != 0);
+ assert(m_stylesheet.getIncludeStack().back().c_str() != 0);
m_constructionContext.getURLStringFromString(href, m_stylesheet.getIncludeStack().back(), hrefUrl);
@@ -1734,9 +1734,9 @@
void
StylesheetHandler::processAccumulatedText()
{
- if (isEmpty(m_accumulateText) == false)
+ if (m_accumulateText.empty() == false)
{
- processText(m_accumulateText.c_str(), length(m_accumulateText));
+ processText(m_accumulateText.c_str(), m_accumulateText.length());
clear(m_accumulateText);
}
Modified: xalan/c/trunk/src/xalanc/XSLT/StylesheetRoot.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XSLT/StylesheetRoot.cpp?rev=696420&r1=696419&r2=696420&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XSLT/StylesheetRoot.cpp (original)
+++ xalan/c/trunk/src/xalanc/XSLT/StylesheetRoot.cpp Wed Sep 17 12:57:48 2008
@@ -310,23 +310,23 @@
{
// Do encoding stuff here...
}
- else if(0 != outputTarget.getCharacterStream() ||
- 0 != outputTarget.getByteStream() ||
- 0 != outputTarget.getStream() ||
- 0 != length(outputTarget.getFileName()))
+ else if (0 != outputTarget.getCharacterStream() ||
+ 0 != outputTarget.getByteStream() ||
+ 0 != outputTarget.getStream() ||
+ !outputTarget.getFileName().empty())
{
/*
* Output target has a character or byte stream or file
*/
Writer* pw = 0;
- if(0 != outputTarget.getCharacterStream())
+ if (0 != outputTarget.getCharacterStream())
{
pw = outputTarget.getCharacterStream();
}
else
{
- if(0 != outputTarget.getByteStream())
+ if (0 != outputTarget.getByteStream())
{
pw = executionContext.createPrintWriter(*outputTarget.getByteStream());
}
@@ -334,7 +334,7 @@
{
pw = executionContext.createPrintWriter(outputTarget.getStream());
}
- else if(!isEmpty(outputTarget.getFileName()))
+ else if (!outputTarget.getFileName().empty())
{
const GetCachedString theGuard(executionContext);
Modified: xalan/c/trunk/src/xalanc/XSLT/TraceListenerDefault.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XSLT/TraceListenerDefault.cpp?rev=696420&r1=696419&r2=696420&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XSLT/TraceListenerDefault.cpp (original)
+++ xalan/c/trunk/src/xalanc/XSLT/TraceListenerDefault.cpp Wed Sep 17 12:57:48 2008
@@ -170,7 +170,7 @@
const XalanDOMString& theNamespace =
theName.getNamespace();
- if (isEmpty(theNamespace) == false)
+ if (theNamespace.empty() == false)
{
m_printWriter.print(theNamespace);
m_printWriter.print(":");
Modified: xalan/c/trunk/src/xalanc/XSLT/XResultTreeFrag.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XSLT/XResultTreeFrag.cpp?rev=696420&r1=696419&r2=696420&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XSLT/XResultTreeFrag.cpp (original)
+++ xalan/c/trunk/src/xalanc/XSLT/XResultTreeFrag.cpp Wed Sep 17 12:57:48 2008
@@ -175,7 +175,7 @@
return *m_singleTextChildValue;
}
- else if (isEmpty(m_cachedStringValue) == true)
+ else if (m_cachedStringValue.empty() == true)
{
DOMServices::getNodeData(
*m_value,
@@ -210,7 +210,7 @@
XObject::string(*m_singleTextChildValue, formatterListener, function);
}
- else if (isEmpty(m_cachedStringValue) == false)
+ else if (m_cachedStringValue.empty() == false)
{
XObject::string(m_cachedStringValue, formatterListener, function);
}
@@ -242,7 +242,7 @@
{
theBuffer.append(*m_singleTextChildValue);
}
- else if (isEmpty(m_cachedStringValue) == false)
+ else if (m_cachedStringValue.empty() == false)
{
theBuffer.append(m_cachedStringValue);
}
Modified: xalan/c/trunk/src/xalanc/XSLT/XSLTEngineImpl.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XSLT/XSLTEngineImpl.cpp?rev=696420&r1=696419&r2=696420&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XSLT/XSLTEngineImpl.cpp (original)
+++ xalan/c/trunk/src/xalanc/XSLT/XSLTEngineImpl.cpp Wed Sep 17 12:57:48 2008
@@ -449,7 +449,7 @@
StylesheetConstructionContext& constructionContext)
{
const XSLTInputSource input(
- c_wstr(xsldocURLString),
+ xsldocURLString.c_str(),
constructionContext.getMemoryManager());
return processStylesheet(input, constructionContext);
@@ -917,7 +917,7 @@
// be active, so we never want to error out here.
try
{
- if (length(xmlBaseIdent) == 0)
+ if (xmlBaseIdent.empty() == true)
{
URISupport::getURLStringFromString(
localXSLURLString,
@@ -1295,7 +1295,7 @@
// OK, we're turning of the previous default namespace declaration.
// Check to see if there is one, and if there isn't, don't add
// the namespace declaration _and_ don't add the attribute.
- if (currentDefaultNamespace != 0 && length(*currentDefaultNamespace) != 0)
+ if (currentDefaultNamespace != 0 && currentDefaultNamespace->empty() == false)
{
addResultNamespaceDecl(s_emptyString, value, theLength);
}
@@ -1344,9 +1344,9 @@
if (fExcludeAttribute == false)
{
attList.addAttribute(
- c_wstr(aname),
- c_wstr(Constants::ATTRTYPE_CDATA),
- c_wstr(value));
+ aname.c_str(),
+ Constants::ATTRTYPE_CDATA.c_str(),
+ value);
}
}
}
@@ -1413,7 +1413,7 @@
void
XSLTEngineImpl::flushPending()
{
- if(getHasPendingStartDocument() == true && 0 != length(getPendingElementName()))
+ if(getHasPendingStartDocument() == true && isElementPending() == true)
{
assert(getFormatterListenerImpl() != 0);
assert(m_executionContext != 0);
@@ -1484,7 +1484,7 @@
XalanDOMString& thePendingElementName = getPendingElementNameImpl();
- if(0 != length(thePendingElementName) &&
+ if(thePendingElementName.empty() == false &&
getMustFlushPendingStartDocument() == true)
{
assert(getFormatterListenerImpl() != 0);
@@ -1499,7 +1499,7 @@
getPendingAttributesImpl();
getFormatterListenerImpl()->startElement(
- c_wstr(thePendingElementName),
+ thePendingElementName.c_str(),
thePendingAttributes);
if(getTraceListeners() > 0)
@@ -1515,7 +1515,7 @@
thePendingAttributes.clear();
- clear(thePendingElementName);
+ thePendingElementName.clear();
}
}
@@ -1975,9 +1975,9 @@
m_executionContext->shouldStripSourceNode(node) == false)
{
const XalanDOMString& data = node.getData();
- assert(0 != length(data));
+ assert(data.empty() == false);
- characters(toCharArray(data), 0, length(data));
+ characters(data.c_str(), 0, data.length());
}
}
@@ -2030,7 +2030,7 @@
{
if(XalanNode::ELEMENT_NODE == posNodeType)
{
- endElement(c_wstr(pos->getNodeName()));
+ endElement(pos->getNodeName().c_str());
}
if(&node == pos)
@@ -2049,7 +2049,7 @@
{
if(XalanNode::ELEMENT_NODE == posNodeType)
{
- endElement(c_wstr(pos->getNodeName()));
+ endElement(pos->getNodeName().c_str());
}
nextNode = 0;
@@ -2181,7 +2181,7 @@
const XalanDOMString& theElementName =
node.getNodeName();
- startElement(c_wstr(theElementName));
+ startElement(theElementName.c_str());
if(shouldCloneAttributes == true)
{
@@ -2200,12 +2200,12 @@
{
const XalanDOMString& data = node.getNodeValue();
- cdata(toCharArray(data), 0, length(data));
+ cdata(data.c_str(), 0, data.length());
}
break;
case XalanNode::ATTRIBUTE_NODE:
- if (length(getPendingElementName()) != 0)
+ if (isElementPending() == true)
{
addResultAttribute(
getPendingAttributesImpl(),
@@ -2221,7 +2221,7 @@
const XalanDOMString& theMessage =
XalanMessageLoader::getMessage(
theGuard.get(),
- XalanMessages::WrongAttemptingToAddAttrinbute);
+ XalanMessages::AttributeCannotBeAdded);
warn(
theMessage,
@@ -2231,17 +2231,17 @@
break;
case XalanNode::COMMENT_NODE:
- comment(c_wstr(node.getNodeValue()));
+ comment(node.getNodeValue().c_str());
break;
case XalanNode::ENTITY_REFERENCE_NODE:
- entityReference(c_wstr(node.getNodeName()));
+ entityReference(node.getNodeName().c_str());
break;
case XalanNode::PROCESSING_INSTRUCTION_NODE:
processingInstruction(
- c_wstr(node.getNodeName()),
- c_wstr(node.getNodeValue()));
+ node.getNodeName().c_str(),
+ node.getNodeValue().c_str());
break;
case XalanNode::DOCUMENT_FRAGMENT_NODE:
@@ -2291,7 +2291,7 @@
{
const XalanDOMString& s = value.str(*m_executionContext);
- characters(toCharArray(s), 0, length(s));
+ characters(s.c_str(), 0, s.length());
}
break;
@@ -2333,7 +2333,7 @@
{
if(XalanNode::ELEMENT_NODE == posNodeType)
{
- endElement(c_wstr(pos->getNodeName()));
+ endElement(pos->getNodeName().c_str());
}
if(top == pos)
@@ -2352,7 +2352,7 @@
{
if(XalanNode::ELEMENT_NODE == posNodeType)
{
- endElement(c_wstr(pos->getNodeName()));
+ endElement(pos->getNodeName().c_str());
}
nextNode = 0;
@@ -2423,7 +2423,7 @@
{
if(XalanNode::ELEMENT_NODE == posNodeType)
{
- endElement(c_wstr(pos->getNodeName()));
+ endElement(pos->getNodeName().c_str());
}
if(top == pos)
@@ -2451,7 +2451,7 @@
{
if(XalanNode::ELEMENT_NODE == posNodeType)
{
- endElement(c_wstr(pos->getNodeName()));
+ endElement(pos->getNodeName().c_str());
}
nextNode = 0;
@@ -2489,7 +2489,7 @@
{
const XalanDOMString::size_type indexOfNSSep = indexOf(elementName, XalanUnicode::charColon);
- if(indexOfNSSep == length(elementName))
+ if(indexOfNSSep == elementName.length())
{
const XalanDOMString* const elemNS =
getResultNamespaceForPrefix(s_emptyString);
@@ -2617,7 +2617,7 @@
XalanDOMString::size_type thePrefixLength,
const XalanDOMString& theName)
{
- return isPrefixUsed(thePrefix, thePrefixLength, c_wstr(theName), length(theName));
+ return isPrefixUsed(thePrefix, thePrefixLength, theName.c_str(), theName.length());
}
@@ -2642,7 +2642,7 @@
// these conditions must be true...
if (theDeclarationLength == theNameLength &&
startsWith(theName, DOMServices::s_XMLNamespaceWithSeparator) == true &&
- endsWith(theName, c_wstr(thePrefix)) == true)
+ endsWith(theName, thePrefix.c_str()) == true)
{
return true;
}
@@ -2701,7 +2701,7 @@
bool
XSLTEngineImpl::isPendingResultPrefix(const XalanDOMString& thePrefix) const
{
- const XalanDOMString::size_type thePrefixLength = length(thePrefix);
+ const XalanDOMString::size_type thePrefixLength = thePrefix.length();
assert(thePrefixLength > 0);
// The element name must be greater than the length of the prefix + 1, since
Modified: xalan/c/trunk/src/xalanc/XSLT/XSLTEngineImpl.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XSLT/XSLTEngineImpl.hpp?rev=696420&r1=696419&r2=696420&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XSLT/XSLTEngineImpl.hpp (original)
+++ xalan/c/trunk/src/xalanc/XSLT/XSLTEngineImpl.hpp Wed Sep 17 12:57:48 2008
@@ -1173,7 +1173,7 @@
bool
isElementPending() const
{
- return length(getPendingElementNameImpl()) != 0 ? true : false;
+ return !getPendingElementNameImpl().empty();
}
/**
Modified: xalan/c/trunk/src/xalanc/XalanSourceTree/FormatterToSourceTree.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XalanSourceTree/FormatterToSourceTree.cpp?rev=696420&r1=696419&r2=696420&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XalanSourceTree/FormatterToSourceTree.cpp (original)
+++ xalan/c/trunk/src/xalanc/XalanSourceTree/FormatterToSourceTree.cpp Wed Sep 17 12:57:48 2008
@@ -114,7 +114,7 @@
clear(m_textBuffer);
- reserve(m_textBuffer, eDefaultTextBufferSize);
+ m_textBuffer.reserve(eDefaultTextBufferSize);
// Push a dummy value for the current element, so we
// don't have to check for an empty stack in endElement().
@@ -137,7 +137,7 @@
assert(m_elementStack.empty() == true);
assert(m_lastChildStack.empty() == true);
- assert(isEmpty(m_textBuffer) == true);
+ assert(m_textBuffer.empty() == true);
}
@@ -392,9 +392,11 @@
void
FormatterToSourceTree::processAccumulatedText()
{
- if (isEmpty(m_textBuffer) == false)
+ if (m_textBuffer.empty() == false)
{
- doCharacters(c_wstr(m_textBuffer), length(m_textBuffer));
+ doCharacters(
+ m_textBuffer.c_str(),
+ m_textBuffer.length());
clear(m_textBuffer);
}
Modified: xalan/c/trunk/src/xalanc/XalanSourceTree/XalanSourceTreeContentHandler.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XalanSourceTree/XalanSourceTreeContentHandler.cpp?rev=696420&r1=696419&r2=696420&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XalanSourceTree/XalanSourceTreeContentHandler.cpp (original)
+++ xalan/c/trunk/src/xalanc/XalanSourceTree/XalanSourceTreeContentHandler.cpp Wed Sep 17 12:57:48 2008
@@ -104,7 +104,7 @@
assert(m_elementStack.empty() == true);
assert(m_lastChildStack.empty() == true);
- assert(isEmpty(m_textBuffer) == true);
+ assert(m_textBuffer.empty() == true);
}
@@ -265,7 +265,7 @@
{
clear(m_textBuffer);
- reserve(m_textBuffer, eDefaultTextBufferSize);
+ m_textBuffer.reserve(eDefaultTextBufferSize);
}
// Push a dummy value for the current element, so we
@@ -487,11 +487,11 @@
{
assert(m_inDTD == false);
- if (isEmpty(m_textBuffer) == false)
+ if (m_textBuffer.empty() == false)
{
- assert(unsigned(length(m_textBuffer)) == length(m_textBuffer));
-
- doCharacters(c_wstr(m_textBuffer), length(m_textBuffer));
+ doCharacters(
+ m_textBuffer.c_str(),
+ m_textBuffer.length());
clear(m_textBuffer);
}
Modified: xalan/c/trunk/src/xalanc/XalanSourceTree/XalanSourceTreeDocument.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XalanSourceTree/XalanSourceTreeDocument.cpp?rev=696420&r1=696419&r2=696420&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XalanSourceTree/XalanSourceTreeDocument.cpp (original)
+++ xalan/c/trunk/src/xalanc/XalanSourceTree/XalanSourceTreeDocument.cpp Wed Sep 17 12:57:48 2008
@@ -304,7 +304,7 @@
XalanSourceTreeDocument::getElementById(const XalanDOMString& elementId) const
{
const ElementByIDMapType::const_iterator i =
- m_elementsByID.find(c_wstr(elementId));
+ m_elementsByID.find(elementId.c_str());
if (i == m_elementsByID.end())
{
@@ -413,10 +413,10 @@
false,
&theLocalName);
- if (theNamespace == 0 || length(*theNamespace) == 0)
+ if (theNamespace == 0 || theNamespace->empty() == true)
{
// the prefix was returned by getNamespaceForPrefix()...
- assert(length(m_stringBuffer) == 0);
+ assert(m_stringBuffer.empty() == true);
theAttributeVector[theStartIndex] =
m_attributeAllocator.create(
@@ -876,7 +876,7 @@
{
// Get the prefix from theName...
assign(thePrefix, theName, theColonIndex);
- assert(length(thePrefix) != 0);
+ assert(thePrefix.empty() == false);
if (theLocalName != 0)
{
@@ -1007,10 +1007,10 @@
m_stringBuffer,
false);
- assert(theNamespace == 0 && length(m_stringBuffer) == 0 ||
- theNamespace != 0 && length(m_stringBuffer) != 0);
+ assert(theNamespace == 0 && m_stringBuffer.empty() == true ||
+ theNamespace != 0 && m_stringBuffer.empty() == false);
- if (theNamespace == 0 || length(*theNamespace) == 0)
+ if (theNamespace == 0 || theNamespace->empty() == true)
{
return m_attributeAllocator.create(
m_namesStringPool.get(theName),
@@ -1035,7 +1035,7 @@
//
return m_attributeNSAllocator.create(
m_namesStringPool.get(theName),
- m_namesStringPool.get(theName + length(m_stringBuffer) + 1),
+ m_namesStringPool.get(theName + m_stringBuffer.length() + 1),
m_namesStringPool.get(*theNamespace),
// This is the prefix...
m_namesStringPool.get(m_stringBuffer),
@@ -1064,10 +1064,10 @@
m_stringBuffer,
true);
- if (theNamespace == 0 || length(*theNamespace) == 0)
+ if (theNamespace == 0 || theNamespace->empty() == true)
{
// the prefix was returned by getNamespaceForPrefix()...
- assert(length(m_stringBuffer) == 0);
+ assert(m_stringBuffer.empty() == true);
if (theAttributeCount == 0)
{
@@ -1098,7 +1098,7 @@
// the local name is the same as the tag name. Otherwise, we need
// to remove the prefix and the ':' that separates them. If
// m_stringBuffer is of length 0, there's no prefix.
- const XalanDOMString::size_type thePrefixLength = length(m_stringBuffer);
+ const XalanDOMString::size_type thePrefixLength = m_stringBuffer.length();
const XalanDOMChar* const theLocalName =
thePrefixLength == 0 ? theTagName : theTagName + thePrefixLength + 1;
@@ -1238,7 +1238,7 @@
// always returned, so use insert(), rather than []
m_elementsByID.insert(
ElementByIDMapType::value_type(
- c_wstr(theAttributeVector[theStartIndex]->getValue()),
+ theAttributeVector[theStartIndex]->getValue().c_str(),
theOwnerElement));
}
Modified: xalan/c/trunk/src/xalanc/XalanTransformer/XalanDefaultParsedSource.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XalanTransformer/XalanDefaultParsedSource.cpp?rev=696420&r1=696419&r2=696420&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XalanTransformer/XalanDefaultParsedSource.cpp (original)
+++ xalan/c/trunk/src/xalanc/XalanTransformer/XalanDefaultParsedSource.cpp Wed Sep 17 12:57:48 2008
@@ -77,7 +77,7 @@
theName,
theDocument);
- if (length(theURI) != 0)
+ if (theURI.empty() == false)
{
return theURI;
}
Modified: xalan/c/trunk/src/xalanc/XalanTransformer/XalanTransformer.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XalanTransformer/XalanTransformer.cpp?rev=696420&r1=696419&r2=696420&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XalanTransformer/XalanTransformer.cpp (original)
+++ xalan/c/trunk/src/xalanc/XalanTransformer/XalanTransformer.cpp Wed Sep 17 12:57:48 2008
@@ -608,7 +608,7 @@
}
catch(const XSLException& e)
{
- if (length(theErrorMessage) != 0)
+ if (theErrorMessage.empty() == false)
{
TranscodeToLocalCodePage(theErrorMessage, m_errorMessage, true);
}
@@ -621,7 +621,7 @@
}
catch(const SAXParseException& e)
{
- if (length(theErrorMessage) != 0)
+ if (theErrorMessage.empty() == false)
{
TranscodeToLocalCodePage(theErrorMessage, m_errorMessage, true);
}
@@ -637,7 +637,7 @@
}
catch(const SAXException& e)
{
- if (length(theErrorMessage) != 0)
+ if (theErrorMessage.empty() == false)
{
TranscodeToLocalCodePage(theErrorMessage, m_errorMessage, true);
}
@@ -650,7 +650,7 @@
}
catch(const XMLException& e)
{
- if (length(theErrorMessage) != 0)
+ if (theErrorMessage.empty() == false)
{
TranscodeToLocalCodePage(theErrorMessage, m_errorMessage, true);
}
@@ -663,7 +663,7 @@
}
catch(const XalanDOMException& e)
{
- if (length(theErrorMessage) != 0)
+ if (theErrorMessage.empty() == false)
{
TranscodeToLocalCodePage(theErrorMessage, m_errorMessage, true);
}
@@ -1189,7 +1189,7 @@
const XalanDOMString& theSourceURI = theParsedXML.getURI();
- if (length(theSourceURI) > 0)
+ if (theSourceURI.empty() == false)
{
theXSLTProcessorEnvSupport.setSourceDocument(theSourceURI, theSourceDocument);
}
@@ -1269,7 +1269,7 @@
XSLTInputSource theDocumentInputSource(theSourceDocument, m_memoryManager);
// Set the system ID, so relative URIs are resolved properly...
- theDocumentInputSource.setSystemId(c_wstr(theSourceURI));
+ theDocumentInputSource.setSystemId(theSourceURI.c_str());
addTraceListeners(m_traceListeners, theProcessor);
@@ -1317,7 +1317,7 @@
}
catch(const XSLException& e)
{
- if (length(theErrorMessage) == 0)
+ if (theErrorMessage.empty() == false)
{
e.defaultFormat(theErrorMessage);
}
@@ -1328,7 +1328,7 @@
}
catch(const SAXParseException& e)
{
- if (length(theErrorMessage) != 0)
+ if (theErrorMessage.empty() == false)
{
TranscodeToLocalCodePage(theErrorMessage, m_errorMessage, true);
}
@@ -1344,7 +1344,7 @@
}
catch(const SAXException& e)
{
- if (length(theErrorMessage) != 0)
+ if (theErrorMessage.empty() == false)
{
TranscodeToLocalCodePage(theErrorMessage, m_errorMessage, true);
}
@@ -1357,7 +1357,7 @@
}
catch(const XMLException& e)
{
- if (length(theErrorMessage) != 0)
+ if (theErrorMessage.empty() == false)
{
TranscodeToLocalCodePage(theErrorMessage, m_errorMessage, true);
}
@@ -1370,7 +1370,7 @@
}
catch(const XalanDOMException& e)
{
- if (length(theErrorMessage) != 0)
+ if (theErrorMessage.empty() == false)
{
TranscodeToLocalCodePage(theErrorMessage, m_errorMessage, true);
}
Modified: xalan/c/trunk/src/xalanc/XercesParserLiaison/Deprecated/FormatterToDeprecatedXercesDOM.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XercesParserLiaison/Deprecated/FormatterToDeprecatedXercesDOM.cpp?rev=696420&r1=696419&r2=696420&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XercesParserLiaison/Deprecated/FormatterToDeprecatedXercesDOM.cpp (original)
+++ xalan/c/trunk/src/xalanc/XercesParserLiaison/Deprecated/FormatterToDeprecatedXercesDOM.cpp Wed Sep 17 12:57:48 2008
@@ -455,7 +455,7 @@
void
FormatterToDeprecatedXercesDOM::processAccumulatedText()
{
- if (isEmpty(m_textBuffer) == false)
+ if (m_textBuffer.empty() == false)
{
DOM_TextType theXercesNode =
m_doc.createTextNode(m_textBuffer.c_str());
Modified: xalan/c/trunk/src/xalanc/XercesParserLiaison/Deprecated/XercesDOMImplementationBridge.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XercesParserLiaison/Deprecated/XercesDOMImplementationBridge.cpp?rev=696420&r1=696419&r2=696420&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XercesParserLiaison/Deprecated/XercesDOMImplementationBridge.cpp (original)
+++ xalan/c/trunk/src/xalanc/XercesParserLiaison/Deprecated/XercesDOMImplementationBridge.cpp Wed Sep 17 12:57:48 2008
@@ -71,7 +71,7 @@
const XalanDOMString& feature,
const XalanDOMString& version)
{
- return m_xercesNode.hasFeature(c_wstr(feature), c_wstr(version));
+ return m_xercesNode.hasFeature(feature.c_str(), version.c_str());
}
Modified: xalan/c/trunk/src/xalanc/XercesParserLiaison/Deprecated/XercesDocumentBridge.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XercesParserLiaison/Deprecated/XercesDocumentBridge.cpp?rev=696420&r1=696419&r2=696420&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XercesParserLiaison/Deprecated/XercesDocumentBridge.cpp (original)
+++ xalan/c/trunk/src/xalanc/XercesParserLiaison/Deprecated/XercesDocumentBridge.cpp Wed Sep 17 12:57:48 2008
@@ -1032,7 +1032,7 @@
try
{
const DOM_ElementType theXercesNode =
- m_xercesDocument.createElement(c_wstr(tagName));
+ m_xercesDocument.createElement(tagName.c_str());
assert(theXercesNode.isNull() == false);
theBridgeNode = createBridgeNode(theXercesNode, 0, true);
@@ -1080,7 +1080,7 @@
try
{
const DOM_TextType theXercesNode =
- m_xercesDocument.createTextNode(c_wstr(data));
+ m_xercesDocument.createTextNode(data.c_str());
assert(theXercesNode.isNull() == false);
theBridgeNode = createBridgeNode(theXercesNode, 0, true);
@@ -1104,7 +1104,7 @@
try
{
const DOM_CommentType theXercesNode =
- m_xercesDocument.createComment(c_wstr(data));
+ m_xercesDocument.createComment(data.c_str());
assert(theXercesNode.isNull() == false);
theBridgeNode = createBridgeNode(theXercesNode, 0, true);
@@ -1128,7 +1128,7 @@
try
{
const DOM_CDATASectionType theXercesNode =
- m_xercesDocument.createCDATASection(c_wstr(data));
+ m_xercesDocument.createCDATASection(data.c_str());
assert(theXercesNode.isNull() == false);
theBridgeNode = createBridgeNode(theXercesNode, 0, true);
@@ -1154,7 +1154,7 @@
try
{
const DOM_ProcessingInstructionType theXercesNode =
- m_xercesDocument.createProcessingInstruction(c_wstr(target), c_wstr(data));
+ m_xercesDocument.createProcessingInstruction(target.c_str(), data.c_str());
assert(theXercesNode.isNull() == false);
theBridgeNode = createBridgeNode(theXercesNode, 0, true);
@@ -1178,7 +1178,7 @@
try
{
const DOM_AttrType theXercesNode =
- m_xercesDocument.createAttribute(c_wstr(name));
+ m_xercesDocument.createAttribute(name.c_str());
assert(theXercesNode.isNull() == false);
theBridgeNode = createBridgeNode(theXercesNode, 0, true);
@@ -1202,7 +1202,7 @@
try
{
const DOM_EntityReferenceType theXercesNode =
- m_xercesDocument.createEntityReference(c_wstr(name));
+ m_xercesDocument.createEntityReference(name.c_str());
assert(theXercesNode.isNull() == false);
theBridgeNode = createBridgeNode(theXercesNode, 0, true);
@@ -1280,7 +1280,7 @@
try
{
const DOM_ElementType theXercesNode =
- m_xercesDocument.createElementNS(c_wstr(namespaceURI), c_wstr(qualifiedName));
+ m_xercesDocument.createElementNS(namespaceURI.c_str(), qualifiedName.c_str());
assert(theXercesNode.isNull() == false);
theBridgeNode = createBridgeNode(theXercesNode, 0, true);
@@ -1306,7 +1306,7 @@
try
{
const DOM_AttrType theXercesNode =
- m_xercesDocument.createAttributeNS(c_wstr(namespaceURI), c_wstr(qualifiedName));
+ m_xercesDocument.createAttributeNS(namespaceURI.c_str(), qualifiedName.c_str());
assert(theXercesNode.isNull() == false);
theBridgeNode = createBridgeNode(theXercesNode, 0, true);
Modified: xalan/c/trunk/src/xalanc/XercesParserLiaison/Deprecated/XercesElementBridge.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XercesParserLiaison/Deprecated/XercesElementBridge.cpp?rev=696420&r1=696419&r2=696420&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XercesParserLiaison/Deprecated/XercesElementBridge.cpp (original)
+++ xalan/c/trunk/src/xalanc/XercesParserLiaison/Deprecated/XercesElementBridge.cpp Wed Sep 17 12:57:48 2008
@@ -301,7 +301,7 @@
const XalanDOMString&
XercesElementBridge::getAttribute(const XalanDOMString& name) const
{
- return m_navigator.getPooledString(m_xercesNode.getAttributeImpl(c_wstr(name)));
+ return m_navigator.getPooledString(m_xercesNode.getAttributeImpl(name.c_str()));
}
@@ -330,7 +330,7 @@
{
try
{
- m_xercesNode.setAttribute(c_wstr(name), c_wstr(value));
+ m_xercesNode.setAttribute(name.c_str(), value.c_str());
}
catch(const DOM_DOMExceptionType& theException)
{
@@ -401,7 +401,7 @@
{
try
{
- m_xercesNode.removeAttribute(c_wstr(name));
+ m_xercesNode.removeAttribute(name.c_str());
}
catch(const DOM_DOMExceptionType& theException)
{
@@ -416,7 +416,7 @@
const XalanDOMString& namespaceURI,
const XalanDOMString& localName) const
{
- return m_navigator.getPooledString(m_xercesNode.getAttributeNSImpl(c_wstr(namespaceURI), c_wstr(localName)));
+ return m_navigator.getPooledString(m_xercesNode.getAttributeNSImpl(namespaceURI.c_str(), localName.c_str()));
}
@@ -429,7 +429,7 @@
{
try
{
- m_xercesNode.setAttributeNS(c_wstr(namespaceURI), c_wstr(qualifiedName), c_wstr(value));
+ m_xercesNode.setAttributeNS(namespaceURI.c_str(), qualifiedName.c_str(), value.c_str());
}
catch(const DOM_DOMExceptionType& theException)
{
@@ -446,7 +446,7 @@
{
try
{
- m_xercesNode.removeAttributeNS(c_wstr(namespaceURI), c_wstr(localName));
+ m_xercesNode.removeAttributeNS(namespaceURI.c_str(), localName.c_str());
}
catch(const DOM_DOMExceptionType& theException)
{
@@ -462,7 +462,7 @@
const XalanDOMString& localName) const
{
const DOM_AttrType theAttrNode =
- m_xercesNode.getAttributeNodeNS(c_wstr(namespaceURI), c_wstr(localName));
+ m_xercesNode.getAttributeNodeNS(namespaceURI.c_str(), localName.c_str());
if (theAttrNode.isNull() == true)
{
Modified: xalan/c/trunk/src/xalanc/XercesParserLiaison/Deprecated/XercesNamedNodeMapBridge.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XercesParserLiaison/Deprecated/XercesNamedNodeMapBridge.cpp?rev=696420&r1=696419&r2=696420&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XercesParserLiaison/Deprecated/XercesNamedNodeMapBridge.cpp (original)
+++ xalan/c/trunk/src/xalanc/XercesParserLiaison/Deprecated/XercesNamedNodeMapBridge.cpp Wed Sep 17 12:57:48 2008
@@ -113,7 +113,7 @@
XalanNode*
XercesNamedNodeMapBridge::getNamedItem(const XalanDOMString& name) const
{
- return m_navigator.mapNode(m_xercesNamedNodeMap.getNamedItem(c_wstr(name)));
+ return m_navigator.mapNode(m_xercesNamedNodeMap.getNamedItem(name.c_str()));
}
@@ -134,7 +134,7 @@
try
{
const DOM_NodeType theXercesNode =
- m_xercesNamedNodeMap.removeNamedItem(c_wstr(name));
+ m_xercesNamedNodeMap.removeNamedItem(name.c_str());
// A node was removed, so get it corresponding XalanNode...
theXalanNode = m_navigator.mapNode(theXercesNode);
@@ -208,7 +208,7 @@
try
{
const DOM_NodeType theXercesNode =
- m_xercesNamedNodeMap.removeNamedItemNS(c_wstr(namespaceURI), c_wstr(localName));
+ m_xercesNamedNodeMap.removeNamedItemNS(namespaceURI.c_str(), localName.c_str());
// A node was removed, so get it corresponding XalanNode...
theXalanNode = m_navigator.mapNode(theXercesNode);
Modified: xalan/c/trunk/src/xalanc/XercesParserLiaison/FormatterToXercesDOM.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XercesParserLiaison/FormatterToXercesDOM.cpp?rev=696420&r1=696419&r2=696420&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XercesParserLiaison/FormatterToXercesDOM.cpp (original)
+++ xalan/c/trunk/src/xalanc/XercesParserLiaison/FormatterToXercesDOM.cpp Wed Sep 17 12:57:48 2008
@@ -361,7 +361,7 @@
const XalanDOMString* const theNamespace =
DOMServices::getNamespaceForPrefix(theElementName, *m_prefixResolver, false, m_buffer);
- if (theNamespace == 0 || length(*theNamespace) == 0)
+ if (theNamespace == 0 || theNamespace->empty() == true)
{
theElement = m_doc->createElement(theElementName);
}
@@ -403,7 +403,7 @@
const XalanDOMString* const theNamespace =
DOMServices::getNamespaceForPrefix(theName, *m_prefixResolver, true, m_buffer);
- if (theNamespace == 0 || length(*theNamespace) == 0)
+ if (theNamespace == 0 || theNamespace->empty() == true)
{
theElement->setAttribute(theName, attrs.getValue(i));
}
@@ -420,7 +420,7 @@
void
FormatterToXercesDOM::processAccumulatedText()
{
- if (isEmpty(m_textBuffer) == false)
+ if (m_textBuffer.empty() == false)
{
append(m_doc->createTextNode(m_textBuffer.c_str()));
Modified: xalan/c/trunk/src/xalanc/XercesParserLiaison/XercesDOMImplementationWrapper.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XercesParserLiaison/XercesDOMImplementationWrapper.cpp?rev=696420&r1=696419&r2=696420&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XercesParserLiaison/XercesDOMImplementationWrapper.cpp (original)
+++ xalan/c/trunk/src/xalanc/XercesParserLiaison/XercesDOMImplementationWrapper.cpp Wed Sep 17 12:57:48 2008
@@ -78,7 +78,7 @@
const XalanDOMString& feature,
const XalanDOMString& version)
{
- return m_xercesNode->hasFeature(c_wstr(feature), c_wstr(version));
+ return m_xercesNode->hasFeature(feature.c_str(), version.c_str());
}
Modified: xalan/c/trunk/src/xalanc/XercesParserLiaison/XercesParserLiaison.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XercesParserLiaison/XercesParserLiaison.cpp?rev=696420&r1=696419&r2=696420&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XercesParserLiaison/XercesParserLiaison.cpp (original)
+++ xalan/c/trunk/src/xalanc/XercesParserLiaison/XercesParserLiaison.cpp Wed Sep 17 12:57:48 2008
@@ -197,12 +197,12 @@
if (m_externalSchemaLocation.length() > 0)
{
- m_domParser->setExternalSchemaLocation(c_wstr(m_externalSchemaLocation));
+ m_domParser->setExternalSchemaLocation(m_externalSchemaLocation.c_str());
}
if (m_externalNoNamespaceSchemaLocation.length() > 0)
{
- m_domParser->setExternalNoNamespaceSchemaLocation(c_wstr(m_externalNoNamespaceSchemaLocation));
+ m_domParser->setExternalNoNamespaceSchemaLocation(m_externalNoNamespaceSchemaLocation.c_str());
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org