vgritsenko 2002/08/12 15:24:38
Modified: tools/src XConfToolTask.java
Log:
add support for insert-after attribute
Revision Changes Path
1.7 +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.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- XConfToolTask.java 8 May 2002 09:55:27 -0000 1.6
+++ XConfToolTask.java 12 Aug 2002 22:24:38 -0000 1.7
@@ -196,6 +196,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]