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

Re: How to cope with the complexity of an XSLT program

Subject: Re: How to cope with the complexity of an XSLT program with thousands of template rules?
From: "Michael Kay mike@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 2 Jun 2022 15:11:23 -0000
Re:  How to cope with the complexity of an XSLT program
> That solved the problem and avoided problematic template interactions, but
it made me feel defeated because I resorted to a linear way of solving the
problem.
>

Pipelines are a great way to reduce complexity - doing multiple passes over
the data, each pass doing one well-defined thing, is a great way to keep
things simple. That's after all the great strength of the bag-of-tricks in
UNIX - compose complex tasks as a pipeline of simple tasks.

It also gives you a lot of reuse potential: the same modules can be reused in
different pipelines.

If you ever see a stylesheet that's complex because it's trying to handle
multiple variants of input formats, or to produce multiple variants of output
formats, that's a code smell: the input variety or output variety should have
been handled through preprocessing or postprocessing transformations in a
pipeline.

Michael Kay
Saxonica

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.