At 2011-05-19 09:45 -0400, Costello, Roger L. wrote:
Hi Folks,
This is a general design question.
First, let me define some terms:
I define "pure" code as code that doesn't do any I/O.
I define "impure" code as code that does I/O.
(Dimitre could probably provide better definitions of those terms)
I am seeking your suggestions on ways to organize XSLT code to keep
pure code and impure code separate.
How about a "pure" (your definition) module has no match patterns
(input) and no literal result elements (output)?
It is useful to create modules that have no match patterns or literal
result elements, especially for re-use. For example, generated text
building or common calculations when doing publishing for multiple
output formats. When you keep the literal result elements out of the
common code, you can re-use the common code regardless of the
result. Sounds obvious when written out, but I consciously will
decide that a "common module" has only generated text and no literal
result elements.
I hope this helps.
. . . . . . . . . . . . Ken
--
Contact us for world-wide XML consulting & instructor-led training
Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/
G. Ken Holman mailto:gkholman(_at_)CraneSoftwrights(_dot_)com
Legal business disclaimers: http://www.CraneSoftwrights.com/legal
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--