stephan 2002/08/30 01:38:45 Modified: src/java/org/apache/cocoon/webapps/session/xml XMLUtil.java Log: Modifed another point with the same conflict. Using conditional operator. Revision Changes Path 1.7 +6 -18 xml-cocoon2/src/java/org/apache/cocoon/webapps/session/xml/XMLUtil.java Index: XMLUtil.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/webapps/session/xml/XMLUtil.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- XMLUtil.java 30 Aug 2002 08:14:57 -0000 1.6 +++ XMLUtil.java 30 Aug 2002 08:38:44 -0000 1.7 @@ -799,7 +799,7 @@ while (found == false && i < l) { item = childs.item(i); if (item.getNodeType() == Document.ELEMENT_NODE - && item.getLocalName().equals(path[startIndex]) == true) { + && path[startIndex].equals(item.getLocalName()!=null?item.getLocalName():item.getNodeName()) == true) { if (startIndex == path.length-1) { found = true; } else { @@ -863,14 +863,8 @@ item = childs.item(m); if (item.getNodeType() == Document.ELEMENT_NODE) { // Work around: org.apache.xerces.dom.ElementImpl doesn't handle getLocalName() correct - if (item.getLocalName()!=null) { - if (item.getLocalName().equals(path[startIndex]) == true) { - result.addNode(item); - } - } else { - if (item.getNodeName().equals(path[startIndex]) == true) { - result.addNode(item); - } + if (path[startIndex].equals(item.getLocalName()!=null?item.getLocalName():item.getNodeName()) == true) { + result.addNode(item); } } m++; @@ -884,14 +878,8 @@ item = childs.item(m); if (item.getNodeType() == Document.ELEMENT_NODE) { // Work around: org.apache.xerces.dom.ElementImpl doesn't handle getLocalName() correct - if (item.getLocalName()!=null) { - if (item.getLocalName().equals(path[startIndex]) == true) { - getNodesFromPath(result, item, path, startIndex+1); - } - } else { - if (item.getNodeName().equals(path[startIndex]) == true) { - getNodesFromPath(result, item, path, startIndex+1); - } + if (path[startIndex].equals(item.getLocalName()!=null?item.getLocalName():item.getNodeName()) == true) { + getNodesFromPath(result, item, path, startIndex+1); } } m++;
---------------------------------------------------------------------- In case of troubles, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]