ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/Bender/Bender.cpp
(Generate patch)

Comparing Bender/Bender.cpp (file contents):
Revision 376 by douglas, 2004-12-22T18:23:27-08:00 vs.
Revision 420 by douglas, 2005-03-09T17:47:41-08:00

# Line 12 | Line 12
12   #include <menes-api/process.hpp>
13   #include <menes-app/simple.hpp>
14   #include <menes-ios/helpers.hpp>
15 + #include <menes-xml/document.hpp>
16 + #include <menes-xml/nodeset.hpp>
17 + #include <menes-xml/parse.hpp>
18  
19   class Bender
20   {
# Line 81 | Line 84 | void Bender::bend(const ext::String& pat
84  
85   void Bender::bend(const ext::String& path)
86   {
87 <        _L<ext::String> args(1, "-a");
87 >        _H<xml::Document> document(xml::Parse("bender.xml"));
88 >        _H<xml::Node> node(*document/"bender");
89 >        ext::String program(*node/"program");
90 >        _L<ext::String> args;
91 >
92 >        _foreach (const xml::NodeSet, arg, *node/"argument") args.InsertLast(**arg);
93  
94          args.InsertLast(path);
95  
96 < #if defined(__FreeBSD__)
97 <        _S<api::Process> xslt("/usr/local/bin/Xalan", args);
90 < #elif defined(_WIN32)
91 <        _S<api::Process> xslt("Xalan.exe", args);
92 < #else
93 <        _S<api::Process> xslt("Xalan", args);
94 < #endif
95 <        ios::String output;
96 >        _S<api::Process> xslt(program, args);
97 >        _S<ios::String> output;
98  
99          ios::ReadToWrite(*xslt.GetReader(), output);
100  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines