[MLZ] Possible error with csl-m-validator
The following code triggers an error in csl-m-validator, and yet it runs flawlessly in an actual CSL-m.
<names variable="authority">
<name/>
<institution institution-parts="long-short">
<institution-part if-short="true" name="short" prefix=" (" suffix=")"/>
</institution>
</names>
This is an old discussion that has not been active in a long time. Before commenting here, you should strongly consider starting a new discussion instead. If you think the content of this discussion is still relevant, you can link to it from your new discussion.
More importantly, this code causes an error only with the validator, not with MLZ itself. Below is the error I incur.
It's not the space in this case. Get rid of the space to make it prefix="(" and you still get the error.
This is documented in the specification supplement. On a cs:institution-part element, you can use name="long" or name="short". To set formatting separately for the long and the short forms, you can set two cs:institution-part elements in the cs:institution node.
The if-short="true" setting is available only with name="long". When set, formatting is applied to the long form only if a short form is also available. This is a narrowly specialized requirement: there is an example use case in the specification.
I wanted to write a code to produce a citation format like Example 4 in the supplement. The above was what I came up with, which triggers an error in the validator but does the job.
<names variable="authority">
<name/>
<institution institution-parts="long-short">
<institution-part name="long"/>
<institution-part name="short" prefix=" (" suffix=")"/>
</institution>
</names>
This will show a validation error on the prefix space, but it should not, since you really do need the space here. I'll adjust the validator soon. You don't need if-short for this one.