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

Comparing SiteMapper/SiteMapper.cpp (file contents):
Revision 143 by Douglas Thrift, 2004-03-31T22:55:16-08:00 vs.
Revision 144 by Douglas Thrift, 2004-03-31T23:21:15-08:00

# Line 223 | Line 223 | bool SiteMapper::newIndex(vector<Page>&
223  
224   void SiteMapper::newMap(const string& siteMap)
225   {
226 +        ofstream fout(siteMap.c_str());
227 +
228 +        fout << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
229 +                << "<?xml-stylesheet type=\"text/xsl\" href=\"stylesheets/sitemap.xsl"
230 +                << "\"?>\n"
231 +                << "<!DOCTYPE page SYSTEM \"stylesheets/page.dtd\">\n"
232 +                << "<!-- /sitemap.xml -->\n"
233 +                << "<page>\n"
234 +                << "\t<title>Sitemap</title>\n"
235 +                << "\t<section>\n"
236 +                << "\t\t<list>\n";
237 +
238          for (unsigned index = 0; index < pages.size(); index++)
239          {
240                  if (newPages.find(pages[index].getAddress()) != newPages.end())
# Line 231 | Line 243 | void SiteMapper::newMap(const string& si
243                                  newPages.find(pages[index].getAddress())->second);
244                  }
245  
246 <                cout << pages[index] << '\n';
246 >                fout << pages[index](3) << '\n';
247          }
248 +
249 +        fout << "\t\t</list>\n"
250 +                << "\t</section>\n"
251 +                << "</page>\n";
252 +
253 +        fout.close();
254   }
255  
256   void SiteMapper::newMap(vector<Page>& pages, const string& childOf,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines