CSL Discourse

"Scope" of inheritable name attributes


#1

The documents tell me that (emphasis added)

When an inheritable name attribute is set on cs:style , cs:citation or cs:bibliography , its value is used for all cs:names elements within the scope of the element carrying the attribute. If an attribute is set on multiple hierarchical levels, the value set at the lowest level is used.

My question is what “scope” means in this context. It could mean:

  • The inheritable options affect all cs:names elements which are descendants of the cs:citation or cs:bibliography node on which the attributes are set (i.e. scope determined “statically” by the position within the xml tree), or

  • The inheritable options affect all productions from a cs:names element that is called as a result of rendering either a citation or a bibliography (i.e. scope determined, as it were, “dynamically”, during the application of the csl to produce (maybe) some output).

This obviously does not matter if the attributes are set on cs:style. What it affects is proper behaviour when a cs:macro renders a cs:names element. My instincts, in terms of practical use, would be that the second, dynamic, interpretation makes sense: a cs:macro used “from within” a node whose ultimate parent is cs:citation, should use inheritable name elements set on any relevant element that has been “called” before it renders text. In terms of the re-usability of macros, that seems the right decision, but I may be missing something. Is that right?


#2

It’s indeed the second, i.e. dynamic interpretation, yes. E.g. for styles on the repository, we almost universally set et-al-min and et-al-use-first attributes on cs:citation and cs:bibliography to apply them to authors which are (also almost universally) rendered using cs:names calls in macros.