Hi all,

I am trying to find a way of setting up a cocoon2 pipeline that uses a
stylesheet in one XSLT transformation that has been generated by the
preceeding XSLT transformation.

This problem is similar to the one described by Tobias Kiesling on Sep. 9th
2001.

As Tobias pointed out, the general process can be achieved by creating an
XML document in the first step that contains the stylesheet needed in the
second step as an embedded section. This works using xalan stand-alone.
Taking into account that xalan looks for a processing instruction in the XML
document when not supplied with a stylesheet, one might think that putting
<map:transform src=""/> or even <map:transform/> into the sitemap would do
the job. From looking at org.apache.cocoon.transformation.TraxTransformer I
see that omitting the src attribute is prohibited and supplying an empty
string as its parameter causes an exception. I don't yet understand the
inner workings of cocoon2 but wouldn't it be possible to define one of the
above options as a way of telling the XSLT transformer to look for a PI?

Maybe I am getting something wrong about the way of using cocoon2. Maybe any
of you guys can tell me about the 'right way' of using cocoon2 in the
following scenario: I want to post an XML document to the server, which
describes a structured query and points to another XML document sitting on
that server on which the query is to be performed. The response should be
the result of the query, possibly piped through further XSLT
transformations. My approach was to transform the XML document representing
the query into another XML document with an embedded stylesheet implementing
the query by use of XPATH and accessing the 'data' XML document via the
document() function (using an XPATH expression passed in as a variable is
not possible :-(). If you look at it, this process is quite elegant. I am
not convinced that allowing for such a process would break the content-style
separation, as not all XSLT-transformations are (strictly) about
representation.

Thanks a lot for any help,

  Markus


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

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

Reply via email to