dbertoni 2002/11/25 13:56:55
Modified: c/src/TestXSLT process.cpp
Log:
Updates for new C++ namespace support.
Revision Changes Path
1.92 +25 -14 xml-xalan/c/src/TestXSLT/process.cpp
Index: process.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/TestXSLT/process.cpp,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -r1.91 -r1.92
--- process.cpp 14 Nov 2002 23:55:22 -0000 1.91
+++ process.cpp 25 Nov 2002 21:56:55 -0000 1.92
@@ -171,15 +171,13 @@
-#if !defined (XALAN_NO_NAMESPACES)
-using std::cerr;
-using std::cin;
-using std::cout;
-using std::endl;
-using std::hex;
-using std::pair;
-using std::vector;
-#endif
+XALAN_USING_STD(cerr)
+XALAN_USING_STD(cin)
+XALAN_USING_STD(cout)
+XALAN_USING_STD(endl)
+XALAN_USING_STD(hex)
+XALAN_USING_STD(pair)
+XALAN_USING_STD(vector)
@@ -277,7 +275,7 @@
struct CmdLineParams
{
- StringPairVectorType params;
+ StringPairVectorType params;
bool escapeCData;
bool setQuietConflictWarnings;
@@ -332,6 +330,19 @@
+// We only need a few things from the Xerces namespace...
+XALAN_USING_XERCES(XMLPlatformUtils)
+XALAN_USING_XERCES(SAXParseException)
+XALAN_USING_XERCES(SAXException)
+XALAN_USING_XERCES(XMLException)
+
+
+
+// We need lots of things from the Xalan namespace, so hoist everything...
+XALAN_CPP_NAMESPACE_USE
+
+
+
void
warnPreviousOutputMethod(int outputMethod)
{
@@ -964,7 +975,7 @@
const StylesheetRoot* stylesheet = 0;
- if (!isEmpty(xslFileName))
+ if (!xslFileName.empty())
{
stylesheet = processor.processStylesheet(xslFileName,
theConstructionContext);
}
@@ -1010,7 +1021,7 @@
if (params.inFileName != 0)
{
- theInputSource.setSystemId(c_wstr(XalanDOMString(params.inFileName)));
+ theInputSource.setSystemId(XalanDOMString(params.inFileName).c_str());
}
else
{
@@ -1192,7 +1203,7 @@
const XalanDOMString& theURI = e.getURI();
- if (length(theURI) != 0)
+ if (theURI.length() != 0)
{
cout << theURI;
}
@@ -1210,7 +1221,7 @@
theResult = -1;
}
- catch (const SAXParseException& e)
+ catch (const SAXParseException& e)
{
cout << "\nSAXParseException ";
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]