Re: [xsl] How to store a sequence into an element ... and maintain the sequence inside the element?

Subject: Re: [xsl] How to store a sequence into an element ... and maintain the sequence inside the element?
From: "Wendell Piez wapiez@xxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 20 Jul 2020 20:36:22 -0000
Hi,

Although there may be no standard way to represent (or pass) a
function in XML/XSLT "straight up", it is certainly possible to
capture the operations of appropriately defined functions in markup
languages and embed libraries implementing such operations in
stylesheets.

Indeed, even apart from FXSL, visitor patterns, etc. etc. it is
interesting to contemplate that XSLT is itself based on the idea that
an element type can be bound to a function, if something that
(deterministically) gives one result in one context and another result
in another context, is a function. What is XSLT but a way to make
functions out of your XML elements?

It is amusing to see a text-based representation being disparaged for
all the overhead required ... to make the information legible to mere
mortals (even domain experts).

Isn't the modern web a big collection of documents of functions, wired
in at all levels from links to scripts to libraries? This hodgepodge
could be "more efficient" in its representations (I suppose) but that
is perhaps not the point.

Best regards,
Wendell



On Mon, Jul 20, 2020 at 5:02 AM Michael Kay mike@xxxxxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>
>
> I think that, using a schema (for input & output documents) for an XSLT
transformation, in general is very useful. The main benefit is, I think,
stronger type checking of XML input/output data, which reveals many error
early during an XSLT transformation cycle.
>
>
> Indeed. But although it gives you a wider range of data types than just
strings -- it's fine for a sequence of integers or a date -- it's still
restricted. For example there's no way you can hold a function as an attribute
of an element node, because (a) functions aren't recognized as an XSD data
type, and (b) they can't be represented as strings. This lack of orthogonality
in the XDM model is a constant pain when you're doing applications like the
XSLT-in-XSLT compiler that we wrote for Saxon-JS, or the XSD-validator-in-XSLT
that I've published details of but never released as a finished product.
>
> Michael Kay
>
> XSL-List info and archive
> EasyUnsubscribe (by email)



--
...Wendell Piez... ...wendell -at- nist -dot- gov...
...wendellpiez.com... ...pellucidliterature.org... ...pausepress.org...
...github.com/wendellpiez... ...gitlab.coko.foundation/wendell...

Current Thread