[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Design approaches to separating "pure" code from

Subject: Re: Design approaches to separating "pure" code from "impure" code?
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Thu, 19 May 2011 09:53:49 -0400
Re:  Design approaches to separating "pure" code from
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@xxxxxxxxxxxxxxxxxxxx
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.