You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Carsten Ziegeler <cz...@sundn.de> on 2001/04/27 13:40:17 UTC

[C2]: Bug in XIncludeSAXConnector

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