AW: Aw: AW: AW: Sort directory-list

Thanks.
Now I'm getting another error which directly relates to the code:
<c:errors xmlns:c=http://www.w3.org/ns/xproc-step><c:error code="err:XD0030" name="!1.2-!anonymous-in-0" href=... line="20" column="56" xmlns:err=http://www.w3.org/ns/xproc-error><message>Types 'XS_String' and 'XS_Double' are not comparable.</message></c:error></c:errors>

Von: Martin Honnen <Martin.Honnen@gmx.de>
Gesendet: Donnerstag, 21. November 2024 22:33
An: xproc-dev@w3.org; Maier, Denis Christian (UB) <denis.maier@unibe.ch>
Betreff: Aw: AW: AW: Sort directory-list

Yes, please make sure your XProc code declares xmlns:fn="http://www.w3.org/2005/xpath-functions&quot;<http://www.w3.org/2005/xpath-functions%22>
--
Gesendet mit der GMX Mail App



Am 21.11.24, 22:27 schrieb denis.maier<http://denis.maier/>@unibe.ch<http://unibe.ch/>:
> -----Ursprüngliche Nachricht-----
> Von: Martin Honnen <martin.honnen@gmx.de<mailto:martin.honnen@gmx.de>>
> Gesendet: Donnerstag, 21. November 2024 18:37
> An: xproc-dev@w3.org<mailto:xproc-dev@w3.org>
> Betreff: Re: AW: Sort directory-list
>
> [Sie erhalten nicht häufig E-Mails von martin.honnen@gmx.de<mailto: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:34:53 UTC