ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/Bender/Bender.cpp
Revision: 113
Committed: 2004-03-16T12:31:22-08:00 (21 years, 3 months ago) by Douglas Thrift
File size: 909 byte(s)
Log Message:
Huzzah!

File Contents

# User Rev Content
1 Douglas Thrift 109 // Bender
2     //
3     // Douglas Thrift
4     //
5     // $Id$
6    
7     #include "Bender.hpp"
8 Douglas Thrift 113 #include "Matcher.hpp"
9 Douglas Thrift 109
10 Douglas Thrift 113 #include <xalanc/Include/PlatformDefinitions.hpp>
11     #include <xercesc/util/PlatformUtils.hpp>
12     #include <xalanc/XalanTransformer/XalanTransformer.hpp>
13    
14     XALAN_USING_XERCES(XMLPlatformUtils)
15     XALAN_USING_XALAN(XalanTransformer)
16    
17 Douglas Thrift 109 int main(int argc, char* argv[])
18     {
19     XMLPlatformUtils::Initialize();
20     XalanTransformer::initialize();
21    
22     Bender bender;
23    
24     XalanTransformer::terminate();
25     XMLPlatformUtils::Terminate();
26     XalanTransformer::ICUCleanUp();
27    
28     return 0;
29     }
30    
31     Bender::Bender()
32     {
33 Douglas Thrift 111 string path = sgetenv("PATH_TRANSLATED");
34    
35     if (path != "")
36     {
37     cout << "Content-Type: text/html\n\n";
38    
39     XalanTransformer transformer;
40    
41 Douglas Thrift 112 if (transformer.transform(path.c_str(), cout) != 0)
42     {
43     ifstream fin(path.c_str());
44     string line;
45    
46     do
47     {
48     getline(fin, line);
49    
50     cout << line << "\n";
51     }
52     while (fin.good());
53     }
54 Douglas Thrift 111 }
55 Douglas Thrift 109 }

Properties

Name Value
svn:eol-style native
svn:keywords Id