Premise:
DomDocument :: schemaValidate ($ path) will not work until allow_url_fopen is enabled
About Sitemaps:
From http://www.sitemaps.org/protocol.php#validating
To test your Sitemap or Sitemap Index File for a schema, an XML file will be required additionally as shown below.
<?xml version='1.0' encoding='UTF-8'?> <urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url> ... </url> </urlset>
To add these headers to your XML, you first need to get DomDocument via $domDoc = $this->sitemap()->getDomSitemap() than add additional headers and finally echo $domDoc->saveXml()
I donβt think I have done so much for you, you might need an additional subclass of ViewHelper Zend_View_Helper_Navigation_Sitemap.
Unfortunately, I have never worked with DomDocument before, so I cannot help with setting namespace attributes, maybe this post will help you with this.
source share