cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sam" <sam_na...@rediffmail.com>
Subject Content Aggregation?
Date Tue, 11 May 2004 16:05:21 GMT
<P>
Hi All,<BR>
<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>
<BR>
So heres my sitemap.xmap :<BR>
<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;
value=&quot;true&quot;/&gt;<BR>
&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;
value=&quot;portal&quot;/&gt;<BR>
&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>
&lt;/map:match&gt;<BR>
<BR>
========================================================<BR>
<BR>
The output I get after the buildsearch.xsl looks like this:<BR>
<BR>
&lt;results&gt;<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>
&lt;/results&gt;<BR>
<BR>
===================================================================<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>
<BR>
&lt;?xml version=&quot;1.0&quot;?&gt;<BR>
&lt;xsl:stylesheet version=&quot;1.0&quot; xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot;<BR>
xmlns:sql=&quot;http://apache.org/cocoon/SQL/2.0&quot; xmlns:cinclude=&quot;http://apache.org/cocoon/include/1.0&quot;&gt;<BR>
<BR>
<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
select=&quot;sql:uri&quot;/&gt;<BR>
&nbsp; &nbsp; &lt;/xsl:for-each&gt;<BR>
&nbsp; &lt;/frag&gt;<BR>
&lt;/xsl:template&gt;<BR>
<BR>
&lt;xsl:template match=&quot;sql:uri&quot;&gt;<BR>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;cinclude:include src=&quot;{uri}&quot;/&gt;<BR>
&lt;/xsl:template&gt;<BR>
<BR>
&lt;/xsl:stylesheet&gt;<BR>
<BR>
==========================================================<BR>
<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>
<BR>
I would appreciate any help coming from your side.<BR>
<BR>
Thanks in advance.<BR>
<BR>
Regards<BR>
Sam 
</P>
<br><br>
<A target="_blank" HREF="http://clients.rediff.com/signature/track_sig.asp"><IMG
SRC="http://ads.rediff.com/RealMedia/ads/adstream_nx.cgi/www.rediffmail.com/inbox.htm@Bottom"
BORDER=0 VSPACE=0 HSPACE=0></a>

Mime
View raw message