You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-users@xml.apache.org by Wouter de Vaal <wo...@hotmail.com> on 2004/02/23 12:08:53 UTC

XUpdate question

Hi,

I was hoping one of you could answer this for me. I've just started using
Xindice 1.1b3 and I've got a problem using xupdate.

I'm trying to do the following update:


<xu:modifications version="1.0" xmlns:xu="http://www.xmldb.org/xupdate">
         <xu:update
select="/page/paragraph[1]"><text>Test</text></xu:update>
</xu:modifications>


On the following document:

<?xml version="1.0"?>
   <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="C:\java\brassen\schematestingpubeditor\book.x
sd">
    <paragraph>
       <text>Test</text>
       <text>Foo2</text>
       <text>Bar</text>
       <text>Bar2</text>
   </paragraph>
   <paragraph>
       <text>Test2</text>
       <text>Testing</text>
       </paragraph>
</page>

I was hoping to replace the contents of paragraph all together with one text
element, but I get the following error.
org.xmldb.api.base.XMLDBException: :Error Compiling XUpdate Query
        at
org.apache.xindice.client.xmldb.xmlrpc.CollectionImpl.runRemoteComman
d(CollectionImpl.java:201)
        at
org.apache.xindice.client.xmldb.xmlrpc.CollectionImpl.query(Collectio
nImpl.java:592)
        at
org.apache.xindice.client.xmldb.services.QueryService.queryResource(Q
ueryService.java:111)
        at
org.apache.xindice.client.xmldb.services.XUpdateQueryServiceImpl.upda
teResource(XUpdateQueryServiceImpl.java:131)
        at
org.apache.xindice.tools.command.XUpdate.execute(XUpdate.java:139)
        at org.apache.xindice.tools.XMLTools.execute(XMLTools.java:336)
        at org.apache.xindice.tools.XMLTools.process(XMLTools.java:213)
        at org.apache.xindice.tools.XMLTools.main(XMLTools.java:124)
ERROR : :Error Compiling XUpdate Query

What could be wrong?

Regards,
Wouter

Re: XUpdate question

Posted by Wouter de Vaal <wo...@hotmail.com>.
Does anyone has an answer on this?

Could it be that only values within leaf nodes are allowed to be updated
with plain text?

Thanks,
Wouter

----- Original Message ----- 
From: "Wouter de Vaal" <wo...@hotmail.com>
To: <xi...@xml.apache.org>
Sent: Monday, February 23, 2004 12:08 PM
Subject: XUpdate question


> Hi,
>
> I was hoping one of you could answer this for me. I've just started using
> Xindice 1.1b3 and I've got a problem using xupdate.
>
> I'm trying to do the following update:
>
>
> <xu:modifications version="1.0" xmlns:xu="http://www.xmldb.org/xupdate">
>          <xu:update
> select="/page/paragraph[1]"><text>Test</text></xu:update>
> </xu:modifications>
>
>
> On the following document:
>
> <?xml version="1.0"?>
>    <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
xsi:noNamespaceSchemaLocation="C:\java\brassen\schematestingpubeditor\book.x
> sd">
>     <paragraph>
>        <text>Test</text>
>        <text>Foo2</text>
>        <text>Bar</text>
>        <text>Bar2</text>
>    </paragraph>
>    <paragraph>
>        <text>Test2</text>
>        <text>Testing</text>
>        </paragraph>
> </page>
>
> I was hoping to replace the contents of paragraph all together with one
text
> element, but I get the following error.
> org.xmldb.api.base.XMLDBException: :Error Compiling XUpdate Query
>         at
> org.apache.xindice.client.xmldb.xmlrpc.CollectionImpl.runRemoteComman
> d(CollectionImpl.java:201)
>         at
> org.apache.xindice.client.xmldb.xmlrpc.CollectionImpl.query(Collectio
> nImpl.java:592)
>         at
> org.apache.xindice.client.xmldb.services.QueryService.queryResource(Q
> ueryService.java:111)
>         at
> org.apache.xindice.client.xmldb.services.XUpdateQueryServiceImpl.upda
> teResource(XUpdateQueryServiceImpl.java:131)
>         at
> org.apache.xindice.tools.command.XUpdate.execute(XUpdate.java:139)
>         at org.apache.xindice.tools.XMLTools.execute(XMLTools.java:336)
>         at org.apache.xindice.tools.XMLTools.process(XMLTools.java:213)
>         at org.apache.xindice.tools.XMLTools.main(XMLTools.java:124)
> ERROR : :Error Compiling XUpdate Query
>
> What could be wrong?
>
> Regards,
> Wouter
>