blob: f9ef3d2dbfa5ecf1a0ff000bf1cf90dda6f89756 [file] [log] [blame]
{
"http://purl.org/dc/terms/rights": "Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the 'License'); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.",
"http://purl.org/dc/terms/license": {"@id": "http://www.apache.org/licenses/LICENSE-2.0"},
"classLoaderSharing" : "workflow",
"script" : "import org.dom4j.Document;\nimport org.dom4j.Node;\nimport org.dom4j.io.SAXReader;\n\nSAXReader reader = new SAXReader(false);\nreader.setIncludeInternalDTDDeclarations(false);\nreader.setIncludeExternalDTDDeclarations(false);\n\nDocument document = reader.read(new StringReader(xmltext));\nList nodelist = document.selectNodes(xpath);\n\n// Process the elements in the nodelist\nArrayList outputList = new ArrayList();\nArrayList outputXmlList = new ArrayList();\n\nString val = null;\nString xmlVal = null;\nfor (Iterator iter = nodelist.iterator(); iter.hasNext();) {\n\tNode element = (Node) iter.next();\n\txmlVal = element.asXML();\n\tval = element.getStringValue();\n\tif (val != null && !val.equals(\"\")) {\n\t\toutputList.add(val);\n\t\toutputXmlList.add(xmlVal);\n\t}\n\n}\n\nList nodelist=outputList;\nList nodelistAsXML=outputXmlList;",
"localworkerName" : "net.sourceforge.taverna.scuflworkers.xml.XPathTextWorker",
"inputPorts" : [ {
"name" : "xpath",
"depth" : 0,
"type" : "String"
}, {
"name" : "xml-text",
"depth" : 0,
"type" : "String"
} ],
"outputPorts" : [ {
"name" : "nodelist",
"depth" : 1,
"granularDepth" : 1
}, {
"name" : "nodelistAsXML",
"depth" : 1,
"granularDepth" : 1
} ],
"isAltered" : false
}