cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sam" <>
Subject Content Aggregation?
Date Tue, 11 May 2004 16:05:21 GMT
Hi All,<BR>
Its the similar scenario as is been discussed on the list this days for &quot;Dynamic
Aggregation&quot;, 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 &quot;Dynamic Aggregation&quot; . But that was too complex for
me right now and I am not a Cocoon guy, started learning few days back.<BR>
So heres my sitemap.xmap :<BR>
&lt;map:match pattern=&quot;adh/user/search&quot;&gt;<BR>
&nbsp; &nbsp; &lt;map:generate src=&quot;adh/resources/search.xml&quot;/&gt;<BR>
&nbsp; &nbsp; &lt;map:transform src=&quot;adh/styles/buildsearch.xsl&quot;&gt;<BR>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;map:parameter name=&quot;use-request-parameters&quot;
&nbsp; &nbsp; &lt;/map:transform&gt;<BR>
&nbsp; &nbsp; &lt;map:transform type=&quot;sql&quot;&gt;<BR>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;map:parameter name=&quot;use-connection&quot;
&nbsp; &nbsp; &lt;/map:transform&gt;<BR>
&nbsp; &nbsp; &lt;map:transform src=&quot;adh/styles/builddocument.xsl&quot;/&gt;<BR>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;map:transform type=&quot;cinclude&quot;/&gt;<BR>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;map:serialize type=&quot;html&quot;/&gt;<BR>
The output I get after the buildsearch.xsl looks like this:<BR>
&nbsp; &nbsp; &lt;rowset&gt;<BR>
&nbsp; &nbsp; &nbsp; &lt;row&gt;<BR>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;uri&gt;adh/resources/fragments/abstractlist.xml&lt;/uri&gt;<BR>
&nbsp; &nbsp; &nbsp; &lt;/row&gt;<BR>
&nbsp; &nbsp; &nbsp; &lt;row&gt;<BR>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;uri&gt;adh/resources/fragments/arraylist.xml&lt;/uri&gt;<BR>
&nbsp; &nbsp; &nbsp; &lt;/row&gt;<BR>
&nbsp; &nbsp; &nbsp; &lt;row&gt;<BR>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;uri&gt;adh/resources/fragments/linkedlist.xml&lt;/uri&gt;<BR>
&nbsp; &nbsp; &nbsp; &lt;/row&gt;<BR>
&nbsp; &nbsp; &nbsp; &lt;row&gt;<BR>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;uri&gt;adh/resources/fragments/vector.xml&lt;/uri&gt;<BR>
&nbsp; &nbsp; &nbsp; &lt;/row&gt;<BR>
&nbsp; &nbsp; &lt;/rowset&gt;<BR>
Now I am trying to capture all thats in the &lt;uri&gt; and aggregate those xml documents,
thats what I am doing in my builddocument.xsl , which looks like this:<BR>
&lt;?xml version=&quot;1.0&quot;?&gt;<BR>
&lt;xsl:stylesheet version=&quot;1.0&quot; xmlns:xsl=&quot;;<BR>
xmlns:sql=&quot;; xmlns:cinclude=&quot;;&gt;<BR>
&lt;xsl:template match=&quot;results&quot;&gt;<BR>
&nbsp; &lt;frag&gt;<BR>
&nbsp; &nbsp; &lt;xsl:for-each select=&quot;sql:rowset/sql:row/sql:uri&quot;&gt;<BR>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;xsl:apply-templates
&nbsp; &nbsp; &lt;/xsl:for-each&gt;<BR>
&nbsp; &lt;/frag&gt;<BR>
&lt;xsl:template match=&quot;sql:uri&quot;&gt;<BR>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;cinclude:include src=&quot;{uri}&quot;/&gt;<BR>
This results in a blank page. I know theres something wrong the way I am trying to include
the XML documents in the &lt;uri&gt; but I am not able to resolve it. Hope you might
be of some help to me !!!!<BR>
I would appreciate any help coming from your side.<BR>
Thanks in advance.<BR>
<A target="_blank" HREF=""><IMG

View raw message