cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <cziege...@sundn.de>
Subject [C2]: Bug in XIncludeSAXConnector
Date Fri, 27 Apr 2001 11:40:17 GMT
Hi,

wow I was only three days out of office and so much did happen
with C2 - this is great, but...

Using the latest C2 several C2 applications are not working
any more due to the XIncludeSAXConnector.
The problem lies in the startElement method:
<code>
     ....
     if (uri == null || uri.equals("")) {
            uri = (String)this.getNS();
     }
     this.pushNS(uri);
     super.startElement(uri, name, raw, attr);
</code>

If the current element has no namespace (uri is then ""),
it is assumed that this element has the same namespace
then the previous element. This is of course not always
true.
If you use the following xml:

<t:page xmlns:t="test">
 <title>Hello</title>
 <content>
  <para>This is my first Cocoon2 page!</para>
 </content>
</t:page>

all elements get the namespace of the page element.


Carsten 

Open Source Group                        sunShine - b:Integrated
================================================================
Carsten Ziegeler, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
www.sundn.de                          mailto: cziegeler@sundn.de 
================================================================




---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message