Re: [xsl] XSLT result tree fragment, with XSLT 3.0 and xsl:variable

Subject: Re: [xsl] XSLT result tree fragment, with XSLT 3.0 and xsl:variable
From: "Graydon graydon@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 10 Apr 2023 14:07:21 -0000
On Mon, Apr 10, 2023 at 12:44:35PM -0000, Mukul Gandhi
mukulg@xxxxxxxxxxxxxxxxx scripsit:
> My actual point though, for this thread was, distinction between XSLT
> 1.0's "result tree fragment" and XSLT 3.0's equivalent sequence
> constructor.

I seem to recall that result tree fragments were an awkward special
case and I had to keep writing out intermediate files if I wanted to do
any kind of multi-pass processing with 1.0.

Sequence constructors come with a much-expanded type model that permits
nodes to be assigned to variables and just generally treated as one
derivative kind of the item type, rather than being a special case.
Multi-pass processing can be done with variables, whether of entire
documents or sequences of nodes.

So I'd think the very short version is "result tree fragments describe a
bunch of nodes in the XPath 1.0 data model" and "a sequence constructor
produces a bunch of nodes in the XPath 3.1 data model". 1.0 had some
ambitious objectives about being implicitly statically typed; 2.0 and
subsequent changed the data model and stopped trying to do that.

Given the time elapsed between 1.0 and 2.0, I suspect that the not-short
version is maybe beyond the scope of a mailing list response, but am
interested to see what may arrive from those who were nearby at the
time.

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

Current Thread