On Mon, 28 Oct 2002 22:08:55 -0700, Brian Grainger wrote:
Anyway, to get back to the subject of this thread, if you apply the concept
of a separation between content and presentation, then I would say that
business rules apply to content and XSLT applies to the presentation of
that content.
Following this line, you should be using something other than XSLT to
modify your data (ie. 5% discount), and then using XSLT to present that
modified data.
I disagree with that: XSLT is both capable and suitable for
calculating a simple discount.
The people who designed XSLT intended it to be used for either
purpose. That is why the top level element can be either
xsl:stylesheet (for presentation) or xsl:transform (for logic).
(Using one or the other has no practical significance, it is just a
statement of intent).
As others have already said, it is of course good practice to keep the
two separate. The original problem arises from poor use of language
rather than poor choice of language.
Trevor Nash
--
Traditional training & distance learning,
Consultancy by email
Melvaig Software Engineering Limited
voice: +44 (0) 1445 771 271
email: tcn(_at_)melvaig(_dot_)co(_dot_)uk
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list