You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Don Wellington <da...@yahoo.com> on 2001/06/19 02:45:57 UTC

[C2] XSP transformer

Looking through the mail archives tells me that there
is no XSP transformer.  So, you can't pipeline an xml
document through an xslt stylesheet to generate an xsp
page, process that into an xml document, that has
another xslt applied to it.  This worked in Cocoon1 by
having each xslt insert cocoon processing
instructions.

So, here is what I want to do:

<map:match pattern="index.html">
   <map:generate src="index.xml">
   <map:transform src="indextrans1.xsl">
   <map:transform src="indextrans2.xsl">
   <map:serialize/>
</map:match>

Where index.xml is a list of filenames. (XML files)
indextrans1.xsl transforms the document to an XSP that
has a function that takes a filename as the argument
reads in the file, and returns a Element that contains
information from the file that can be used to generate
an index.  I then call the function for each filename
which returns an XML document with the information I
need for the index.  The final transform performs the
conversion to html.

It seems to me the only way to do this without putting
any xsp into index.xml.  Is to write an XSP page that
reads index.xml and then creates the preliminary XML
document for transforming to html.  And, enter that
into the generator.  Which wouldn't be too hard?  But,
it seems to reverse the paradigm, and makes it so the
code has to change if I want to reuse the XSP page on
a different file.  Rather than just adding a sitemap
entry for the new file.

Another question is whether there is any reason an XSP
transformer could NOT be written?

Any other ideas?

Don
  

__________________________________________________
Do You Yahoo!?
Spot the hottest trends in music, movies, and more.
http://buzz.yahoo.com/

---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>