citation-style-language / documentation

Citation Style Language documentation
http://citationstyles.org/
Creative Commons Attribution Share Alike 4.0 International
43 stars 21 forks source link

Do `<names variable="author"/>` and `<names variable="author"><name/></names>` achieve the same thing? #67

Closed customcommander closed 5 years ago

customcommander commented 5 years ago

Hi,

I'm just wondering if these two snippets are identical in terms of what they both eventually achieve? That is both will display all names in the author variable, relying on the same sets of defaults.

Snippet 1

<names variable="author"/>

Snippet 2

<names variable="author">
  <name/>
</names>

Thanks

rmzelle commented 5 years ago

Yup. See also http://docs.citationstyles.org/en/1.0.1/release-notes.html#cs-name-optional and http://docs.citationstyles.org/en/1.0.1/specification.html#name ("The cs:name element, an optional child element of cs:names, can be used to describe the formatting of individual names".

It's just there as a vehicle to carry attributes that define name formatting, but since these may have already been defined at a higher level, <name/> may not always be necessary. See also http://docs.citationstyles.org/en/1.0.1/specification.html#inheritable-name-options.