On Fri, Jan 03, 2025 at 02:01:33PM -0000, Roger L Costello costello@xxxxxxxxx scripsit:
> It is interesting that such a simple problem requires such complex code.
It is sometimes necessary to consider that one's construction of complex
might be in need of revision.
<xsl:for-each-group select="$values" group-by=".">
<xsl:sequence select="current-group()[2]"/>
</xsl:for-each>
isn't obviously complex; I might even go for "elegant". It is very much
an XSLT approach to the problem.
(Dr. Kay's "for-each-pair" pure XPath solution increased my
understanding; always new stuff to learn.)
The other thing is that "simple problem" is a statement about
expectation; if all the solutions are complex, that could be because the
language design is deficient in some way, but it could also be because
the problem isn't simple.
-- Graydon
--
Graydon Saunders | graydonish@xxxxxxxxxxxx
\xDE\xE6s ofer\xE9ode, \xF0isses sw\xE1 m\xE6g.
-- Deor ("That passed, so may this.")
|