You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-dev@xml.apache.org by vg...@apache.org on 2004/02/06 14:08:07 UTC

cvs commit: xml-xindice/java/lib xmldb-xupdate-20040205.jar xmldb-xupdate.jar

vgritsenko    2004/02/06 05:08:07

  Modified:    java/src/org/apache/xindice/core/xupdate XUpdateImpl.java
  Added:       java/lib xmldb-xupdate-20040205.jar
  Removed:     java/lib xmldb-xupdate.jar
  Log:
  Update XUpdate implementation to current CVS version
  
  Revision  Changes    Path
  1.11      +15 -15    xml-xindice/java/src/org/apache/xindice/core/xupdate/XUpdateImpl.java
  
  Index: XUpdateImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xindice/java/src/org/apache/xindice/core/xupdate/XUpdateImpl.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- XUpdateImpl.java	9 Aug 2003 05:01:56 -0000	1.10
  +++ XUpdateImpl.java	6 Feb 2004 13:08:07 -0000	1.11
  @@ -120,7 +120,7 @@
           if (nsMap == null) {
               nsMap = new NamespaceMap();
           }
  -        nsMap.includeNamespaces(_namespaces, !API_NS_PRECEDENCE);
  +        nsMap.includeNamespaces(super.namespaces, !API_NS_PRECEDENCE);
       }
   
   
  @@ -129,9 +129,9 @@
        */
       public void execute(Node contextNode) throws Exception {
           CommandObject currentCommand = new DefaultCommand(contextNode);
  -        Enumeration commands = _query[0].elements();
  -        Enumeration attributes = _query[1].elements();
  -        Enumeration characters = _query[2].elements();
  +        Enumeration commands = super.query[0].elements();
  +        Enumeration attributes = super.query[1].elements();
  +        Enumeration characters = super.query[2].elements();
           Node origNode = contextNode;
           CommandObject.getXPath().setNamespace(nsMap.getContextNode());
   
  @@ -144,10 +144,10 @@
                   currentCommand.submitCharacters((String) characters.nextElement());
               } else if (id > 0) {
                   if (!currentCommand.submitInstruction(id)) {
  -                    _commands.setContextNode(contextNode);
  -                    currentCommand = _commands.commandForID(id);
  +                    super.commandConstants.setContextNode(contextNode);
  +                    currentCommand = super.commandConstants.commandForID(id);
                       if (currentCommand == null) {
  -                        throw new Exception("operation can not have any XUpdate-instruction !");
  +                        throw new Exception("Operation can not have any XUpdate-instruction!");
                       }
                       currentCommand.reset();
                   }
  @@ -156,7 +156,7 @@
                       try {
                           contextNode = currentCommand.execute();
                       } catch (Exception e) {
  -                        // while not ideal, CommandObject.execute throws
  +                        // While not ideal, CommandObject.execute throws
                           // Exception("no nodes selected !") if nothing is
                           // selected for modification we trap that case
                           // and ignore allowing continued processing
  @@ -165,7 +165,7 @@
                               throw e;
                           }
                       }
  -                    // default do-nothing command will soak up anything
  +                    // Default do-nothing command will soak up anything
                       // (characters, attributes, etc.) encountered until we
                       // come across the next xupdate instruction
                       // (e.g. remove, append, insert, etc.)
  @@ -191,11 +191,11 @@
       public void execute(Collection col) throws Exception {
   
           int attribIndex = 0;
  -        for (int i = 0; i < _query[0].size(); i++) {
  -            int cmdID = ((Integer) _query[0].elementAt(i)).intValue();
  +        for (int i = 0; i < super.query[0].size(); i++) {
  +            int cmdID = ((Integer) super.query[0].elementAt(i)).intValue();
   
               if (cmdID == CommandConstants.ATTRIBUTES) {
  -                Hashtable attribs = (Hashtable) _query[1].elementAt(attribIndex);
  +                Hashtable attribs = (Hashtable) super.query[1].elementAt(attribIndex);
                   attribIndex++;
                   String selector = (String) attribs.get("select");
   
  @@ -212,7 +212,7 @@
                           } else {
                               lastDoc = doc;
                           }
  -                        
  +
                           NodeSource source = node.getSource();
   
                           Node contextNode = doc.getDocumentElement();
  
  
  
  1.1                  xml-xindice/java/lib/xmldb-xupdate-20040205.jar
  
  	<<Binary file>>