cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <vadim.gritse...@verizon.net>
Subject RE: XUpdate
Date Mon, 25 Feb 2002 18:09:12 GMT
Take a look at
http://cvs.apache.org/viewcvs.cgi/xml-cocoon2/src/scratchpad/src/org/apa
che/cocoon/transformation/XMLDBTransformer.java?rev=1.6&content-type=tex
t/vnd.viewcvs-markup


Vadim

> -----Original Message-----
> From: Stephan Michels [mailto:stephan@vern.chem.tu-berlin.de]
> Sent: Monday, February 25, 2002 12:27 PM
> To: cocoon-dev
> Subject: XUpdate
> 
> Hi,
> 
> had somebody write a XUpdate transformer, or think about to write
> a xupdate transformer?
> 
> I get some bad headache, if I write more from this:
> <xsp:page language="java"
>           xmlns:xsp="http://apache.org/xsp"
>           xmlns:xsp-request="http://apache.org/xsp/request/2.0">
> 
> <xsp:structure>
>  <xsp:include>org.xmldb.api.base.*</xsp:include>
>  <xsp:include>org.xmldb.api.modules.*</xsp:include>
>  <xsp:include>org.xmldb.api.*</xsp:include>
> </xsp:structure>
> 
> [...]
> 
> <xsp:logic>
> 
> [...]
> 
>     String xupdate = "&lt;xu:modifications version=\"1.0\"" +
>       " xmlns:xu=\"http://www.xmldb.org/xupdate\">" +
>       "   &lt;xu:remove
> select=\"/db/object[@id='"+request.getParameter("id")+"']\"/>" +
>       " &lt;xu:append select=\"/db\">"+
>       /*"  &lt;xu:element name=\"object\"> " +
>       "   &lt;xu:attribute name=\"id\">"+uid+"&lt;/xu:attribute> " +
>       "   &lt;xu:attribute
> name=\"refid\">"+request.getParameter("oid")+"&lt;/xu:attribute> " +
>       "  &lt;/xu:element> " +*/
>       "  &lt;object id=\""+request.getParameter("id")+"\"" +
>       "             basedir=\""+request.getParameter("basedir")+"\""+
>       "             file=\""+request.getParameter("file")+"\""+
>       "
extension=\""+request.getParameter("extension")+"\""+
>       "             author=\""+request.getParameter("author")+"\""+
>       "/>"+
>       " &lt;/xu:append> " +
>       "&lt;/xu:modifications>";
> 
>     XUpdateQueryService service =
>       (XUpdateQueryService) col.getService("XUpdateQueryService",
"1.0");
>       service.update(xupdate);
> 
> Thanx, Stephan.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org


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


Mime
View raw message