[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Return the string that matches earliest -- Got a slick XPath expression that solves this?


Subject: Re: [xsl] Return the string that matches earliest -- Got a slick XPath expression that solves this?
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Sun, 24 Nov 2013 11:02:23 -0800

Actually a little bit shorter (and correctly including prefixes) (and,
of course, this is XPath 3.0):

   ('bQc', 'Qc')
    [string-length(substring-before('aabQc', .))
    =
     min((('bQc', 'Qc')!(string-length(substring-before('aabQc', .)))))
     ]


To explain this in English:


Current Thread
Keywords