As one can expect I am using a template to generate a google-sitemap for my site. However I am experiencing the problem that the photos are static (generated by JAlbum) and I wanted to separate the static and dynamic part.

Dynamic part

<?xml version="1.0" encoding="UTF-8"?><br></br><urlset xmlns="http://www.google.com/schemas/sitemap/0.84"<br></br>        xmlns:tal="http://xml.zope.org/namespaces/tal"<br></br>        xmlns:metal="http://xml.zope.org/namespaces/metal"<br></br>		tal:define="results python:container.portal_catalog(<br></br>                             portal_type = ['News Item','Document', 'Topic'], <br></br>                             review_state=['published','visible'],<br></br>                             sort_on='modified' ,sort_order='reverse');<br></br>                    dummy python:request.RESPONSE.setHeader('Content-Type', 'text/xml');<br></br>                    dummy2 python:request.RESPONSE.setHeader('charset', 'UTF-8');"<br></br>		tal:condition="results"<br></br>		tal:on-error="nothing"><br></br>   <url tal:repeat="result results"><br></br>       <tal:block tal:define="resultObject result/getObject;"<br></br>                  tal:on-error="nothing"><br></br>            <loc tal:content="resultObject/absolute_url">http://www.yoursite.com/</loc><br></br>            <lastmod tal:content="python: DateTime(resultObject.modified()).HTML4()">2005-01-01</lastmod><br></br>       </tal:block><br></br>   </url><br></br><!-- here I include the static part --><br></br><div tal:replace="structure here/google-sitemap.xml.incl" /><br></br></urlset><br></br><br></br>

Static part

find -L /www/len/photo -name "*.html" <br></br>-printf '<url><loc>%p</loc><lastmod>%TY-%Tm-%TdT%TH-%TM-%TSZ</lastmod></url>\n'  <br></br>| sed -e 's/\/www\/len/http:\/\/www.len.ro/g' <br></br>| grep -v 'orig.html' | grep -v " " | grep -v "bpp-generated" <br></br>> google-sitemap.xml.incl.pt<br></br>

Not extraordinary but very simple generation of the static part which can be done from time to time as I add new static pages.