You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2004/07/11 00:59:55 UTC

cvs commit: cocoon-lenya/src/java/org/apache/lenya/cms/publication CollectionImpl.java

andreas     2004/07/10 15:59:55

  Modified:    src/java/org/apache/lenya/cms/publication
                        CollectionImpl.java
  Log:
  replaced DOM level 1 by DOM level 2 methods
  
  Revision  Changes    Path
  1.13      +4 -4      cocoon-lenya/src/java/org/apache/lenya/cms/publication/CollectionImpl.java
  
  Index: CollectionImpl.java
  ===================================================================
  RCS file: /home/cvs/cocoon-lenya/src/java/org/apache/lenya/cms/publication/CollectionImpl.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- CollectionImpl.java	3 May 2004 13:55:10 -0000	1.12
  +++ CollectionImpl.java	10 Jul 2004 22:59:55 -0000	1.13
  @@ -171,8 +171,8 @@
               
               NamespaceHelper helper = getNamespaceHelper();
               Element collectionElement = helper.getDocument().getDocumentElement();
  -            if (collectionElement.getAttribute(ATTRIBUTE_ID) == null | collectionElement.getAttribute(ATTRIBUTE_ID).equals("")) {
  -                collectionElement.setAttribute(ATTRIBUTE_ID, this.getId());
  +            if (collectionElement.getAttributeNS(null, ATTRIBUTE_ID) == null | collectionElement.getAttribute(ATTRIBUTE_ID).equals("")) {
  +                collectionElement.setAttributeNS(null, ATTRIBUTE_ID, this.getId());
               }                   
               Element[] existingDocumentElements = helper.getChildren(collectionElement, ELEMENT_DOCUMENT);
               for (int i = 0; i < existingDocumentElements.length; i++) {
  @@ -211,7 +211,7 @@
       protected Element createDocumentElement(Document document, NamespaceHelper helper)
           throws DocumentException {
           Element documentElement = helper.createElement(ELEMENT_DOCUMENT);
  -        documentElement.setAttribute(ATTRIBUTE_ID, document.getId());
  +        documentElement.setAttributeNS(null, ATTRIBUTE_ID, document.getId());
           return documentElement;
       }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-cvs-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-cvs-help@cocoon.apache.org