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

Re: Can a single XPath statement duplicate the functi

Subject: Re: Can a single XPath statement duplicate the functionality of this verbose <xsl:choose> statement?
From: "Mark" <mark@xxxxxxxxxxxx>
Date: Mon, 24 Oct 2011 05:33:24 -0700
Re:  Can a single XPath statement duplicate the  functi
Hi Andrew,
The difficulty a beginner faces with any language is envisioning future maintenance problems - something I do automatically in C++. I am not sure if I will ever accomplish that for XSLT, but your example was quite thought-provoking. A few weeks ago, I asked a question on this list about "XSLT design patterns." I think the example you gave is what I was actually seeking: how to best address frequently occurring problems. In C++, as with the maintenance issue, I already have such a repertoire at hand. Unfortunately, that skill seems to get in the way when probing for XSLT solutions.


The XSLT cookbook I own assumes one already understands these basic issues and provides solutions to problems at a less generalized level. I find Michael's examples, for the most part, make the same assumption [which is perfectly appropriate in both cases]. But I would love to get my hands on more examples like your <drink type="beer"/> resolutions.

The difference between the result tree and the serialized output had escaped my notice. I found most helpful your explanation of how the same node in a single result tree [<br>] may rendered differently as the tree is serialized. I had not made any distinction between the result tree and a serialized document. I had seen references to this difference in the literature, but had never really understood what was meant.

I still do not understand, for instance, the emphasis in the literature in distinguishing between the "root" and "the document node"; it seems not to have any impact on writing code. On the other hand, learning about result tree serialization will alter my code (I hope). Makes me wonder which other primitive XSLT notions would be as useful...

Thanks for taking the time,
Mark

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.