Good point. I'm not familiar with some/in/satisfies expressions, but I'll
look it up.

Jostein


On 14 February 2013 11:14, Romain Deltour <notifications@github.com> wrote:

> In fileset-utils/src/main/resources/xml/xproc/fileset-filter.xpl:
>
> > +        </p:when>
> > +        <p:otherwise>
> > +            <p:delete>
> > +                <p:with-option name="match" select="concat(&quot;//d:file[not(resolve-uri(@href,'&quot;,$base,&quot;')=resolve-uri('&quot;,$resolved-href,&quot;'))
>
> ]&quot;)"/>
> > +            </p:delete>
> > +        </p:otherwise>
> > +    </p:choose>
> > +
> > +    <p:choose>
> > +        <p:when test="$media-types=''">
> > +            <p:identity/>
> > +        </p:when>
> > +        <p:otherwise>
> > +            <p:variable name="media-types-regexes" select="if ($media-types='') then '' else replace(replace(replace($media-types,'\+','\\+'),'\?','.'),'\*','.*')"/>
> > +            <p:delete>
> > +                <p:with-option name="match" select="concat(&quot;//d:file[@media-type='' or not(true() = (for $media-type-regex in tokenize('&quot;,$media-types-regexes,&quot;',' ') return matches(@media-type,$media-type-regex)))]&quot;)"/>
>
> might be a tad more readable (and maybe easier to optimize for processors)
> to use the some ... in ... satisifies expression instead of the true() =
> for ... in ... return ...
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/daisy-consortium/pipeline-modules-common/pull/1/files#r3010698>.
>
>