Sorry, I copied and pasted the document. The line should look as follows:

d = server.db.queryDocument( "/db/homesite", "XUpdate", updatequery, l,
"index" )

This line was used in the program that produced the results in my previous 
email.  It will generate an error if the name of the doc-id are left out.

Cobus

-----Original Message-----
From: Daniel Kroeger [mailto:[EMAIL PROTECTED]
Sent: 13 June 2002 03:17
To: [email protected]
Subject: AW: Problem with xupdate using xml-rpc.


Hi Cobus.

am I right, if I say you forgot the id of the document to xupdate?

Both types of queries with "queryDocument", XPath or XUpdate need a doc-id.
(At least in using perl over XML-RPC)

Daniel

> -----Urspr�ngliche Nachricht-----
> Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Gesendet: Donnerstag, 13. Juni 2002 15:01
> An: [email protected]
> Betreff: Problem with xupdate using xml-rpc.
>
>
> Hi
>
> Can anyone tell me if i am doing something wrong?  I did search
> the mailing
> lists, but could not find any helpful info.
>
> I am using the xindice xml-rpc functionality with python.
>
> My system is as follows:
>
> Linux 2.4
> xinidce version 1.0
> xindice-xmlrpc-0.6
> python 2.2
>
> My XPath queries work perfectly, but the xupdate queries does not work.
>
> My program is as follows:
>
>       import xmlrpclib
>       import re
>
>       server = xmlrpclib.Server( "http://localhost:4080"; )
>
>       updatequery = """<xu:modifications version='1.0'
> xmlns:xu='http://www.xmldb.org/xupdate'>
>               <xu:update select='document/revision'>10</xu:update>
>       </xu:modifications>"""
>
>       # define the namespace for xupdate
>       l = {}
>       l['xu'] = 'http://www.xmldb.org/xupdate'
>
>       # perform the xupdate query
>       d = server.db.queryDocument( "/db/homesite", "XUpdate", updatequery,
> l )
>       print d
>
>       # perform the xpath query
>       d = server.db.queryDocument( "/db/homesite", "XPath",
> '/document/revision', {}, "index" );
>       print d
>
> The output of the XUpdate query is as follows:
>
> <?xml version="1.0"?>
> <result count="1">
>   <src:modified
> xmlns:src="http://xml.apache.org/xindice/Query";>0</src:modified>
> </result>
>
> The output of the XPath query is as follows:
>
> <?xml version="1.0"?>
> <result count="1">
>   <revision xmlns:src="http://xml.apache.org/xindice/Query";
> src:col="/db/homesite" src:key="index">$Id$</revision>
> </result>
>
> Thus:  Although the same xpath are used to locate the node (revision) for
> query and update, the xupdate query does not actually update the
> value, thus
> the result that 0 nodes are modified.
>
> I have been using xindice for a week and think it is great.  It was a snap
> configure it and perform xpath
> queries to it from zope.
>
> Regards,
> Cobus Nel
>
>
> This message contains information intended solely for the addressee,
> which is confidential or private in nature and subject to legal privilege.
> If you are not the intended recipient, you may not peruse, use,
> disseminate, distribute or copy this message or any file attached to this
> message. Any such unauthorised use is prohibited and may be unlawful. If
> you have received this message in error, please notify the sender
> immediately by e-mail, facsimile or telephone and thereafter delete the
> original message from your machine.
>
> Furthermore, the information contained in this message, and any
> attachments thereto, is for information purposes only and may contain the
> personal views and opinions of the author, which are not necessarily the
> views and opinions of Dimension Data (South Africa) (Proprietary) Limited
> or is subsidiaries and associated companies ("Dimension Data"). Dimension
> Data therefore does not accept liability for any claims, loss or damages
> of whatsoever nature, arising as a result of the reliance on such
> information by anyone.
>
> Whilst all reasonable steps are taken to ensure the accuracy and
> integrity of information transmitted electronically and to preserve the
> confidentiality thereof, Dimension Data accepts no liability or
> responsibility whatsoever if information or data is, for whatsoever
> reason, incorrect, corrupted or does not reach its intended destination.
>
>


This message contains information intended solely for the addressee,
which is confidential or private in nature and subject to legal privilege.
If you are not the intended recipient, you may not peruse, use,
disseminate, distribute or copy this message or any file attached to this
message. Any such unauthorised use is prohibited and may be unlawful. If
you have received this message in error, please notify the sender
immediately by e-mail, facsimile or telephone and thereafter delete the
original message from your machine. 
 
Furthermore, the information contained in this message, and any
attachments thereto, is for information purposes only and may contain the
personal views and opinions of the author, which are not necessarily the
views and opinions of Dimension Data (South Africa) (Proprietary) Limited
or is subsidiaries and associated companies ("Dimension Data"). Dimension
Data therefore does not accept liability for any claims, loss or damages
of whatsoever nature, arising as a result of the reliance on such
information by anyone. 
 
Whilst all reasonable steps are taken to ensure the accuracy and
integrity of information transmitted electronically and to preserve the
confidentiality thereof, Dimension Data accepts no liability or
responsibility whatsoever if information or data is, for whatsoever
reason, incorrect, corrupted or does not reach its intended destination.  
        

Reply via email to