JATS templates: fix affiliation tagging in articleauthoring output

Affiliations were `xlink`ed even in the articleauthoring tag set, but
`<aff>` are not allowed as children of `contrib-group` elements in that
tag set. Each affiliation must be listed directly in the contrib
element.
This commit is contained in:
Albert Krewinkel 2021-12-23 08:45:39 +01:00
parent 7954070b01
commit ddd1b85608
No known key found for this signature in database
GPG key ID: 388DC0B21F631124
4 changed files with 47 additions and 29 deletions

View file

@ -1,38 +1,36 @@
$--
$-- Affiliations
$--
$for(affiliation)$
<aff id="aff-$affiliation.id$">
$-- wrap affiliation if it has a known institution identifier
$if(affiliation.group)$
<institution content-type="group">$affiliation.group$</institution>
$if(it.group)$
<institution content-type="group">${it.group}</institution>
$endif$
$if(affiliation.department)$
<institution content-type="dept">$affiliation.department$</institution>
$if(it.department)$
<institution content-type="dept">${it.department}</institution>
$endif$
<institution-wrap>
$if(affiliation.organization)$
<institution>$affiliation.organization$</institution>
$if(it.organization)$
<institution>${it.organization}</institution>
$else$
<institution>$affiliation.name$</institution>
<institution>${it.name}</institution>
$endif$
$if(affiliation.isni)$
<institution-id institution-id-type="ISNI">$affiliation.isni$</institution-id>
$if(it.isni)$
<institution-id institution-id-type="ISNI">${it.isni}</institution-id>
$endif$
$if(affiliation.ringgold)$
<institution-id institution-id-type="Ringgold">$affiliation.ringgold$</institution-id>
$if(it.ringgold)$
<institution-id institution-id-type="Ringgold">${it.ringgold}</institution-id>
$endif$
$if(affiliation.ror)$
<institution-id institution-id-type="ROR">$affiliation.ror$</institution-id>
$if(it.ror)$
<institution-id institution-id-type="ROR">${it.ror}</institution-id>
$endif$
$for(affiliation.pid)$
<institution-id institution-id-type="$affiliation.pid.type$">$affiliation.pid.id$</institution-id>
$for(it.pid)$
<institution-id institution-id-type="${it.type}">${it.id}</institution-id>
$endfor$
</institution-wrap>$if(affiliation.street-address)$,
$for(affiliation.street-address)$
<addr-line>$affiliation.street-address$</addr-line>$sep$,
</institution-wrap>$if(it.street-address)$,
$for(it.street-address)$
<addr-line>${it}</addr-line>$sep$,
$endfor$
$else$$if(affiliation.city)$, <city>$affiliation.city$</city>$endif$$endif$$if(affiliation.country)$,
<country$if(affiliation.country-code)$ country="$affiliation.country-code$"$endif$>$affiliation.country$</country>$endif$
$else$$if(it.city)$, <city>$it.city$</city>$endif$$endif$$if(it.country)$,
<country$if(it.country-code)$ country="$it.country-code$"$endif$>$it.country$</country>$endif$
</aff>
$endfor$

View file

@ -106,15 +106,25 @@ $endif$
$if(author.email)$
<email>$author.email$</email>
$endif$
$-- if affiliations are listed separately, then create links. Otherwise
$-- include them here.
$if(affiliation)$
$for(author.affiliation)$
<xref ref-type="aff" rid="aff-$author.affiliation$"/>
$endfor$
$else$
$for(author.affiliation)$
${ it:affiliations.jats() }
$endfor$
$endif$
$if(author.cor-id)$
<xref ref-type="corresp" rid="cor-$author.cor-id$"><sup>*</sup></xref>
$endif$
</contrib>
$endfor$
${ affiliations.jats() }
$for(affiliation)$
${ it:affiliations.jats() }
$endfor$
</contrib-group>
$endif$
$if(article.author-notes)$

View file

@ -40,14 +40,13 @@ $if(author.email)$
<email>$author.email$</email>
$endif$
$for(author.affiliation)$
<xref ref-type="aff" rid="aff-$author.affiliation$"/>
${ it:affiliations.jats() }
$endfor$
$if(author.cor-id)$
<xref ref-type="corresp" rid="cor-$author.cor-id$"><sup>*</sup></xref>
$endif$
</contrib>
$endfor$
${ affiliations.jats() }
</contrib-group>
$endif$
$if(copyright)$

View file

@ -45,10 +45,21 @@ Metadata Values
element.
`affiliation`
: list of affiliation identifiers; marks the organizations
with which an author is affiliated. Each identifier in this
list must also occur as the `id` of an affiliation listed in
the top-level `affiliation` list.
: either full affiliation entries as described in field
`affiliation`, or a list of affiliation identifiers.
The identifiers link to the organizations with which an
author is affiliated. Each identifier in this list must
also occur as the `id` of an affiliation listed in the
top-level `affiliation` list.
If the top-level `affiliation` field is set, then this
entry assumed to be a list of identifiers, and a list of
full entries if that field is unset.
Full entries must be given if the articleauthoring tag
set it used, as affiliation links are not allowed in that
schema.
`equal-contrib`
: boolean attribute used to mark authors who contributed