[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XSLT 4 xsl:with

Subject: Re: XSLT 4 xsl:with
From: "Graydon graydon@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 21 May 2020 04:11:37 -0000
Re:  XSLT 4 xsl:with
On Tue, May 19, 2020 at 05:55:25PM -0000, Imsieke, Gerrit, le-tex gerrit.imsieke@xxxxxxxxx scripsit:
> But read my previous messages in this thread. Instead of xsl:with I propose
> to use a @context-item attribute (an @xsl:context-item attribute on non-xsl
> elements). If you really need the kind of wrapper that xsl:with provides,
> you can still write
> 
> <xsl:sequence context-item="$context">
>   <xsl:variable .../><!-- @select evaluated in the context of $context -->
>   <foo>...</foo><!-- any expression within is also evaluated in the context
> of $context -->
>   <bar>...</bar>
> </xsl:sequence>

Is the context item a property of the instruction or a circumstance of the executing transform?

I think @context-item makes the context item a property of the instruction with which the context-item attribute is associated, and since I view the context item as a circumstance of the transform executing, I get some philosophical dissonance from the idea.

I also like the idea of having an explicit container element for a change of context; this may be a long-term side effect of early run-ins with the implicit context of position(), but I'll take easy to read over compactness of expression in XSLT.  (Which will never be all that compact unless someone decides to create processing for an alternative, XQuery-ish, sort of syntax.  (And now I have a mental image of the syntax you'd get by colliding Haskell and XQuery. I should stop.))

-- 
Graydon Saunders  | graydonish@xxxxxxxxx
^fs oferiode, pisses swa mfg.
-- Deor  ("That passed, so may this.")

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.