xsl-list
[Top] [All Lists]

Re: [xsl] Increasing sequence ?

2015-03-25 14:10:39
That's what I use. It should be O(n).

These sort of expressions come up quite often when writing XSD 1.1 assertions. 

Something to bear in mind is that Saxon gives special treatment to assertions 
that use the "every ... satisfies..." format - the diagnostics will tell you 
not only that the assertion failed, but which item in the sequence caused it to 
fail.

Michael Kay
Saxonica
mike(_at_)saxonica(_dot_)com
+44 (0) 118 946 5893




On 25 Mar 2015, at 17:20, Leo Studer leo(_dot_)studer(_at_)varioweb(_dot_)ch 
<xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> wrote:

A similar problem as before, is the integer sequence increasing?

this is my solution: 

every $v in 1 to (count($sequence)-1) satisfies ($sequence[$v] lt 
$sequence[$v+1])

Do you have a better one?

Cheers
Leo

--~----------------------------------------------------------------
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>