The oid is the unique identifier asigned to the document when you inserted
in in the DB.
I guess you have to make a search before updating it and get the oid. Then
you could use it in your XUpdate query.

Of course, you can also use the transformer for the former query.

Best.

ps: I only used the XMLDBTransformer with Xindice and haven't tried with 1.1
yet. If you're using that one, maybe you error could be due to another
cause.


----- Original Message -----
From: "Irv Salisbury III" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 12, 2003 8:52 PM
Subject: Re: XUpdate


> When running this, I get "Failed to update resource xmldb-object-id: 1"
>  The sitemap log file says it cannot compile the query.  What is the oid
> supposed to be?  I don't have anything that seems to match up, or does
> that even matter?
>
> Irv
>
> Josema Alonso wrote:
>
> >Irv,
> >I remember I built the javadoc that came with the transformer and it was
> >pretty easy to use starting there. I suggest you do the same.
> >Anyway if you want a snippet I can give you this.
> >
> >The transformer is declared in the sitemap this way:
> >   <map:transformer name="xmldb"
> >src="org.apache.cocoon.transformation.XMLDBTransformer">
> >    <driver>org.apache.xindice.client.xmldb.DatabaseImpl</driver>
> >    <base>xmldb:xindice:///db</base>
> >   </map:transformer>
> >
> >Then is used on a pipeline like any other transformer. The syntax it uses
> >for XUpdate queries for example is:
> ><xindice:query type="update" oid="xmldb-object-id">
> >  <xu:modifications version="1.0"
xmlns:xu="http://www.xmldb.org/xupdate";>
> >    <xu:remove select="/person/[EMAIL PROTECTED] = 'home']"/>
> >    <xu:update select="/person/[EMAIL PROTECTED] = 'work']">
> >      480-300-3003
> >    </xu:update>
> >    </xu:modifications>
> ></xindice:query>
> >
> >As I said is pretty straightforward.
> >
> >Hope it helps.
> >
> >----- Original Message -----
> >From: Irving Salisbury
> >To: [EMAIL PROTECTED]
> >Sent: Sunday, March 09, 2003 5:38 AM
> >Subject: Re: XUpdate
> >
> >
> >This is great news.  I don't suppose there are any preliminary docs on
this
> >as far as what type of XML it is looking for, etc?  I can go rooting
around
> >in the source, but any docs or even any examples that make use of it
would
> >be a huge help.
> >
> >Thanks,
> >
> >Irv
> >
> >Josema Alonso wrote:
> >
> >Hey, Irv
> >
> >There's a XMLDBTransformer available. It was in Scratchpad but it was
moved
> >to a new xmldb block in the CVS repository.
> >Please, checkout a fresh 2.1 from CVS and you'll foun it there or at its
> >block: http://cvs.apache.org/viewcvs.cgi/xml-cocoon2/src/blocks/xmldb/
> >
> >I have used it succesfully quite a while ago.
> >
> >Best,
> >Josema.
> >
> >----- Original Message -----
> >From: "Irving Salisbury" <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >Sent: Saturday, March 08, 2003 7:54 PM
> >Subject: XUpdate
> >
> >
> >
> >I am interested in using xupdate commands to xindice from within Cocoon.
> > First, is there something like an XUpdateTransformer that would allow
> >me to do this within a pipeline?  If not, are there any actions, etc
> >that help out?  If anyone has any links that would be helpful, that
> >would be great.
> >
> >Thanks,
> >
> >Irv
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to