vgritsenko 2002/08/12 15:24:37 Modified: tools/src Tag: cocoon_2_0_3_branch XConfToolTask.java Log: add support for insert-after attribute Revision Changes Path No revision No revision 1.4.2.1 +12 -1 xml-cocoon2/tools/src/XConfToolTask.java Index: XConfToolTask.java =================================================================== RCS file: /home/cvs/xml-cocoon2/tools/src/XConfToolTask.java,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -u -r1.4 -r1.4.2.1 --- XConfToolTask.java 26 Mar 2002 12:43:03 -0000 1.4 +++ XConfToolTask.java 12 Aug 2002 22:24:37 -0000 1.4.2.1 @@ -171,6 +171,17 @@ + nodes.getLength() + " nodes"); } before = nodes.item(0); + } else { + xpath = component.getDocumentElement().getAttribute("insert-after"); + if (xpath != null && xpath.length() > 0) { + nodes = XPathAPI.selectNodeList(root, xpath); + if (nodes.getLength() != 1) { + System.out.println("Error in: " + file); + throw new IOException("XPath (" + xpath + ") returned not one node, but " + + nodes.getLength() + " nodes"); + } + before = nodes.item(0).getNextSibling(); + } } // Add 'component' data into 'root' node
---------------------------------------------------------------------- In case of troubles, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]