dbertoni 01/06/06 15:07:42
Modified: c/samples/DocumentBuilder DocumentBuilder.cpp
Log:
Simplified sample.
Revision Changes Path
1.2 +4 -21 xml-xalan/c/samples/DocumentBuilder/DocumentBuilder.cpp
Index: DocumentBuilder.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/samples/DocumentBuilder/DocumentBuilder.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- DocumentBuilder.cpp 2001/04/27 20:57:55 1.1
+++ DocumentBuilder.cpp 2001/06/06 22:07:41 1.2
@@ -3,12 +3,6 @@
-#if !defined(NDEBUG) && defined(_MSC_VER)
-#include <crtdbg.h>
-#endif
-
-
-
#include <sax2/ContentHandler.hpp>
#include <util/PlatformUtils.hpp>
@@ -107,13 +101,6 @@
int argc,
const char* /* argv */ [])
{
-#if !defined(XALAN_USE_ICU) && !defined(NDEBUG) && defined(_MSC_VER)
- _CrtSetDbgFlag(_CrtSetDbgFlag(_CRTDBG_REPORT_FLAG) |
_CRTDBG_LEAK_CHECK_DF);
-
- _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE);
- _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR);
-#endif
-
#if !defined(XALAN_NO_NAMESPACES)
using std::cerr;
using std::endl;
@@ -139,20 +126,16 @@
// Create a XalanTransformer.
XalanTransformer theXalanTransformer;
- // Our stylesheet file. The assumption is that the
executable will be run
- // from same directory as the file.
- const char* const theXSLFileName = "foo.xsl";
-
- // Our output target...
- const char* const theOutputFileName = "foo.out";
-
// Get a document builder from the transformer...
XalanDocumentBuilder* const theBuilder =
theXalanTransformer.createDocumentBuilder();
BuildDocument(theBuilder);
+ // The assumption is that the executable will be run
+ // from same directory as the stylesheet file.
+
// Do the transform.
- theResult = theXalanTransformer.transform(*theBuilder,
theXSLFileName, theOutputFileName);
+ theResult = theXalanTransformer.transform(*theBuilder,
"foo.xsl", "foo.out");
if(theResult != 0)
{
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]