Re: [xsl] Seek an XPath expression which concatenates an arbitrary number of strings

Subject: Re: [xsl] Seek an XPath expression which concatenates an arbitrary number of strings
From: "Liam R. E. Quin liam@xxxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 16 Mar 2024 02:05:19 -0000
On Fri, 2024-03-15 at 14:12 +0000, Martin Honnen martin.honnen@xxxxxx
wrote:
>
> B  B  B  B  B  B fold-left(//binary-value, '', function($a, $b) { $a || $b
> })
A very minor note on this - i usually caution people in the classes i
run to include a literal string whenever they use ||

B  B  B  B  $a || $b || ""

The reason is human - in JavaScript, C, C++, Perl, Python, bash, awk,
many other
languages, B || is a boolean operation that mirrors &&, and if you look
quickly at an expression you can get very confused.

liam

--
Liam Quin,B https://www.delightfulcomputing.com/
Available for XML/Document/Information Architecture/XSLT/
XSL/XQuery/Web/Text Processing/A11Y training, work & consulting.
Barefoot Web-slave, antique illustrations: B http://www.fromoldbooks.org

Current Thread