+<%
+ doc_str = yield()
+ doc = Nokogiri::XML(sprintf("<html xmlns='%s'>%s</html>",
+ Xmlns['xhtml'], doc_str))
+
+ doc_header = nil
+ if !doc.xpath("//xhtml:h1", Xmlns).empty? then
+ doc_header = doc.xpath("string(//xhtml:h1)", Xmlns)
+ end
+%><document>
+ <title><%= @item.fetch(:title, doc_header) %></title><%=
+render '/copyright.xml' %><%
+find_images.each do |item| %>
+ <image>
+ <title><%= item[:attrname] || item[:title] %></title>
+ <uri><%= item_uri(item, rep: :info) %></uri><%=
+render '/copyright.xml', :item => item, :indent => 4
+%> </image><%
+end %>