AW: AW: Sort directory-list

> -----Ursprüngliche Nachricht-----
> Von: Martin Honnen <martin.honnen@gmx.de>
> Gesendet: Donnerstag, 21. November 2024 18:37
> An: xproc-dev@w3.org
> Betreff: Re: AW: Sort directory-list
> 
> [Sie erhalten nicht häufig E-Mails von martin.honnen@gmx.de. Weitere
> Informationen, warum dies wichtig ist, finden Sie unter
> https://aka.ms/LearnAboutSenderIdentification ]
> 
> On 21/11/2024 16:59, Martin Honnen wrote:
> > Of course you can try the function argument of fn:sort as already
> > suggested
> 
> 
> Here is an example
> 
> 
>    <p:for-each>
>      <p:with-input select="//*:file => sort((), function($file) { analyze-
> string($file!@name, '[0-9]+')!descendant::*[not(*)]!(if (.
> instance of element(fn:match)) then number(.) else string(.)) })"/>
>      <p:identity/>
>    </p:for-each>
> 
> Tested that with MorganaXProc-IIIse 1.4.5 to give e.g. 'sample1.xml',
> 'sample2.xml', `sample10.xml' where unsorted gives sample1.xml,
> sample10.xml, sample2.xml
> 
Thanks, Martin. I've tried it, but I'm getting this error message:

Error in compiling XPath expression '//*:file => sort((), function($file) { analyze-string($file!@name, '[0-9]+')!descendant::*[not(*)]!(if (.                 instance of element(fn:match)) then number(.) else string(.)) })': Cannot resolve prefix for 'fn:match'.

I've just updated to Morgana 1.4.5.

Received on Thursday, 21 November 2024 21:27:28 UTC