Author: jmorliaguet
Date: Sat May 13 13:07:20 2006
New Revision: 3118

Modified:
   cpsskins/branches/paris-sprint-2006/standard/io/style.py

Log:

- import fix and we now write:

    <rule selector="div ...">
      <property name="color" value="red"/>
    </rule>

    instead of:

    <selector value="...">
      <property name="color" value="red"/>
    </selector>



Modified: cpsskins/branches/paris-sprint-2006/standard/io/style.py
==============================================================================
--- cpsskins/branches/paris-sprint-2006/standard/io/style.py    (original)
+++ cpsskins/branches/paris-sprint-2006/standard/io/style.py    Sat May 13 
13:07:20 2006
@@ -38,8 +38,8 @@
         style_el.setAttribute(u'id', unicode(IRelatable(context)))
 
         for k, v in context.items():
-            selector_el = document.createElement(u'selector')
-            selector_el.setAttribute(u'value', k)
+            selector_el = document.createElement(u'rule')
+            selector_el.setAttribute(u'selector', k)
             for name, value in v.items():
                 prop_el = document.createElement(u'property')
                 prop_el.setAttribute(u'name', name)
@@ -53,8 +53,8 @@
         context = self.context
         node = self.node
 
-        for sel in node.getElementsByTagName(u'selector'):
-            sel_name = sel.getAttribute(u'name')
+        for sel in node.getElementsByTagName(u'rule'):
+            sel_name = sel.getAttribute(u'selector')
             style_props = {}
             for prop in sel.getElementsByTagName(u'property'):
                 name = prop.getAttribute(u'name')
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to