schema
schema copied to clipboard
Syntax proposal: type as implicitly match="any"
This is a companion to #107.
A condition may test for multiple types. As an item can only have one type, a test for multiple types with match="all" is not useful because it will always return false. If the type attribute always returned true on a match to any of the listed types, regardless of the value of match, constructs like the following would become possible:
<choose>
<if type="webpage post-weblog" variable="url" match="all">
<text variable="url"/> <!-- or whatever -->
</if>
</choose>
Like #107, this would reduce the need for complex nested conditionals in CSL code.
I certainly understand what the purpose of this is, but I do not think the solution is particularly transparent. I'd propose to add something like CSL-M's cs:conditions (see here).