Revision 986f6827
Added by Andreas Müller almost 6 years ago
cdmlib-print/src/main/resources/stylesheets/pdf/flore-afrique-centrale.xsl | ||
---|---|---|
1226 | 1226 |
<xsl:sort select="sources/e[1]/citation/datePublished/start"/> |
1227 | 1227 |
<xsl:for-each select="sources/e"> |
1228 | 1228 |
|
1229 |
<xsl:variable name="lastname_text" select="citation/authorship/lastname"/>
|
|
1230 |
<xsl:variable name="prev_lastname_text" select="preceding-sibling::e[1]/citation/authorship/lastname"/>
|
|
1229 |
<xsl:variable name="familyname_text" select="citation/authorship/familyname"/>
|
|
1230 |
<xsl:variable name="prev_familyname_text" select="preceding-sibling::e[1]/citation/authorship/familyname"/>
|
|
1231 | 1231 |
|
1232 | 1232 |
<xsl:if test="nameUsedInSource/uuid=$name-uuid"> |
1233 | 1233 |
<xsl:text>; </xsl:text> |
... | ... | |
1235 | 1235 |
<!--xsl:value-of select="citation/authorship/titleCache"/--> |
1236 | 1236 |
<!--TODO wrap this in a variable and compare the previous variable to this one to see if we're dealing with the same name--> |
1237 | 1237 |
<xsl:for-each select="citation/authorship/teamMembers/e"> |
1238 |
<xsl:value-of select="lastname"/>
|
|
1238 |
<xsl:value-of select="familyname"/>
|
|
1239 | 1239 |
<xsl:choose> |
1240 | 1240 |
<xsl:when test="position() != last()"> |
1241 | 1241 |
<xsl:text> & </xsl:text> |
... | ... | |
1244 | 1244 |
</xsl:for-each> |
1245 | 1245 |
|
1246 | 1246 |
<xsl:choose> |
1247 |
<xsl:when test="$lastname_text != $prev_lastname_text">
|
|
1248 |
<xsl:value-of select="citation/authorship/lastname"/><!--TODO We print lastname here as well as the author list is this a mistake?-->
|
|
1247 |
<xsl:when test="$familyname_text != $prev_familyname_text">
|
|
1248 |
<xsl:value-of select="citation/authorship/familyname"/><!--TODO We print familyname here as well as the author list is this a mistake?-->
|
|
1249 | 1249 |
|
1250 | 1250 |
<xsl:text> (</xsl:text> |
1251 | 1251 |
<xsl:value-of select="citation/datePublished/start"/> |
... | ... | |
1285 | 1285 |
<fo:inline> |
1286 | 1286 |
<!--xsl:value-of select="citation/authorship/titleCache"/--> |
1287 | 1287 |
<xsl:for-each select="citation/authorship/teamMembers/e"> |
1288 |
<xsl:value-of select="lastname"/>
|
|
1288 |
<xsl:value-of select="familyname"/>
|
|
1289 | 1289 |
<xsl:choose> |
1290 | 1290 |
<xsl:when test="position() != last()"> |
1291 | 1291 |
<xsl:text> & </xsl:text> |
... | ... | |
1293 | 1293 |
</xsl:choose> |
1294 | 1294 |
</xsl:for-each> |
1295 | 1295 |
|
1296 |
<xsl:value-of select="citation/authorship/lastname"/>
|
|
1296 |
<xsl:value-of select="citation/authorship/familyname"/>
|
|
1297 | 1297 |
<xsl:text> (</xsl:text> |
1298 | 1298 |
<xsl:value-of select="citation/datePublished/start"/> |
1299 | 1299 |
<xsl:text>: </xsl:text> |
... | ... | |
1324 | 1324 |
<xsl:for-each select="//nomenclaturalReference[count(. | key('citations-by-uuid', uuid)[1]) = 1] | //citation[count(. | key('citations-by-uuid', uuid)[1]) = 1]"> |
1325 | 1325 |
<!--xsl:for-each select="//nomenclaturalReference[count(. | key('nomenclaturalrefs-by-uuid', uuid)[1]) = 1]"--> |
1326 | 1326 |
<!--xsl:for-each select="//nomenclaturalReference"--> |
1327 |
<xsl:sort select="authorship/lastname | authorship/teamMembers/e[1]/lastname" />
|
|
1327 |
<xsl:sort select="authorship/familyname | authorship/teamMembers/e[1]/familyname" />
|
|
1328 | 1328 |
<xsl:sort select="datePublished/start"></xsl:sort> |
1329 | 1329 |
|
1330 | 1330 |
<fo:block linefeed-treatment="preserve" text-align="justify" text-indent="-{$taxon-name-indentation}" start-indent="{$taxon-name-indentation}"> |
... | ... | |
1335 | 1335 |
<!--xsl:value-of select="titleCache"/--> |
1336 | 1336 |
|
1337 | 1337 |
<!--I am only listing references which have at least one author name. If there are other references in the database - why don't these have an author name--> |
1338 |
<xsl:if test="authorship/teamMembers/e[1]/lastname != '' or authorship/lastname != '' or authorship/titleCache != ''">
|
|
1338 |
<xsl:if test="authorship/teamMembers/e[1]/familyname != '' or authorship/familyname != '' or authorship/titleCache != ''">
|
|
1339 | 1339 |
<!--xsl:text>
</xsl:text--> |
1340 | 1340 |
<xsl:choose> |
1341 |
<xsl:when test="authorship/teamMembers/e[1]/lastname != ''">
|
|
1341 |
<xsl:when test="authorship/teamMembers/e[1]/familyname != ''">
|
|
1342 | 1342 |
<xsl:for-each select="authorship/teamMembers/e"> |
1343 | 1343 |
<fo:inline> |
1344 |
<xsl:value-of select="lastname"/>
|
|
1344 |
<xsl:value-of select="familyname"/>
|
|
1345 | 1345 |
<xsl:text> </xsl:text> |
1346 |
<xsl:value-of select="firstname"/>
|
|
1346 |
<xsl:value-of select="givenname"/>
|
|
1347 | 1347 |
<xsl:choose> |
1348 | 1348 |
<xsl:when test="position() != last()"> |
1349 | 1349 |
<xsl:text> & </xsl:text> |
... | ... | |
1354 | 1354 |
</xsl:when> |
1355 | 1355 |
<xsl:otherwise> |
1356 | 1356 |
<xsl:choose> |
1357 |
<xsl:when test="authorship/lastname != ''">
|
|
1358 |
<!--xsl:if test="authorship/lastname != ''"-->
|
|
1357 |
<xsl:when test="authorship/familyname != ''">
|
|
1358 |
<!--xsl:if test="authorship/familyname != ''"-->
|
|
1359 | 1359 |
<fo:inline> |
1360 |
<xsl:value-of select="authorship/lastname"/>
|
|
1360 |
<xsl:value-of select="authorship/familyname"/>
|
|
1361 | 1361 |
<xsl:text> </xsl:text> |
1362 |
<xsl:value-of select="authorship/firstname"/>
|
|
1362 |
<xsl:value-of select="authorship/givenname"/>
|
|
1363 | 1363 |
</fo:inline> |
1364 | 1364 |
</xsl:when> |
1365 | 1365 |
<xsl:otherwise> |
... | ... | |
1434 | 1434 |
|
1435 | 1435 |
<xsl:template name="Referencesold"> |
1436 | 1436 |
|
1437 |
<!-- need to sort by lastname of the first author i.e. //citation/authorship/teamMembers/e[1]/lastname -->
|
|
1437 |
<!-- need to sort by familyname of the first author i.e. //citation/authorship/teamMembers/e[1]/familyname -->
|
|
1438 | 1438 |
<xsl:for-each select="//citation"> |
1439 | 1439 |
|
1440 | 1440 |
<!-- TODO sorting only works for the first citation, implement correctly --> |
1441 |
<xsl:sort select="authorship/lastname"/>
|
|
1442 |
<xsl:sort select="authorship/teamMembers/e[1]/lastname"/>
|
|
1441 |
<xsl:sort select="authorship/familyname"/>
|
|
1442 |
<xsl:sort select="authorship/teamMembers/e[1]/familyname"/>
|
|
1443 | 1443 |
<fo:block> |
1444 | 1444 |
<fo:inline> |
1445 | 1445 |
|
... | ... | |
1459 | 1459 |
<!-- .[not(preceding-sibling::Link[@personId = current()/@personId --> |
1460 | 1460 |
<xsl:choose> |
1461 | 1461 |
|
1462 |
<xsl:when test="authorship/teamMembers/e[1]/lastname != '' or authorship/lastname != ''">
|
|
1462 |
<xsl:when test="authorship/teamMembers/e[1]/familyname != '' or authorship/familyname != ''">
|
|
1463 | 1463 |
|
1464 | 1464 |
<xsl:choose> |
1465 |
<xsl:when test="authorship/teamMembers/e[1]/lastname != ''">
|
|
1465 |
<xsl:when test="authorship/teamMembers/e[1]/familyname != ''">
|
|
1466 | 1466 |
<xsl:for-each select="authorship/teamMembers/e"> |
1467 | 1467 |
<fo:inline font-weight="bold"> |
1468 |
<xsl:value-of select="lastname"/>
|
|
1468 |
<xsl:value-of select="familyname"/>
|
|
1469 | 1469 |
<xsl:choose> |
1470 | 1470 |
<xsl:when test="position() != last()"> |
1471 | 1471 |
<xsl:text> & </xsl:text> |
... | ... | |
1475 | 1475 |
</xsl:for-each> |
1476 | 1476 |
</xsl:when> |
1477 | 1477 |
<xsl:otherwise> |
1478 |
<xsl:if test="authorship/lastname != ''">
|
|
1478 |
<xsl:if test="authorship/familyname != ''">
|
|
1479 | 1479 |
<fo:inline font-weight="bold"> |
1480 |
<xsl:value-of select="authorship/lastname"/>
|
|
1480 |
<xsl:value-of select="authorship/familyname"/>
|
|
1481 | 1481 |
</fo:inline> |
1482 | 1482 |
</xsl:if> |
1483 | 1483 |
</xsl:otherwise> |
Also available in: Unified diff
ref #7238 rename lastName and firstName