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

View file

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

View file

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

View file

@ -45,10 +45,21 @@ Metadata Values
element. element.
`affiliation` `affiliation`
: list of affiliation identifiers; marks the organizations : either full affiliation entries as described in field
with which an author is affiliated. Each identifier in this `affiliation`, or a list of affiliation identifiers.
list must also occur as the `id` of an affiliation listed in
the top-level `affiliation` list. 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` `equal-contrib`
: boolean attribute used to mark authors who contributed : boolean attribute used to mark authors who contributed