Skip to content

[XSLT] Use of multiple predicates: order of evaluation #71

@michaelhkay

Description

@michaelhkay

I notice I added an example pattern to the draft XSLT4 spec match=".[. castable as xs:date][xs:date(.) le current-date()]" which is incorrect because processors are allowed to change the order of predicates, so you can't use the first predicate as a guard to stop the second predicate throwing an error. I've seen users fall over this (Saxon does sometimes reorder predicates). My instinct is to ban reordering of predicates; if you want to allow it, you can use the "and" operator. An alternative would be an "and" operator (say "and-also") with explicit ordering semantics, as in XPath 1.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementA change or improvement to an existing featureXPathAn issue related to XPathXQueryAn issue related to XQueryXSLTAn issue related to XSLT

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions