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

Basic program structures in XSLT (was: Re: Data-drivenapplicat

  • From: "C. M. Sperberg-McQueen" <cmsmcq@blackmesatech.com>
  • To: Michael Kay <mike@saxonica.com>
  • Date: Thu, 08 Dec 2022 10:52:22 -0700

Basic program structures in XSLT (was: Re:  Data-drivenapplicat
Michael Kay <mike@saxonica.com> writes:

> I think what you're doing here is re-discovering the isomorphism
> between data and program structures, an idea which was elegantly
> explored in Jackson Structured Programming. The essence of the idea
> (which dates back to sequential processing of hierarchical data files
> on magnetic tape) is that the structure of the code should generally
> follow the structure of the input data, and that a schema for the data
> (in terms of a tree with sequence, choice, and repetition nodes)
> translates into a program design with instruction sequences,
> conditionals, and loops.

> ...

Excellent point, and as a beginner I found it very helpful to be taught
sequences, conditionals, and loops and be told that they were
essentially all there was to programming and that everything else in the
manual could be reduced to them.

This raises an important question.  When I try to teach novices about
XSLT, I always think about that two-hour "Introduction to programming"
that just taught flowchart notation for those three constructs and
showed us how to perform stepwise refinement of a task.

I wish I had an equally compelling list of basic control structures for
programming in XSLT (and for that matter in XQuery), but I have not come
up with anything plausible.  So, a question for the xml-dev list:

What would you say are the basic control structures for programming in
XSLT?

> Where it gets interesting is when the hierarchic structure of the
> output doesn't match the hierarchic structure of the input, and
> Jackson goes into great detail analysing the different types of
> structure clash and the techniques for dealing with them.

This provokes a similar but broader question:  are there analogous basic
principles for program design which can be used to guide construction of
a transformation in XSLT?


Michael Sperberg-McQueen

-- 
C. M. Sperberg-McQueen
Black Mesa Technologies LLC
http://blackmesatech.com


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.