Re: Aw: [xsl] URI collection select?

Subject: Re: Aw: [xsl] URI collection select?
From: "Imsieke, Gerrit, le-tex gerrit.imsieke@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 7 Dec 2019 23:23:04 -0000
Since uri-collection() is new to XPath 3.1 and the collection URI query parameters that OP is using look like Saxonbs, OP is probably using a recent version of Saxon.

In recent versions of Saxon, a collection URI query parameter named 'match' is supported, see http://www.saxonica.com/documentation/#!sourcedocs/collections

So you can use this:

uri-collection($srcPath || '?match=.+%5C.(xml%7Cdita)')

In the match regex, since you are using it in a URI, you need to percent-encode the backslash, '\', and the pipe symbol, '|'.

Saxonbs 'select' query parameter has always supported only glob-like patterns (that were translated into a matching regex). I don't think you could ever use a comma-separated list of glob patterns for the 'select' parameter.

Gerrit


On 08.12.2019 00:00, Martin Honnen martin.honnen@xxxxxx wrote:
Is that for Saxon 9?
--
Diese Nachricht wurde von meinem Android Mobiltelefon mit GMX Mail gesendet.
Am 07.12.19, 23:51 schrieb "dvint@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>:


    I once upon a time found a documentation with examples on various
    way to build collections and for the life of me I cannot find it again.

    I have a situation where I have files with a .dita and .xml file
    extensions. I thought there was a way to do this in one select
    statement but all the ways I can think of do not work. I've tried
    separating the extensions with a comma, a space and a colon and none
    of them work - no results are returned.

So I have this configuration:

    <xsl:variablename="topiccollectionString"
    select="/concat/(*$srcPath*,'?select=*.dita;recurse=no')"/>
    <xsl:variablename="topicfileSet"select="/uri-collection/(*$topiccollectionString*)"/>


<xsl:variablename="xmltopiccollectionString" select="/concat/(*$srcPath*,'?select=*.xml;recurse=no')"/> <xsl:variablename="xmltopicfileSet"select="/uri-collection/(*$xmltopiccollectionString*)"/>


I then have 2 for-each statements to process both lists.

Current Thread