cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephan Michels <step...@vern.chem.tu-berlin.de>
Subject Re: XMLDBTransformer - UPDATE and the missing namespace
Date Fri, 01 Mar 2002 14:27:51 GMT


On Fri, 1 Mar 2002, Stephan Michels wrote:
> On Fri, 1 Mar 2002, Christian Zoffoli wrote:
> > I have found a problem on the xupdate document submitted by
> > XMLDBTransformer to the XUpdateQueryService, it seems that the namespace
> > xmlns:xu="http://www.xmldb.org/xupdate" was erased by the original
> > document.
> >
> > Why ??
> >
> > ...after reading the bug pointed by Vadim Gritsenko at the beginning of
> > the code I substituted Xalan with other processors (saxon, xt) ...but
> > the result was the same. Any hints ?
> >
>
> > > I found that the problem with xupdate is due to xalan ...it
> > > erases a part of the submitted document (the namespace)
> > >
> > > <xu:modifications version="1.0"
> > >        xmlns:xu="http://www.xmldb.org/xupdate\>
> > >  <xu:update select="/users/user[@id = '1']/email">pippo</xu:update>
> > > </xu:modifications>
> > >
> > > became
> > >
> > > <?xml version="1.0" encoding="UTF-8"?>
> > >
> > >        <xu:modifications version="1.0">
> > >                <xu:update select="/users/user[@id =
> > >  '1']/email">pippo</xu:update>
> > >        </xu:modifications>
> > >
> > > and so it doesn't work.
>
> Thank you first.
>
> Why use the transformer not the org.apache.xml.serialize.XMLSerializer
> instead?
>
> Should I rewrite the transformer, or will be there a solution in the next
> time?

I have now simply replace the javax.xml.transform.sax.TransformerHandler
stuff by XMLSerializer to find the bug.

And now I got following exception:

Original exception : java.lang.ArrayIndexOutOfBoundsException: -1
at
org.apache.xerces.util.NamespaceSupport.popContext(NamespaceSupport.java:218)
at
org.apache.xml.serialize.XMLSerializer.endElementIO(XMLSerializer.java:400)
at
org.apache.xml.serialize.XMLSerializer.endElement(XMLSerializer.java:387)
at
org.apache.cocoon.transformation.XMLDBTransformer.endElement(XMLDBTransformer.java:480)
[..]

Perhaps it is the same error...

I attached a little test scenario and the patch.

Can anyone help me?

Thanx, Stephan Michels.

Mime
View raw message