You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by di...@apache.org on 2001/05/15 17:32:02 UTC

cvs commit: xml-cocoon2/src/org/apache/cocoon/sitemap ContentAggregator.java

dims        01/05/15 08:32:01

  Modified:    src/org/apache/cocoon/sitemap ContentAggregator.java
  Log:
  Patch for "Showstopper: Error in Content Aggregation code!"
  from Vadim Gritsenko (vgritsenko@hns.com)
  
  Revision  Changes    Path
  1.2       +4 -4      xml-cocoon2/src/org/apache/cocoon/sitemap/ContentAggregator.java
  
  Index: ContentAggregator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/sitemap/ContentAggregator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ContentAggregator.java	2001/05/09 20:49:36	1.1
  +++ ContentAggregator.java	2001/05/15 15:31:54	1.2
  @@ -38,7 +38,7 @@
   
   /**
    * @author <a href="mailto:giacomo@apache.org">Giacomo Pati</a>
  - * @version CVS $Id: ContentAggregator.java,v 1.1 2001/05/09 20:49:36 giacomo Exp $
  + * @version CVS $Id: ContentAggregator.java,v 1.2 2001/05/15 15:31:54 dims Exp $
    */
   
   public class ContentAggregator extends ContentHandlerWrapper
  @@ -143,7 +143,7 @@
                   this.rootElementIndex = (part.stripRootElement ? 0 : -1);
                   String ns = part.namespace;
                   String prefix = part.prefix;
  -                if (ns.equals("")) {
  +                if (ns == null || ns.equals("")) {
                       ns = this.getNS();
                       prefix = "";
                   }
  @@ -340,7 +340,7 @@
       private void endElem(String prefix, String name) throws SAXException {
           String ns = this.popNS();
           this.documentHandler.endElement(ns, name, name);
  -        if (!ns.equals("")) {
  +        if (ns != null && !ns.equals("")) {
               this.documentHandler.endPrefixMapping(prefix);
           }
       }
  @@ -357,7 +357,7 @@
       public void startElement (String namespaceURI, String localName,
                     String qName, Attributes atts) throws SAXException {
           String ns = namespaceURI;
  -        if (ns.equals("")) {
  +        if (ns ==null || ns.equals("")) {
               ns = (String)this.getNS();
           }
           this.pushNS(ns);
  
  
  

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