cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mario Muja" <mario.m...@delaval.com>
Subject Re: Choosing XSL dynamically
Date Thu, 25 Oct 2001 09:38:58 GMT
What about using xsl:include to include a calculation template in both of
the other stylesheets?
Mario

----- Original Message -----
From: "Mark S. Kent" <mark.kent@vistyx.com>
To: <cocoon-users@xml.apache.org>
Sent: Wednesday, October 24, 2001 5:44 PM
Subject: C2: Choosing XSL dynamically


I noticed a message previously about choosing an XSL file using actions
depending on some "external input" (in this case a value in the database --
ref:
http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=99806349922890&w=2 ).

I have reports that I am using Cocoon2 to render with two (maybe more later)
different stylesheets, one for HTML and one for PDF.  I am performing some
calculations in the XSL stylesheets to sum up totals from the XML data
before outputting the results using each stylesheet.  Since the XSL
calculations are held separately in each version of the stylesheet depending
on the report format the user wants, I must maintain the XSL calculations
separately in each file.  I'd prefer to include the calc's in one stylesheet
that then uses the appropriate "output" lines to either render using the
HTML commands (<table><tr><td>...etc) or FOP-PDF commands
(<fo:table><fo:table-row><fo:table-cell>...etc).

If I include these commands in the same file with the use of some XSL
decision statement (xsl:if/choose/when) then the C2 sitemap won't know what
to really do with the commands it finds.  Is this possible to same different
"output" command reside in the same XSL page under C2?  Or is there a way to
perform the calculations in a "shared" file that I can "call" from each of
my two separate stylesheet files?

Mark


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



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


Mime
View raw message