[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
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! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|