diff --git a/resources/xsl/3.1/doi2landing.xsl b/resources/xsl/3.1/doi2landing.xsl index a81e9d43d3046afd0fcd7b9d14bb8d5092d41a80..11a350fb3e57d2a676e27a4cf850a1da3649072a 100644 --- a/resources/xsl/3.1/doi2landing.xsl +++ b/resources/xsl/3.1/doi2landing.xsl @@ -581,9 +581,19 @@ <xsl:template match="d:geoLocations/d:geoLocation"> <li> <!-- TODO: tokenize and display properly point and box --> - <xsl:value-of select="d:geoLocationPlace" /> - <xsl:value-of select="d:geoLocationPoint" /> - <xsl:value-of select="d:geoLocationBox" /> + <xsl:choose> + <xsl:when test="d:geoLocationPlace"> + <xsl:value-of select="d:geoLocationPlace" /> + </xsl:when> + <xsl:when test="d:geoLocationPoint"> + <xsl:value-of select="d:geoLocationPoint" /> + <xsl:text> (N. E.)</xsl:text> + </xsl:when> + <xsl:when test="d:geoLocationBox"> + <xsl:value-of select="d:geoLocationBox" /> + <xsl:text> (S. W. N. E.)</xsl:text> + </xsl:when> + </xsl:choose> </li> </xsl:template> diff --git a/resources/xsl/4.1/doi2landing.xsl b/resources/xsl/4.1/doi2landing.xsl index 59c3550dda36f486b0338b45a97abd40b5b59c4f..786d2e19cd9750c307be75db40fb95361c70e0b3 100644 --- a/resources/xsl/4.1/doi2landing.xsl +++ b/resources/xsl/4.1/doi2landing.xsl @@ -139,10 +139,9 @@ <!-- DOI xml root = resource --> <xsl:template match="d:resource"> - <!-- main information --> - <!-- table-condensed --> - <table class="table"> + <table class="table table-condensed"> <tbody> + <!-- main information --> <xsl:apply-templates select="./*[local-name() = 'identifier' or local-name() = 'creators' or local-name() = 'titles' @@ -221,24 +220,36 @@ <!-- 3. Title(s) --> <xsl:template match="d:titles"> + <xsl:if test="d:title[not(@titleType)]"> + <xsl:apply-templates select="d:title[not(@titleType)]"/> + </xsl:if> + <xsl:if test="d:title[@titleType]"> + <xsl:apply-templates select="d:title[@titleType]"/> + </xsl:if> + </xsl:template> + + <xsl:template match="d:title"> + <xsl:variable name="row_css"> + <xsl:choose> + <xsl:when test="not(@titleType)">flabel</xsl:when> + <xsl:otherwise></xsl:otherwise> + </xsl:choose> + </xsl:variable> <tr class="active bold"> - <th class="flabel">Titles</th> + <th class="{$row_css}"> + <xsl:choose> + <xsl:when test="@titleType"> + <xsl:value-of select="@titleType" /> + </xsl:when> + <xsl:otherwise>Title</xsl:otherwise> + </xsl:choose> + </th> <td> - <xsl:apply-templates /> + <xsl:value-of select="." /> </td> </tr> </xsl:template> - <xsl:template match="d:title"> - <xsl:value-of select="." /> - <xsl:if test="@titleType"> - <xsl:text> (</xsl:text> - <xsl:value-of select="@titleType" /> - <xsl:text>)</xsl:text> - </xsl:if> - <br/> - </xsl:template> - <!-- 4. Publisher --> <xsl:template match="d:publisher"> @@ -297,9 +308,9 @@ <xsl:apply-templates select="./d:contributor[@contributorType = 'ProjectLeader']"/> <xsl:apply-templates select="./d:contributor[@contributorType = 'WorkPackageLeader']"/> <xsl:apply-templates select="./d:contributor[@contributorType = 'ProjectMember']"/> + <xsl:apply-templates select="./d:contributor[@contributorType = 'DataCollector']"/> <xsl:apply-templates select="./d:contributor[@contributorType = 'Other']"/> <xsl:apply-templates select="./d:contributor[@contributorType = 'RelatedPerson']"/> - <xsl:apply-templates select="./d:contributor[@contributorType = 'DataCollector']"/> <xsl:apply-templates select="./d:contributor[@contributorType = 'DataManager']"/> <xsl:apply-templates select="./d:contributor[@contributorType = 'Funder']"/> <xsl:apply-templates select="./d:contributor[@contributorType = 'Sponsor']"/> @@ -312,9 +323,9 @@ and @contributorType != 'ProjectLeader' and @contributorType != 'WorkPackageLeader' and @contributorType != 'ProjectMember' + and @contributorType != 'DataCollector' and @contributorType != 'Other' and @contributorType != 'RelatedPerson' - and @contributorType != 'DataCollector' and @contributorType != 'DataManager' and @contributorType != 'Funder' and @contributorType != 'Sponsor' @@ -570,9 +581,19 @@ <xsl:template match="d:geoLocations/d:geoLocation"> <li> <!-- TODO: tokenize and display properly point and box --> - <xsl:value-of select="d:geoLocationPlace" /> - <xsl:value-of select="d:geoLocationPoint" /> - <xsl:value-of select="d:geoLocationBox" /> + <xsl:choose> + <xsl:when test="d:geoLocationPlace"> + <xsl:value-of select="d:geoLocationPlace" /> + </xsl:when> + <xsl:when test="d:geoLocationPoint"> + <xsl:value-of select="d:geoLocationPoint" /> + <xsl:text> (N. E.)</xsl:text> + </xsl:when> + <xsl:when test="d:geoLocationBox"> + <xsl:value-of select="d:geoLocationBox" /> + <xsl:text> (S. W. N. E.)</xsl:text> + </xsl:when> + </xsl:choose> </li> </xsl:template> @@ -609,13 +630,13 @@ <xsl:template name="add-line-breaks"> <xsl:param name="string" select="." /> <xsl:choose> - <xsl:when test="contains($string, '

')"> + <xsl:when test="contains($string, '
')"> <p> - <xsl:value-of select="substring-before($string, '

')" /> + <xsl:value-of select="substring-before($string, '
')" /> </p> <xsl:call-template name="add-line-breaks"> <xsl:with-param name="string" - select="substring-after($string, '

')" /> + select="substring-after($string, '
')" /> </xsl:call-template> </xsl:when> <xsl:otherwise>