[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

Subject: Keys, Lookup tables, Push--Pull (Was: Re: Putting parameter into XPATH expression)
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Mon, 25 Jun 2001 21:38:00 -0700 (PDT)
keys for tables
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


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.