cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject cvs commit: xml-cocoon2/tools/src XConfToolTask.java
Date Mon, 12 Aug 2002 22:24:38 GMT
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:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message