home.social

#xslt4 — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #xslt4, aggregated by home.social.

  1. XQuery & XPath users, watch out - i spent a day debugging!

    Turns out in BaseX & i think XPath 4 (upcoming), `else` clauses are optional.

    This is unexpected in an expression language -

    `let $name := if ($p) then get-name($p)
    return some-func($name)`

    is the same as

    `let $name := if ($p) then get-name($p) else ( )
    return some-func($name)`

    but in a multi-screen if/then/else it’s more likely you just forgot the else() or mismatched some parens.

    #xquery #MarkupMonday #basex #xpath #xslt4