a certain element of my xml data should match EXACT ONE of the following conditions:
1.) It has a @when attribute and nothing else.
2.) It has a @when-iso attribute and nothing else.
3.) It has both a @notBefore-iso and a @notAfter-iso attribute, but neither a @when nor a @when-iso attribute.
I try to test that using schematron, but I fail at creating a matching xpath expression.
I tried
<assert test="@when or @when-iso or (not(@when) and not(@when-iso) and @notBefore-iso and @notAfter-iso)">
but that doesn't work. Obviously, the content in brackets is simply ignored. So, how can I build complex/nested conditional expressions?
An example that should work for your case :