On Thu, 2018-09-13 at 16:18 -0400, Graydon Saunders wrote: > let $possible1 as xs:string* := (: go looking for a value via one > route :) > let $possible2 .... (: all the other routes in preference order :) > .... > let $foundIt as xs:string := > ($possible1,$possible2,$possible3,$possible4,$possible5,'FAILED')[1] > > This works nicely in terms of "I got the value by the least-bad > route". > What I'm blanking on is "how do I tell which was the first > possibility to > match?" without resorting to sprawl of if-then-else statements. I > have the > idea that there must be a compact way but I have no idea what it is > if > there is.
Don't use variables - just construct a sequence, let $possibles as xs:string := ( stuff to make possible1, stuff to make possible 2, . . . 'fallback value' )[1] > Liam -- Liam Quin, https://www.holoweb.net/liam/cv/ Web slave for vintage clipart http://www.fromoldbooks.org/ Available for XML/Document/Information Architecture/ XSL/XQuery/Web/Text Processing/A11Y work/training/consulting.