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

RE: Enlightenment via avoiding the T-word

  • From: James Clark <jjc@j...>
  • To: "Fuchs, Matthew" <matthew.fuchs@c...>,'Rick Jelliffe' <ricko@a...>,"'xml-dev@l...'" <xml-dev@l...>
  • Date: Fri, 31 Aug 2001 06:06:19 +0700

matthew fuchs gui

> However, why couldn't XSL have taken advantage of basic principles of
> programming language design?  The way to handle locality is, again, by
> scoping.  Even if "name" is a global, if I wish to process it differently
> when it shows up in "person" from when it shows up inside "product", plus
> have a rule for default processing, one might write the code shown below
> (if XSL allowed it):
>
> <xsl:template match="x:person">
> ...information generated specific to "x:person" and not visible outside
> the template...
>   <xsl:apply-templates>
>      <xsl:template match="x:name">
>         ...name processing specific to person,
>            could recursively call generic name template
>            can access local information created by surrounding template
>         ...
>      </xsl:template>
>   </xsl:apply-templates>
> ...
> </xsl:template>

This exact syntax was proposed during the development of XSL and the XSL WG 
spent quite a lot of time considering it. Indeed, I believe it was even 
implemented in early versions of MSXSL.  In the end it was rejected.  As 
far as I remember, the reasons were

1. Experience with actual users indicated that they found modes much easier 
to work with than nested templates.

2. It was felt that it was easier to create a GUI for the flat style than 
the nested style.

3. With the flat style, you can use xsl:import and selectively override 
things.

> I've
> built this kind of transformation engine more than once, and find it much
> easier to use than XSL's all-global templates.

I suspect you have a somewhat different background to the average XSLT user.

James



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.