You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Christian Zoffoli <cz...@littlepenguin.org> on 2002/03/01 04:04:17 UTC

XMLDBTransformer - UPDATE and the missing namespace

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 ?


thanks in advance,
		Christian

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


Re: XMLDBTransformer - UPDATE and the missing namespace

Posted by Christian Zoffoli <cz...@littlepenguin.org>.
...removing xalan*.jar for the dir WEB-INF/lib and using resin it works
fine (probably ...the processor integrated in resin hasn't this kind of
problem).


Christian

P.S. Probably it works also with xt and saxon (...I suspect some
mistakes in my configuration ....where could I find some good infos on
configuring alternatives processors ?

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


Re: XMLDBTransformer - UPDATE and the missing namespace

Posted by Stephan Michels <st...@vern.chem.tu-berlin.de>.

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.

Re: XMLDBTransformer - UPDATE and the missing namespace

Posted by Stephan Michels <st...@vern.chem.tu-berlin.de>.

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?

Thank you, Stephan Michels.


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