10 |
|
|
11 |
|
#include <xalanc/Include/PlatformDefinitions.hpp> |
12 |
|
#include <xercesc/util/PlatformUtils.hpp> |
13 |
+ |
#include <xercesc/framework/LocalFileInputSource.hpp> |
14 |
|
#include <xalanc/XPath/XPathEvaluator.hpp> |
15 |
+ |
#include <xalanc/DOMSupport/XalanDocumentPrefixResolver.hpp> |
16 |
+ |
#include <xalanc/XalanSourceTree/XalanSourceTreeDOMSupport.hpp> |
17 |
+ |
#include <xalanc/XalanSourceTree/XalanSourceTreeInit.hpp> |
18 |
+ |
#include <xalanc/XalanSourceTree/XalanSourceTreeParserLiaison.hpp> |
19 |
|
|
20 |
|
XALAN_USING_XERCES(XMLPlatformUtils) |
21 |
+ |
XALAN_USING_XERCES(LocalFileInputSource) |
22 |
|
XALAN_USING_XALAN(XPathEvaluator) |
23 |
+ |
XALAN_USING_XALAN(XalanDocument) |
24 |
+ |
XALAN_USING_XALAN(XalanDocumentPrefixResolver) |
25 |
+ |
XALAN_USING_XALAN(XalanDOMString) |
26 |
+ |
XALAN_USING_XALAN(XalanNode) |
27 |
+ |
XALAN_USING_XALAN(XalanSourceTreeInit) |
28 |
+ |
XALAN_USING_XALAN(XalanSourceTreeDOMSupport) |
29 |
+ |
XALAN_USING_XALAN(XalanSourceTreeParserLiaison) |
30 |
|
|
31 |
|
string program; |
32 |
|
bool debug = false; |
50 |
|
{ |
51 |
|
siteMap = matcher[1]; |
52 |
|
} |
53 |
+ |
else if (arg == "-D") |
54 |
+ |
{ |
55 |
+ |
if (!debug) debug = true; |
56 |
+ |
} |
57 |
|
} |
58 |
|
|
59 |
|
if (siteIndex != "" && siteMap != "") |
68 |
|
} |
69 |
|
else |
70 |
|
{ |
71 |
< |
cout << "Usage: " << program << " -index=index -map=map\n"; |
71 |
> |
cout << "Usage: " << program << " -index=index -map=map [-D]\n"; |
72 |
|
} |
73 |
|
|
74 |
|
return 0; |
76 |
|
|
77 |
|
SiteMapper::SiteMapper(const string& siteIndex, const string& siteMap) |
78 |
|
{ |
79 |
+ |
XalanSourceTreeInit init; |
80 |
+ |
|
81 |
+ |
oldMap(siteMap); |
82 |
+ |
// index(siteIndex); |
83 |
+ |
// newMap(siteMap); |
84 |
+ |
} |
85 |
+ |
|
86 |
+ |
void SiteMapper::oldMap(const string& siteMap) |
87 |
+ |
{ |
88 |
+ |
XalanSourceTreeDOMSupport support; |
89 |
+ |
XalanSourceTreeParserLiaison liaison(support); |
90 |
+ |
|
91 |
+ |
support.setParserLiaison(&liaison); |
92 |
+ |
|
93 |
+ |
cerr << "Here!\n"; |
94 |
+ |
|
95 |
+ |
const XalanDOMString file(siteMap.c_str()); |
96 |
+ |
const LocalFileInputSource source(file.c_str()); |
97 |
+ |
|
98 |
+ |
|
99 |
+ |
cerr << "There!\n"; |
100 |
+ |
|
101 |
+ |
const XalanDocument* document = liaison.parseXMLStream(source); |
102 |
+ |
} |
103 |
+ |
|
104 |
+ |
void SiteMapper::index(const string& siteIndex) |
105 |
+ |
{ |
106 |
+ |
// |
107 |
+ |
} |
108 |
+ |
|
109 |
+ |
void SiteMapper::newMap(const string& siteMap) |
110 |
+ |
{ |
111 |
|
// |
112 |
|
} |