You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Irving Salisbury <ir...@dotech.com> on 2003/03/08 19:54:12 UTC
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: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
Re: XUpdate
Posted by Irving Salisbury <ir...@dotech.com>.
That does seem pretty straightforward. Thanks.
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/phone[@type = 'home']"/>
> <xu:update select="/person/phone[@type = '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: cocoon-users@xml.apache.org
>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" <ir...@dotech.com>
>To: <co...@xml.apache.org>
>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: cocoon-users-unsubscribe@xml.apache.org
>For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
>
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
>For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
>For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
Re: XUpdate
Posted by Josema Alonso <jo...@simbiosystems.com>.
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" <ir...@dotech.com>
To: <co...@xml.apache.org>
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/phone[@type = 'home']"/>
> > <xu:update select="/person/phone[@type = '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: cocoon-users@xml.apache.org
> >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" <ir...@dotech.com>
> >To: <co...@xml.apache.org>
> >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: cocoon-users-unsubscribe@xml.apache.org
> >For additional commands, e-mail: cocoon-users-help@xml.apache.org
> >
> >
> >
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> >For additional commands, e-mail: cocoon-users-help@xml.apache.org
> >
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> >For additional commands, e-mail: cocoon-users-help@xml.apache.org
> >
> >
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
Re: XUpdate
Posted by Irv Salisbury III <ir...@dotech.com>.
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/phone[@type = 'home']"/>
> <xu:update select="/person/phone[@type = '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: cocoon-users@xml.apache.org
>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" <ir...@dotech.com>
>To: <co...@xml.apache.org>
>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: cocoon-users-unsubscribe@xml.apache.org
>For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
>
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
>For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
>For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
Re: XUpdate
Posted by Josema Alonso <jo...@simbiosystems.com>.
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/phone[@type = 'home']"/>
<xu:update select="/person/phone[@type = '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: cocoon-users@xml.apache.org
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" <ir...@dotech.com>
To: <co...@xml.apache.org>
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: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
Re: XUpdate
Posted by Irving Salisbury <ir...@dotech.com>.
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" <ir...@dotech.com>
>To: <co...@xml.apache.org>
>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: cocoon-users-unsubscribe@xml.apache.org
>>For additional commands, e-mail: cocoon-users-help@xml.apache.org
>>
>>
>>
>>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
>For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
>
Re: XUpdate
Posted by Josema Alonso <jo...@simbiosystems.com>.
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" <ir...@dotech.com>
To: <co...@xml.apache.org>
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: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org