schema icon indicating copy to clipboard operation
schema copied to clipboard

Syntax proposal: type as implicitly match="any"

Open fbennett opened this issue 12 years ago • 1 comments

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.

fbennett avatar Jan 31 '13 00:01 fbennett

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).

denismaier avatar Jun 16 '20 12:06 denismaier