Commit 53e0f995 authored by bourgesl's avatar bourgesl
Browse files

fixed geoLocation display (convention)

parent 5b9640d7
......@@ -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>
......
......@@ -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, '&#xA;&#xA;')">
<xsl:when test="contains($string, '&#xA;')">
<p>
<xsl:value-of select="substring-before($string, '&#xA;&#xA;')" />
<xsl:value-of select="substring-before($string, '&#xA;')" />
</p>
<xsl:call-template name="add-line-breaks">
<xsl:with-param name="string"
select="substring-after($string, '&#xA;&#xA;')" />
select="substring-after($string, '&#xA;')" />
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment