You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cz...@apache.org on 2002/06/06 12:27:06 UTC

cvs commit: xml-cocoon2/src/java/org/apache/cocoon/webapps/session/xml XMLUtil.java

cziegeler    2002/06/06 03:27:06

  Modified:    src/java/org/apache/cocoon/webapps/session/xml XMLUtil.java
  Log:
  Fixed minor bug in attribute creation
  
  Revision  Changes    Path
  1.3       +6 -4      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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XMLUtil.java	19 Apr 2002 11:02:59 -0000	1.2
  +++ XMLUtil.java	6 Jun 2002 10:27:06 -0000	1.3
  @@ -95,7 +95,7 @@
    * @deprecated Do not use this class! We will provide a better solution for most methods soon.
    *
    * @author <a href="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
  - * @version CVS $Id: XMLUtil.java,v 1.2 2002/04/19 11:02:59 cziegeler Exp $
  + * @version CVS $Id: XMLUtil.java,v 1.3 2002/06/06 10:27:06 cziegeler Exp $
   */
   public final class XMLUtil {
   
  @@ -198,7 +198,9 @@
                   }
                   if (isAttribute == true) {
                       try {
  -                        newNode = XMLUtil.getOwnerDocument(rootNode).createAttributeNS(null, nodeName);
  +                        newNode = XMLUtil.getOwnerDocument(rootNode).createAttributeNS(null, nodeName.substring(1));
  +                        ((Element)parent).setAttributeNodeNS((org.w3c.dom.Attr)newNode);
  +                        parent = newNode;
                       } catch (DOMException local) {
                           throw new ProcessingException("Unable to create new DOM node: '"+nodeName+"'.", local);
                       }
  @@ -239,9 +241,9 @@
                               }
                           }
                       }
  +                    parent.appendChild(newNode);
  +                    parent = newNode;
                   }
  -                parent.appendChild(newNode);
  -                parent = newNode;
               } else {
                   parent = singleNode;
               }
  
  
  

----------------------------------------------------------------------
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