Subject: [xsl] 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) |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] evaulate, Jason Macki | Thread | [xsl] modifiing string based on oth, guru prasad |
RE: [xsl] Problem with <xsl:import>, Vijay Rao | Date | [xsl] modifiing string based on oth, guru prasad |
Month |