How do you handle a non-number number field?

I have an odd-ball like "2014-1" in a volume field. How do I handle it? Using cs:number variable="volume" prefix="vol." will split the field into vol.2014, -vol. 1. CSL won't take a number field into cs:text either.
  • csl-m won't let you do <text variable="volume"/>? That's certainly legal in regular csl.
  • This is funny. It does seem that CSL-m will take a number field in cs:text after all. CSL-m validator set off "error: attribute ^variable with invalid value "volume" ", so I assumed it was not going to work.
  • Styles that validate are a subset of styles that work. While all styles that validate work, very much not all styles that work validate.
  • If you make it cs:number rather than cs:text, it will validate ok.
  • wonblee says that splits up the field, though?
  • edited February 10, 2014
    @fbennett
    Yes, that I understand. The problem is cs:number will split "2014-1" into two if there is an affix. cs:text works, so problem solved.
  • edited February 11, 2014
    Ah, quite right, sorry. Instead of this:
    <number variable="volume" prefix="vol."/>

    try something like this
    <group>
    <label variable="volume" form="short"/>
    <number variable="volume"/>
    </group>

    Using a localised term is generally better than hard-coding strings in the affixes.
Sign In or Register to comment.