cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephan Michels <step...@vern.chem.tu-berlin.de>
Subject XUpdate
Date Mon, 25 Feb 2002 17:26:54 GMT
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


Mime
View raw message