Mikey, Just thought I should bring this to your notice that Boost (Dev Version dated 27th September 2009) is caching XML sitemap pages even when there are parsing error on some of the sitemap pages.

Comments

mikeytown2’s picture

Was Google webmasters tools reporting the parsing error? I think they fixed the issue with xml comments in their engine.

Froggie-2’s picture

Actually no; the error message was visible on the browser and the page was cached by Boost.
Thanks

mikeytown2’s picture

Status: Active » Closed (won't fix)

Boost expects the generated xml to be semantically correct. If a module is outputting incorrect markup, it is outside of the the scope of boost to fix it. Having Boost parse the XML looking for errors is also outside the scope of this module. If you wish to validate the document before it is cached, there is hook_boost_preprocess(). If validation fails set $GLOBALS['_boost_cache_this'] = FALSE.
http://php.net/xmlreader.isvalid

I would wait for this patch to go in #585518: Place boost tag inside the closing </html> tag, as it rewrites the API so your hook has access to the extension, so you know what type of document your dealing with.

Just wondering, what part of the xml file failed validation?

mikeytown2’s picture

Froggie-2’s picture

I cannot remember the exact error message but it said something like parsing error and had only a handful of urls in it where as the expected urls were 50000. I wish I had kept a copy of the web page for better understanding and reporting. However, this was just a rare case and I rebuild my sitemap files, this time without any parsing error after manually deleting the faulty cached files.
Now everything appears to be working ok. Sitemap is getting generated and boost is caching them when viewed.
Thanks for your attention though!