[Erp5-report] r18610 - in /erp5/trunk/products/ERP5/bootstrap/erp5_core: SkinTemplateItem/p...

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Jan 7 12:07:54 CET 2008


Author: nicolas
Date: Mon Jan  7 12:07:54 2008
New Revision: 18610

URL: http://svn.erp5.org?rev=18610&view=rev
Log:
2008-01-07 Nicolas
Add new XSL stylesheet for ERP5 OOo Templates which able to transform any CDATA section, tagged with 'TALES' in style name, into attribute tal:content

Added:
    erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5OOoTemplate_ooo2zpt.xml
Modified:
    erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/change_log
    erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision

Added: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5OOoTemplate_ooo2zpt.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5OOoTemplate_ooo2zpt.xml?rev=18610&view=auto
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5OOoTemplate_ooo2zpt.xml (added)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5OOoTemplate_ooo2zpt.xml Mon Jan  7 12:07:54 2008
@@ -1,0 +1,151 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <global name="DTMLDocument" module="OFS.DTMLDocument"/>
+        <tuple/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>__ac_local_roles__</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>__name__</string> </key>
+            <value> <string>ERP5OOoTemplate_ooo2zpt</string> </value>
+        </item>
+        <item>
+            <key> <string>_vars</string> </key>
+            <value>
+              <dictionary/>
+            </value>
+        </item>
+        <item>
+            <key> <string>globals</string> </key>
+            <value>
+              <dictionary/>
+            </value>
+        </item>
+        <item>
+            <key> <string>raw</string> </key>
+            <value> <string encoding="cdata"><![CDATA[
+
+<?xml version="1.0" encoding="UTF-8"?>\n
+<!--\n
+##############################################################################\n
+#\n
+# Copyright (c) 2008 Nexedi SA and Contributors. All Rights Reserved.\n
+#                    Nicolas Delaby <nicolas at nexedi.com>\n
+#\n
+# WARNING: This program as such is intended to be used by professional\n
+# programmers who take the whole responsability of assessing all potential\n
+# consequences resulting from its eventual inadequacies and bugs\n
+# End users who are looking for a ready-to-use solution with commercial\n
+# garantees and support are strongly adviced to contract a Free Software\n
+# Service Company\n
+#\n
+# This program is Free Software; you can redistribute it and/or\n
+# modify it under the terms of the GNU General Public License\n
+# as published by the Free Software Foundation; either version 2\n
+# of the License, or (at your option) any later version.\n
+#\n
+# This program is distributed in the hope that it will be useful,\n
+# but WITHOUT ANY WARRANTY; without even the implied warranty of\n
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n
+# GNU General Public License for more details.\n
+#\n
+# You should have received a copy of the GNU General Public License\n
+# along with this program; if not, write to the Free Software\n
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n
+#\n
+##############################################################################\n
+-->\n
+<xsl:stylesheet version="1.0"\n
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"\n
+  xmlns:office="http://openoffice.org/2000/office"\n
+  xmlns:style="http://openoffice.org/2000/style"\n
+  xmlns:text="http://openoffice.org/2000/text"\n
+  xmlns:table="http://openoffice.org/2000/table"\n
+  xmlns:draw="http://openoffice.org/2000/drawing"\n
+  xmlns:fo="http://www.w3.org/1999/XSL/Format"\n
+  xmlns:xlink="http://www.w3.org/1999/xlink"\n
+  xmlns:number="http://openoffice.org/2000/datastyle"\n
+  xmlns:svg="http://www.w3.org/2000/svg"\n
+  xmlns:chart="http://openoffice.org/2000/chart"\n
+  xmlns:dr3d="http://openoffice.org/2000/dr3d"\n
+  xmlns:math="http://www.w3.org/1998/Math/MathML"\n
+  xmlns:form="http://openoffice.org/2000/form"\n
+  xmlns:script="http://openoffice.org/2000/script"\n
+  xmlns:dc="http://purl.org/dc/elements/1.1/"\n
+  xmlns:meta="http://openoffice.org/2000/meta"\n
+  xmlns:config="http://openoffice.org/2001/config"\n
+  xmlns:help="http://openoffice.org/2000/help"\n
+  xmlns:tal="http://xml.zope.org/namespaces/tal"\n
+  xmlns:i18n="http://xml.zope.org/namespaces/i18n"\n
+  xmlns:metal="http://xml.zope.org/namespaces/metal">\n
+\n
+  <!--This stylesheet transform any CDATA section, tagged with TALES in style name, into attribute tal:content-->\n
+\n
+  <xsl:template match="/">\n
+    <xsl:copy select=".">\n
+      <xsl:apply-templates select="*|@*|text()|processing-instruction()|comment()"/>\n
+    </xsl:copy>\n
+  </xsl:template>\n
+\n
+  <xsl:template match="*|@*|text()|processing-instruction()|comment()">\n
+    <xsl:copy select=".">\n
+      <xsl:apply-templates select="*|@*|text()|processing-instruction()|comment()"/>\n
+    </xsl:copy>\n
+  </xsl:template>\n
+\n
+  <xsl:template match="*[contains(@*[local-name()=\'style-name\'], \'TALES\')]">\n
+    <xsl:choose>\n
+      <xsl:when test="not(text())">\n
+        <xsl:copy select=".">\n
+          <xsl:apply-templates select="*|@*|text()|processing-instruction()|comment()" mode="TALES"/>\n
+        </xsl:copy>\n
+      </xsl:when>\n
+      <xsl:otherwise>\n
+        <xsl:copy select=".">\n
+        <xsl:attribute name="tal:content">\n
+          <xsl:apply-templates select="text()"/>\n
+        </xsl:attribute>\n
+        <xsl:apply-templates select="*|@*|processing-instruction()|comment()" mode="TALES"/>\n
+        </xsl:copy>\n
+      </xsl:otherwise>\n
+    </xsl:choose>\n
+  </xsl:template>\n
+\n
+  <!-- MODE TALES -->\n
+\n
+  <xsl:template match="*|@*|text()|processing-instruction()|comment()" mode="TALES">\n
+    <xsl:copy select=".">\n
+      <xsl:apply-templates select="*|@*|text()|processing-instruction()|comment()"  mode="TALES"/>\n
+    </xsl:copy>\n
+  </xsl:template>\n
+\n
+  <xsl:template match="*[local-name()=\'p\']" mode="TALES">\n
+    <xsl:copy select=".">\n
+      <xsl:attribute name="tal:content">\n
+          <xsl:apply-templates select="*|@*|text()|processing-instruction()|comment()" mode="TALES"/>\n
+      </xsl:attribute>\n
+    </xsl:copy>\n
+  </xsl:template>\n
+</xsl:stylesheet>\n
+
+
+]]></string> </value>
+        </item>
+        <item>
+            <key> <string>title</string> </key>
+            <value> <string></string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/change_log
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/change_log?rev=18610&r1=18609&r2=18610&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/change_log (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/change_log Mon Jan  7 12:07:54 2008
@@ -1,3 +1,6 @@
+2008-01-07 Nicolas
+Add new XSL stylesheet for ERP5 OOo Templates which able to transform any CDATA section, tagged with 'TALES' in style name, into attribute tal:content
+
 2007-11-29 yusei
 * Membership criteria list in Predicate_view is sorted. Please use revision 17909 or newer version of CMFCategory.
 

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision?rev=18610&r1=18609&r2=18610&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision Mon Jan  7 12:07:54 2008
@@ -1,1 +1,1 @@
-661
+663




More information about the Erp5-report mailing list