Subject: Re: Accessing XSL context - Was: RE: Question From: Paul Prescod <paul@xxxxxxxxxxx> Date: Thu, 04 Feb 1999 23:24:08 -0600 |
Mike Dierken wrote: > > (also, I am biased toward #3, so please add some pros & cons to these...) > ============================== > Solution 3: 'context()' method > PROS: > Access multiple contexts. > Doesn't require declarations to access different contexts. > More declarative of what you want, rather than how to get it. > > CONS: > Introduces new concept. > > EXAMPLE: > <xsl:template match="METHODREF"> > <xsl:value-of select="ancestor(CLASS)/METHOD[@name=context(1)/@name]"/> > </xsl:template> My concern about this proposal is that addressing contexts by number seems error prone. An extra level can easily break everything. I see your point about it not requiring pre-declarations, but I think that I would use local constants over this, given the choice. -- Paul Prescod - ISOGEN Consulting Engineer speaking for only himself http://itrc.uwaterloo.ca/~papresco "Remember, Ginger Rogers did everything that Fred Astaire did, but she did it backwards and in high heels." --Faith Whittlesey XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Accessing XSL context - Was: RE: Qu, Mike Dierken | Thread | XSL Parameters was: RE: Accessing X, Borden, Jonathan |
Re: About Microsoft Patent, Paul Prescod | Date | Re: About Microsoft Patent, Tyler Baker |
Month |