Hi All,
Its the similar scenario as is been discussed on the list this days for "Dynamic
Aggregation", but a different flavor. What I am trying to acheive is aggregate a bunch
of XML documents into a large XML document with the contents of all those small XML
documents. But I am not sure what XML documents need to be aggregated, so you can say
the list of XML documents to be aggregated is Dynamically generated. I read all the
answers to the queries asked on "Dynamic Aggregation" . But that was too complex for
me right now and I am not a Cocoon guy, started learning few days back.
So heres my sitemap.xmap :
<map:match pattern="adh/user/search">
<map:generate src="adh/resources/search.xml"/>
<map:transform src="adh/styles/buildsearch.xsl">
<map:parameter name="use-request-parameters" value="true"/>
</map:transform>
<map:transform type="sql">
<map:parameter name="use-connection" value="portal"/>
</map:transform>
<map:transform src="adh/styles/builddocument.xsl"/>
<map:transform type="cinclude"/>
<map:serialize type="html"/>
</map:match>
========================================================
The output I get after the buildsearch.xsl looks like this:
<results>
<rowset>
<row>
<uri>adh/resources/fragments/abstractlist.xml</uri>
</row>
<row>
<uri>adh/resources/fragments/arraylist.xml</uri>
</row>
<row>
<uri>adh/resources/fragments/linkedlist.xml</uri>
</row>
<row>
<uri>adh/resources/fragments/vector.xml</uri>
</row>
</rowset>
</results>
===================================================================
Now I am trying to capture all thats in the <uri> and aggregate those xml documents,
thats what I am doing in my builddocument.xsl , which looks like this:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:sql="http://apache.org/cocoon/SQL/2.0"
xmlns:cinclude="http://apache.org/cocoon/include/1.0">
<xsl:template match="results">
<frag>
<xsl:for-each select="sql:rowset/sql:row/sql:uri">
<xsl:apply-templates select="sql:uri"/>
</xsl:for-each>
</frag>
</xsl:template>
<xsl:template match="sql:uri">
<cinclude:include src="{uri}"/>
</xsl:template>
</xsl:stylesheet>
==========================================================
This results in a blank page. I know theres something wrong the way I am trying to
include the XML documents in the <uri> but I am not able to resolve it. Hope you might
be of some help to me !!!!
I would appreciate any help coming from your side.
Thanks in advance.
Regards
Sam