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 ([EMAIL PROTECTED])
  
  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:[EMAIL PROTECTED]">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:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to