[CMF-checkins] CVS: CMF/CMFSetup - typeinfo.py:1.10 utils.py:1.11
workflow.py:1.23
Yvo Schubbe
y.2004_ at wcm-solutions.de
Mon Jul 19 16:09:07 EDT 2004
Update of /cvs-repository/CMF/CMFSetup
In directory cvs.zope.org:/tmp/cvs-serv2175/CMFSetup
Modified Files:
typeinfo.py utils.py workflow.py
Log Message:
- converted workflow definition descriptions to 'description' sub-elements
- removed some whitespace in xml output
=== CMF/CMFSetup/typeinfo.py 1.9 => 1.10 ===
--- CMF/CMFSetup/typeinfo.py:1.9 Mon Jul 19 14:11:36 2004
+++ CMF/CMFSetup/typeinfo.py Mon Jul 19 16:08:36 2004
@@ -18,6 +18,7 @@
from actions import _extractActionNodes
from permissions import ManagePortal
from utils import _coalesceTextNodeChildren
+from utils import _extractDescriptionNode
from utils import _getNodeAttribute
from utils import _queryNodeAttribute
from utils import _queryNodeAttributeBoolean
@@ -321,11 +322,6 @@
result.append(value)
return tuple(result)
-
-def _extractDescriptionNode(parent, encoding=None):
-
- d_node = parent.getElementsByTagName('description')[0]
- return _coalesceTextNodeChildren(d_node, encoding)
def _extractAliasesNode(parent, encoding=None):
=== CMF/CMFSetup/utils.py 1.10 => 1.11 ===
--- CMF/CMFSetup/utils.py:1.10 Mon Jul 19 14:11:36 2004
+++ CMF/CMFSetup/utils.py Mon Jul 19 16:08:36 2004
@@ -185,3 +185,11 @@
joined = joined.encode( encoding )
return ''.join( [ line.lstrip() for line in joined.splitlines(True) ] )
+
+def _extractDescriptionNode(parent, encoding=None):
+
+ d_nodes = parent.getElementsByTagName('description')
+ if d_nodes:
+ return _coalesceTextNodeChildren(d_nodes[0], encoding)
+ else:
+ return ''
=== CMF/CMFSetup/workflow.py 1.22 => 1.23 ===
--- CMF/CMFSetup/workflow.py:1.22 Thu Jul 1 19:14:23 2004
+++ CMF/CMFSetup/workflow.py Mon Jul 19 16:08:36 2004
@@ -21,6 +21,7 @@
from utils import _queryNodeAttribute
from utils import _getNodeAttributeBoolean
from utils import _coalesceTextNodeChildren
+from utils import _extractDescriptionNode
TRIGGER_TYPES = ( 'AUTOMATIC', 'USER', 'WORKFLOW_METHOD' )
@@ -797,7 +798,7 @@
info = { 'state_id' : _getNodeAttribute( s_node, 'state_id', encoding )
, 'title' : _getNodeAttribute( s_node, 'title', encoding )
- , 'description' : _coalesceTextNodeChildren( s_node, encoding )
+ , 'description' : _extractDescriptionNode( s_node, encoding )
}
info[ 'transitions' ] = [ _getNodeAttribute( x, 'transition_id'
@@ -859,7 +860,7 @@
info = { 'transition_id' : _getNodeAttribute( t_node, 'transition_id'
, encoding )
, 'title' : _getNodeAttribute( t_node, 'title', encoding )
- , 'description' : _coalesceTextNodeChildren( t_node, encoding )
+ , 'description' : _extractDescriptionNode( t_node, encoding )
, 'new_state' : _getNodeAttribute( t_node, 'new_state'
, encoding )
, 'trigger' : _getNodeAttribute( t_node, 'trigger', encoding )
@@ -891,7 +892,7 @@
info = { 'variable_id' : _getNodeAttribute( v_node, 'variable_id'
, encoding )
- , 'description' : _coalesceTextNodeChildren( v_node, encoding )
+ , 'description' : _extractDescriptionNode( v_node, encoding )
, 'for_catalog' : _getNodeAttributeBoolean( v_node
, 'for_catalog'
)
@@ -918,7 +919,7 @@
info = { 'worklist_id' : _getNodeAttribute( w_node, 'worklist_id'
, encoding )
, 'title' : _getNodeAttribute( w_node, 'title' , encoding )
- , 'description' : _coalesceTextNodeChildren( w_node, encoding )
+ , 'description' : _extractDescriptionNode( w_node, encoding )
, 'match' : _extractMatchNode( w_node, encoding )
, 'action' : _extractActionNode( w_node, encoding )
, 'guard' : _extractGuardNode( w_node, encoding )
More information about the CMF-checkins
mailing list