Re: [xsl] best practices for using XSLT modes

Subject: Re: [xsl] best practices for using XSLT modes
From: "Dimitre Novatchev dnovatchev@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 4 Dec 2019 19:16:57 -0000
> For sure. But you can also use fn:transform() to replace modes in some
> cases, and turn mode management into file management :)
>
> Liam

Yes, this is almost exactly the same as what Elliot shared with us -- but
omitting the modes could make it more unreadable.

Also, fn:transform() is only available in XPath 3.1, its specification is
overwhelmingly complex, and it seems to be
significantly implementation-dependent.

So, not quite convenient for developers who work with XSLT versions that
don't implement XPath 3.1 (All XSLT 2.0 and 1.0 applications are in this
group) or who want to achieve vendor-independence and maximum
clarity/testability.

Certainly, for XQuery **3** code this is the main way to invoke an XSLT
transformation, so they are in a worse position than their XSLT-developers
colleagues.

Cheers,
Dimitre

On Wed, Dec 4, 2019 at 11:00 AM Liam R. E. Quin liam@xxxxxxxxxxxxxxxx <
xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:

> On Wed, 2019-12-04 at 16:59 +0000, Dimitre Novatchev
> dnovatchev@xxxxxxxxx wrote:
> > Without using modes I wonder if it would be possible at all to do
> > this processing in a single transformation -- and even if this is
> > somehow (crazy) possible, the code would be a torture to read,
> > understand and maintain.
>
> For sure. But you can also use fn:transform() to replace modes in some
> cases, and turn mode management into file management :)
>
> Liam
>
> --
> Liam Quin, 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:  http://www.fromoldbooks.org

Current Thread