changeset 11:b8922e13e7b5

fixed xml templates to work with new data structures
author casties
date Wed, 11 Aug 2010 15:16:36 +0200
parents f7f8ae43d436
children 0fa22c291ff1 b915bce65372
files zpt/XML_index.zpt zpt/XML_schema.zpt zpt/XML_schema_table.zpt
diffstat 3 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/zpt/XML_index.zpt	Wed Aug 11 14:49:27 2010 +0200
+++ b/zpt/XML_index.zpt	Wed Aug 11 15:16:36 2010 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <schemalist xmlns:tal="http://xml.zope.org/namespaces/tal">
-  <schema tal:repeat="sch options/data">
-	<name tal:content="sch"/>
+  <schema tal:repeat="row options/data/rows">
+	<name tal:content="python:row[0]"/>
   </schema>
 </schemalist>
\ No newline at end of file
--- a/zpt/XML_schema.zpt	Wed Aug 11 14:49:27 2010 +0200
+++ b/zpt/XML_schema.zpt	Wed Aug 11 15:16:36 2010 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <tablelist xmlns:tal="http://xml.zope.org/namespaces/tal">
-  <table tal:repeat="tbl options/data">
-	<name tal:content="tbl/relname"/>
+  <table tal:repeat="row options/data/rows">
+	<name tal:content="python:row[0]"/>
   </table>
 </tablelist>
\ No newline at end of file
--- a/zpt/XML_schema_table.zpt	Wed Aug 11 14:49:27 2010 +0200
+++ b/zpt/XML_schema_table.zpt	Wed Aug 11 15:16:36 2010 +0200
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <table xmlns:tal="http://xml.zope.org/namespaces/tal" 
-  tal:define="fields options/data/names" tal:attributes="name options/tablename">
-  <row tal:repeat="row options/data">
-	<column tal:repeat="field fields" tal:attributes="name field" tal:content="python:row[field]"/>
+  tal:define="fields options/data/fields" tal:attributes="name options/tablename">
+  <row tal:repeat="row options/data/rows">
+	<column tal:repeat="col row" tal:content="python:col" tal:attributes="name python:fields[repeat['col'].index][0]"/>
   </row>
 </table>