81 |
|
|
82 |
|
if (list == 0) return; |
83 |
|
|
84 |
+ |
comment << evaluator.evaluate(support, document, |
85 |
+ |
XalanDOMString("comment()").c_str())->str(); |
86 |
+ |
|
87 |
|
item = evaluator.createXPath(XalanDOMString("item").c_str()); |
88 |
|
address = evaluator.createXPath(XalanDOMString("link/@address").c_str()); |
89 |
|
link = evaluator.createXPath(XalanDOMString("link").c_str()); |
101 |
|
{ |
102 |
|
NodeRefList nodes = evaluator.selectNodeList(support, list, *item); |
103 |
|
|
104 |
< |
for (int index = 0; index < nodes.getLength(); index++) |
104 |
> |
for (int index(0); index < nodes.getLength(); ++index) |
105 |
|
{ |
106 |
|
XalanNode* node = nodes.item(index); |
107 |
|
ostringstream url, title; |
136 |
|
NodeRefList nodes = evaluator.selectNodeList(support, document, |
137 |
|
XalanDOMString("/index/page").c_str()); |
138 |
|
|
139 |
< |
for (int index = 0; index < nodes.getLength(); index++) |
139 |
> |
for (int index(0); index < nodes.getLength(); ++index) |
140 |
|
{ |
141 |
|
XalanNode* node = nodes.item(index); |
142 |
|
ostringstream address; |
192 |
|
|
193 |
|
bool SiteMapper::newIndex(vector<Page>& pages, Page& page) |
194 |
|
{ |
195 |
< |
for (unsigned index = 0; index < pages.size(); index++) |
195 |
> |
for (unsigned index(0); index < pages.size(); ++index) |
196 |
|
{ |
197 |
|
if (pages[index] == page.getAddress()) |
198 |
|
{ |
232 |
|
<< "<?xml-stylesheet type=\"text/xsl\" href=\"stylesheets/sitemap.xsl" |
233 |
|
<< "\"?>\n" |
234 |
|
<< "<!DOCTYPE page SYSTEM \"stylesheets/page.dtd\">\n" |
235 |
< |
<< "<!-- $Id$ -->\n" |
235 |
> |
<< "<!--" << comment.str() << "-->\n" |
236 |
|
<< "<page>\n" |
237 |
|
<< "\t<title>Sitemap</title>\n" |
238 |
|
<< "\t<section>\n" |
239 |
|
<< "\t\t<list>\n"; |
240 |
|
|
241 |
< |
for (unsigned index = 0; index < pages.size(); index++) |
241 |
> |
for (unsigned index(0); index < pages.size(); ++index) |
242 |
|
{ |
243 |
|
if (newPages.find(pages[index].getAddress()) != newPages.end()) |
244 |
|
{ |
259 |
|
void SiteMapper::newMap(vector<Page>& pages, const string& childOf, |
260 |
|
multimap<string, Page>& newPages) |
261 |
|
{ |
262 |
< |
for (unsigned index = 0; index < pages.size(); index++) |
262 |
> |
for (unsigned index(0); index < pages.size(); ++index) |
263 |
|
{ |
264 |
|
newMap(pages[index].getChildren(), pages[index].getPath(), newPages); |
265 |
|
} |
266 |
|
|
267 |
< |
for (multimap<string, Page>::iterator itor = newPages.lower_bound(childOf); |
267 |
> |
for (multimap<string, Page>::iterator itor(newPages.lower_bound(childOf)); |
268 |
|
itor != newPages.upper_bound(childOf); itor++) |
269 |
|
{ |
270 |
|
pages.push_back(itor->second); |