Hi qMax,
It seemes that the only possible way to avoid namespaces problem is not to use XSLT transfotmations in any form. Thus, regular XSLTs and XSPs (they use logicsheets) are not suitable for this. Luckly, you can use JX generator to produce the XMLDB Queries. Here is an example:
JX Template:
<?xml version="1.0"?>
<page xmlns:xmldb="http://apache.org/cocoon/xmldb/1.0">
<xmldb:query type="update" oid="${request.getParameter('channel')}.xml">
<xupdate:modifications xmlns:xupdate="http://www.xmldb.org/xupdate" version="1.0">
<xupdate:append select="/rss/channel">
<item>
<title>${request.getParameter("title")}</title>
<link>${request.getParameter("url")}</link>
<description>${request.getParameter("description")}</description>
<author>${cocoon.parameters.userId}</author>
<pubDate>${pubDate}</pubDate>
<guid isPermaLink="true">http://openskysolutions.ca:8080/TaporMain/fullNewsStory?userId=${cocoon.parameters.userId}&feedId=${feedId}</guid>
</item>
</xupdate:append>
</xupdate:modifications>
</xmldb:query>
<xmldb:query type="update" oid="extendedFeedRepository.xml">
<xupdate:modifications xmlns:xupdate="http://www.xmldb.org/xupdate" version="1.0">
<xupdate:append select="/repository/[EMAIL PROTECTED]'${request.getParameter('channel')}']">
<extendedBody author="${cocoon.parameters.userId}" bodyId="${feedId}">${request.getParameter("fulltext")}</extendedBody>
</xupdate:append>
</xupdate:modifications>
</xmldb:query>
</page>
Pipeline:
<map:match pattern="addNewsItem">
<map:generate type="jx" src="queries/updateRssQuery.xml">
<map:parameter name="userId" value="{ID}"/>
</map:generate><map:transform type="xmldb">
<map:parameter name="base" value="xmldb:exist://myhost:8080/exist/xmlrpc/db/cocoon/rss"/>
</map:transform>
<map:serialize/>
</map:match>
Sorry, this is not the best example for the namespaces, but when I tried to use it in conjuntion with topic maps (which use namespaces extensively), I was able to perform the queries.
Sincerely,
ng.
qMax wrote:
IIRC in stable cocoon release 2.1.5 there's no way to use namespaces in xmbdb-source queries as welll as with xmldb transformer.
Are there alternative solutions to use xml db with namespaces at all ?
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
