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

Re: Re: character entities

Subject: Re: Re: character entities
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Fri, 23 Nov 2001 07:22:23 -0800 (PST)
xsl user defined character entity
> > Also I'd have to go outside XSLT 1.0 (not
> > that that necessarily matters) as if the current template goes
> > select="../param/constraints" to select all the constraints on sibling
> > parameters, then there is _nothing_ a template can do to create that
> > node set, as templates don't create nodesets.
> 
> I wonder why Dimitre has not jumped onto this, as that's a prime example
> for using generic templates. Write a somewhat general frame for using
> recursive templates to collect the nodes you want to have into a node-set
> and invoke the desired functionality in the recursive template via the
> generic template indirection. (might impress Dimitre too :-)

Joerg,

I didn't "jump onto this", because generic templates cannot help here -- they
create/return RTFs, which even when transformed to a nodeset do not contain the
original nodes but their copies.

This is how I understand David's text above. What returns the original node-set is
either saxon:function, or what will be (judging from the published requirements)
xsl:function in XSLT 2.0.

And this is not so impressing. What could impress me now will require a few months
work to implement -- but I already know it's perfectly possible.

And if I have failed with my posts to bring a clear image of the extremely powerful
functional programming design patterns that are possible using higher order
functions, then this must have been a big waste of time for everybody.

Consider the "functional tokenizer" -- this is an implementation of a "stream of
characters" -- you supply a template that is simply instantiated whenever a new
character "arrives". 

Isn't this an implementation of "event-driven programming"?

The change from a recursive template that calls itself and (among other things) does
the useful processing to a template that only gets invoked (by a standard library!
piece of code) in response to a particular user-defined event to do only the "useful
work" -- this is like changing a self-centered program that specifies all
user-interface IO operations sequence to a modern Windows program, that doesn't care
who displays what and in what order and what the user did, until "an interesting
event" happens that wakes this program into life.

Such paradigm was not possible in XSLT before, or am I wrong?

And this is only a small example/hint of what will follow when we start following
systematically a functional style of XSLT programming.

Cheers,
Dimitre Novatchev.

__________________________________________________
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

 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.