[Pywps-commits] r858 - trunk/pywps/Parser
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Fri Oct 9 20:47:36 CEST 2009
Author: jachym
Date: 2009-10-09 20:47:35 +0200 (Fri, 09 Oct 2009)
New Revision: 858
Modified:
trunk/pywps/Parser/Execute.py
Log:
better parsing of Complex input
Modified: trunk/pywps/Parser/Execute.py
===================================================================
--- trunk/pywps/Parser/Execute.py 2009-10-01 12:23:04 UTC (rev 857)
+++ trunk/pywps/Parser/Execute.py 2009-10-09 18:47:35 UTC (rev 858)
@@ -351,11 +351,15 @@
attributes["schema"] = complexDataNode.getAttributeNS(
"*","schema")
for complexDataChildNode in complexDataNode.childNodes:
- if complexDataChildNode.nodeType == \
+ # CDATA or text and the input value is empty and the Text or
+ # CDATA is not empty
+ if (complexDataChildNode.nodeType == \
xml.dom.minidom.Text.nodeType or \
complexDataChildNode.nodeType == \
- xml.dom.minidom.CDATASection.nodeType:
+ xml.dom.minidom.CDATASection.nodeType) and\
+ complexDataChildNode.nodeValue and not attributes["value"]:
attributes["value"] = complexDataChildNode.nodeValue
+ # xml input
elif complexDataChildNode.nodeType == \
xml.dom.minidom.Element.nodeType:
attributes["value"] = complexDataChildNode.toxml()
More information about the Pywps-commits
mailing list