Hy again;
Sorry, there was a typo in my example. Of course
it must be:

1.) From within the cocoon sitemap you would
create something like this within a pipeline:

<map:match pattern="projects.xml">
  <map:generate  src="/projects.xml"/>
  <map:transform type="xslt" src="mytransformer.xsl">
    <map:parameter name="viewfile" value="views.xml"/>
  </map:transform>
  <map:serialize/>
</map:match>

regards, hussayn

SAXESS - Hussayn Dabbous wrote:
Hy;

I'm also new to cocoon, but i think, your
problem can be solved directly using the
sitemap capabilities by merging the two xml files with
aggregation then applying a stylesheet on the merged
data...

But you also could do it directly within the xslt context:
You can use the document() function in your XSLT-file.
This function allows you to refer to data contained within
another XML-file. This is completely decoupled from cocoon
though. It's more about how to work with XSLT:

1.) From within the cocoon sitemap you would
create something like this within a pipeline:

<map:match pattern="projects.xml">
  <map:generate  src="/projects.xml"/>
  <map:transform type="xslt" src="mytransformer.xsl">
    <map:parameter name="viewfile" value="views.xsl"/>
  </map:transform>
  <map:serialize/>
</map:match>


2.) In the stylesheet you would then include a global parameter
outside of any template:

<xsl:param name="viewfile">standardviews.xml</xsl:param>

Note: the value "standardviews.xml" is taken, if you don't
apply the parameter as stated in 1.)


3.) Then finally you would refer to an element in the viewfile
via select attribute. e.g. if you would want to iterate through
your view elements:

<xsl:for-each select="document($viewfile)/views/view">
. . .
</xsl:for-each>

you can use this wherever you can apply a select attribute...


Hope, that helps getting further. Maybe there are better
solutions. Maybe the aggregation within a pipeline makes it
even simpler for you.

regards, hussayn
--
Dr. Hussayn Dabbous
SAXESS Software Design GmbH
Neuenhöfer Allee 125
50935 Köln
Telefon: +49-221-56011-0
Fax:     +49-221-56011-20
E-Mail:  [EMAIL PROTECTED]


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to