Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.1.4

Bug #17293 Incorrect elements placement
Submitted: 2010-04-04 21:25 UTC
From: hubbitus Assigned: cbrunet
Status: Closed Package: File_Sitemap (version 0.1.2)
PHP Version: 5.3.2 OS: Linux
Roadmaps: (Not assigned)    
Subscription  


 [2010-04-04 21:25 UTC] hubbitus (Pavel Alexeev)
Description: ------------ Result sitemap does not pass validation! I just got your example script https://pear.php.net/package/File_Sitemap/docs/latest/__filesou rce/fsource_File_Sitemap__File_Sitemap- 0.1.2examplessitemap_example.php.html and uncomment validate string: $ php sitemap_example.php PHP Warning: DOMDocument::schemaValidate(): Element '{http://www.sitemaps.org/schemas/sitemap/0.9}changefreq': This element is not expected. Expected is ( ##other{http://www.sitemaps.org/schemas/sitemap/0.9}* ). in /usr/share/pear/File/Sitemap/Base.php on line 400 Please revisit patch to correct element placing order. P.S. Is not good idea use XPath instead loop cycles each time in findLoc method?? Test script: --------------- https://pear.php.net/package/File_Sitemap/docs/latest/__filesource/fsource_File_Sitemap__File_Sitemap-0.1.2examplessitemap_example.php.html Expected result: ---------------- No errors and <changefreq> BEFORE <priority> according to XML Schema.

Comments

 [2010-04-04 21:25 UTC] hubbitus (Pavel Alexeev)
 [2010-04-04 21:31 UTC] hubbitus (Pavel Alexeev)
 [2010-04-04 21:32 UTC] hubbitus (Pavel Alexeev)
Second patch looks Better for me - without additional inner IF.
 [2010-05-08 03:19 UTC] cbrunet (Charles Brunet)
-Status: Open +Status: Closed -Assigned To: +Assigned To: cbrunet
Thank you for your bug report. This issue has been fixed in the latest released version of the package, which you can download at http://pear.php.net/get/
 [2010-05-08 14:32 UTC] hubbitus (Pavel Alexeev)
Your solution have much more statements, but I hope it work :) Thank you.