xsl-list
[Top] [All Lists]

Re: Aw: [xsl] URI collection select?

2019-12-07 17:23:08
Since uri-collection() is new to XPath 3.1 and the collection URI query parameters that OP is using look like Saxon’s, 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, '|'.

Saxon’s '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(_dot_)honnen(_at_)gmx(_dot_)de 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(_at_)dvint(_dot_)com" <xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com>:

    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.


--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

<Prev in Thread] Current Thread [Next in Thread>
  • Aw: [xsl] URI collection select?, Martin Honnen martin(_dot_)honnen(_at_)gmx(_dot_)de
    • Re: Aw: [xsl] URI collection select?, Imsieke, Gerrit, le-tex gerrit(_dot_)imsieke(_at_)le-tex(_dot_)de <=