|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Keys, Lookup tables, Push--Pull (Was: Re: Putting para
Wendell Piez wrote:
[snip]
> We've seen some interesting threads lately, for example examining the uses
> of keys with lookup tables (Dimitre), that suggest some directions to
> explore in this area. A lookup table (whether keyed, or accessed by brute
> force) -- or, for that matter, keys in general -- is one way to "broker"
> between a push stylesheet (push tending to be more robust and maintainable
> than pull) and certain occasional needs to pull.
>
> Am I making any sense? I'd like to hear from others.
Hi Wendell,
The use of pull style in my code is not a matter of taste -- it was forced, because
it is not permitted to define a stylesheet like this:
<xsl:template match="key('kLookup', name($input))[$lookupSection = name(..)]">
If this was permitted, I would have this template defined and it would be
instantiated through:
<xsl:apply-templates/>
Also, to ensure that the key() function would be applied on the right document it is
necessary to switch between documents using a xsl:for-each like this:
<xsl:for-each select="document('lookup.xml')">
The result is that the code ***must*** use pull style.
Maybe, it could be possible, by changing the syntactic/semantic rules for defining a
xsl:template in future versions of XSLT, to allow pure push style to be used in
cases like this?
Personally, I'm not a fanatical supporter of "pure push style" and can happily live
with the current situation -- this would really matter if not only aesthetic
considerations were involved.
Cheers,
Dimitre Novatchev.
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








