My favourite XSLT enhancement requests

Subject: My favourite XSLT enhancement requests
From: "Lassi A. Tuura" <lat@xxxxxx>
Date: Thu, 14 Sep 2000 10:50:27 +0200
As there was a request for enhancements for the next round, here's my
favourite: ability to define parameters that pass through all layers of
templates, not just one level.  It would be nice if both xsl:param and
xsl:with-param had an option that allowed them to be passed to all
nested template applications -- xsl:param too because sometimes you have
a family of templates that all use the same parameters, and once it is
passed in, you want to keep passing it around.

Example: Inlining title on the first encounter of the body content (say
on the first paragraph).  Trouble arises when you do not know which
element or how deeply nested that will be.  Good fun trying to come up
with gymanastics that will pass the title to use to the first node that
will be processed...  Especially if you want to pass the parameters
through stylesheet libraries (say if you are writing a customisation
layer on DocBook and want to use Norman Walsh' brilliant work).

Example: Crosslinking by using named templates to selection (e.g. on
target element type, user-selected options, ...).  It would be nice not
to have to pass the arguments around in N layers of dispatcher
templates.

Example: when merging document processing with `document()', it would be
nice to be able to walk back the document "stack."  Well, at least one
level up.  I am trying to develop documents that import (dynamically
selected parts of) document fragments.  If these fragments refer to each
other, it would be nice to be able to create hyperlinks.  So far it has
escaped me how to do this in one pass: if I am processing somewhere deep
in the bowels of the imported fragment, how can I come out again to the
importing document and ask what other documents it is importing, and use
that information to either create an internal crosslink, or an external
link?  DocBook <olink> is similar in concept, except I'd like to figure
out much of the modespec on the fly.


Speaking of dispatcher templates, it would be nice to be able to
dynamically construct the template name or mode name when invoking
templates (both calling and applying).  If you have more than one option
controlling the behaviour of a particular feature, dealing with the
orthogonality becomes a bit unwieldy.

Cheers,
//lat
-- 
The rain it raineth on the just
	And also on the unjust fella,
But chiefly on the just, because
	The unjust steals the just's umbrella.


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


Current Thread