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

Re: RE: Converting attributes to elements and preservi

Subject: Re: RE: Converting attributes to elements and preserving the hierarchy
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Wed, 19 Dec 2001 06:45:59 -0800 (PST)
xslt converting attributes to elements
> > How do I decide  when to use <xsl:for-each> or a template ?
> 
> For beginners: always use template rules, until you understand them well
> enough to know their strengths and weaknesses.
> 
> For advanced users: use xsl:for-each only when you are absolutely confident
> that the structure of the source documents handled by your stylesheet is not
> going to change.
> 
> Mike Kay

For beginners and advanced users: using a functional programming style and a
functional programming library in XSLT (one is to become available soon) you'll not
need to use xsl:for-each. 

You'll need to use xsl:call-template once per function-library call and you'd have
to use xsl:apply-templates in your higher-order functions (in case you'd be writing
them). However, if syntax-level support for higher order functions is included in
XPath 2.0 and XSLT 2.0, then most probably you'll not even need to use
xsl:call-template and xsl:apply-templates in these cases.

Even in XSLT 1.0 it would become the rule that the standard FP library functions are
"wrapping" these xslt instructions within their code, so that the user can simply
invoke the functions.

As one person put it here, using a FP library will require "less thinking". I would
slightly correct this statement -- it would require another way of thinking in which
the programmer benefits from having the knowledge that solutions to general problems
are pre-coded and re-usable and interconnectable for solving a vast majority of
problems, which in the absence of this pre-coded knowledge would be "unique" and
very difficult (time-consuming) to solve.

Cheers,
Dimitre Novatchev.



__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.