|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Accessing XSL context - Was: RE: Question
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
|
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








