westdc-zf1/data/doc.xsl

287 lines
18 KiB
XML
Raw Normal View History

2011-09-21 09:12:23 +00:00
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:php="http://php.net/xsl"
xsl:extension-element-prefixes="php"
>
<xsl:output method="html" encoding="utf-8" indent="no"/>
<xsl:param name="thumburl" select="defaultstring"/>
2011-09-21 09:12:23 +00:00
<xsl:param name="abstract" select="defaultstring"/>
2011-11-23 14:30:56 +00:00
<xsl:param name="projection" select="defaultstring"/>
<xsl:param name="reference" select="defaultstring"/>
<xsl:param name="citation" select="defaultstring"/>
<xsl:param name="fund" select="defaultstring"/>
2011-11-23 14:30:56 +00:00
<xsl:template match="/">
2013-06-11 07:07:24 +00:00
<img>
2013-11-10 15:08:45 +00:00
<xsl:attribute name="src">http://card.westgis.ac.cn/images/westdc-logo-1.png</xsl:attribute>
</img>
2011-11-23 14:30:56 +00:00
<div id="uuid" style="color:red"><u>
<xsl:variable name="uuid" select="//Metadata/mdFileID"/>
2013-11-10 15:08:45 +00:00
<a href="http://card.westgis.ac.cn/data/{$uuid}">
url:<xsl:value-of select="//Metadata/mdFileID"/>
2011-11-23 14:30:56 +00:00
</a>
2011-09-21 09:12:23 +00:00
</u></div>
<center><span style="font-size:20px;background-color:grey;"><xsl:value-of select="//Metadata/dataIdInfo/idCitation/resTitle"/></span></center>
2013-11-10 15:08:45 +00:00
<div><span id="etitle">Alt title:</span><xsl:value-of select="//Metadata/dataIdInfo/idCitation/resAltTitle"/></div>
2011-09-21 09:12:23 +00:00
<ol>
2013-11-10 15:08:45 +00:00
<li><h4 style="background-color:#DEE2E4">Abstract</h4>
2011-11-23 14:30:56 +00:00
<p>
<xsl:choose>
<xsl:when test="$abstract!=''">
<xsl:value-of select="$abstract" disable-output-escaping="yes"/>
</xsl:when>
2011-09-21 09:12:23 +00:00
<xsl:otherwise><xsl:value-of select="//Metadata/dataIdInfo/idAbs"/></xsl:otherwise></xsl:choose></p></li>
2013-11-10 15:08:45 +00:00
<li><h4 style="background-color:#DEE2E4">Keywords</h4>
2011-09-21 09:12:23 +00:00
<ul>
2013-11-10 15:08:45 +00:00
<li><span style="background-color:#dedede">Theme:</span>
2011-09-21 09:12:23 +00:00
<xsl:for-each select="//Metadata/dataIdInfo/descKeys[keyTyp/KeyTypCd/@value='theme']/keyword">
<xsl:value-of select="."/><![CDATA[,]]>
</xsl:for-each></li>
<li>
2013-11-10 15:08:45 +00:00
<span style="background-color:#dedede">Place:</span>
2011-09-21 09:12:23 +00:00
<xsl:for-each select="//Metadata/dataIdInfo/descKeys[keyTyp/KeyTypCd/@value='place']/keyword">
<xsl:value-of select="."/><![CDATA[,]]>
</xsl:for-each>
</li>
<li>
2013-11-10 15:08:45 +00:00
<span style="background-color:#dedede">Temporal:</span>
2011-09-21 09:12:23 +00:00
<xsl:for-each select="//Metadata/dataIdInfo/descKeys[keyTyp/KeyTypCd/@value='temporal']/keyword">
<xsl:value-of select="."/><![CDATA[,]]>
</xsl:for-each>
</li>
<li>
2013-11-10 15:08:45 +00:00
<span style="background-color:#dedede">Discipline:</span>
2011-09-21 09:12:23 +00:00
<xsl:for-each select="//Metadata/dataIdInfo/descKeys[keyTyp/KeyTypCd/@value='discipline']/keyword">
<xsl:value-of select="."/><![CDATA[,]]>
</xsl:for-each>
</li>
</ul>
</li>
2013-11-10 15:08:45 +00:00
<li><h4 style="background-color:#DEE2E4">Detail</h4>
2011-11-23 14:30:56 +00:00
<ol>
<xsl:if test="//rfDenom">
<xsl:for-each select="//rfDenom">
2013-11-10 15:08:45 +00:00
<li>Scale: <xsl:value-of select="."/></li>
2011-11-23 14:30:56 +00:00
</xsl:for-each>
</xsl:if>
<xsl:if test="//scaleDist">
<xsl:for-each select="//scaleDist">
2013-11-10 15:08:45 +00:00
<li>Resolution: <xsl:value-of select="value/Decimal"/><xsl:value-of select="//uomName"/></li>
2011-11-23 14:30:56 +00:00
</xsl:for-each>
</xsl:if>
<xsl:if test="$projection!=''">
2013-11-10 15:08:45 +00:00
<li>Project: <xsl:value-of select="$projection"/></li>
2011-11-23 14:30:56 +00:00
</xsl:if>
<xsl:if test="//transSize">
<xsl:for-each select="//transSize">
2013-11-10 15:08:45 +00:00
<li>Data volume: <xsl:value-of select="."/>MB</li>
2011-11-23 14:30:56 +00:00
</xsl:for-each>
</xsl:if>
<xsl:if test="//distorFormat">
<xsl:for-each select="//distorFormat">
<xsl:if test="formatName!=''">
2013-11-10 15:08:45 +00:00
<li>Data Format: <xsl:value-of select="formatName"/></li>
2011-11-23 14:30:56 +00:00
</xsl:if>
</xsl:for-each>
</xsl:if>
</ol>
</li>
2013-11-10 15:08:45 +00:00
<li><h4 style="background-color:#DEE2E4">Geographic Extent</h4>
<div>
<table border="1" cellspacing="0" cellpadding="4" style="text-align:center" align="center">
<tr>
<td><![CDATA[-]]></td>
2013-11-10 15:08:45 +00:00
<td>North: <xsl:value-of select="//northBL"/></td>
<td><![CDATA[-]]></td>
</tr>
<tr>
2013-11-10 15:08:45 +00:00
<td>West: <xsl:value-of select="//westBL"/></td>
<td><![CDATA[-]]></td>
2013-11-10 15:08:45 +00:00
<td>East: <xsl:value-of select="//eastBL"/></td>
</tr>
<tr>
<td><![CDATA[-]]></td>
2013-11-10 15:08:45 +00:00
<td>South: <xsl:value-of select="//southBL"/></td>
<td><![CDATA[-]]></td>
</tr>
</table>
</div>
2011-11-23 14:30:56 +00:00
</li>
2013-11-10 15:08:45 +00:00
<li><h4 style="background-color:#DEE2E4">Temporal Range</h4>
2011-11-23 14:30:56 +00:00
<ol><xsl:for-each select="//Metadata/dataIdInfo/dataExt/tempEle/TempExtent/exTemp/TM_GeometricPrimitive/TM_Period">
2013-11-10 15:08:45 +00:00
<li>Start: <xsl:value-of select="begin"/></li>
<li>End: <xsl:value-of select="end"/></li>
2011-11-23 14:30:56 +00:00
</xsl:for-each>
</ol>
<ol><xsl:for-each select="//Metadata/dataIdInfo/dataExt/tempEle/TempExtent/exTemp/TM_GeometricPrimitive/TM_Instant">
<li>日期:<xsl:value-of select="//tmPosition/TM_CalDate/calDate"/></li>
</xsl:for-each>
</ol>
</li>
2013-11-10 15:08:45 +00:00
<li><h4 style="background-color:#DEE2E4">Citation</h4>
2011-11-23 14:30:56 +00:00
<ol>
<xsl:if test="$citation!=''">
<xsl:value-of select="$citation" disable-output-escaping="yes"/>
</xsl:if> </ol>
2011-11-23 14:30:56 +00:00
</li>
2013-11-10 15:08:45 +00:00
<li><h4 style="background-color:#DEE2E4">Recommended Publications</h4>
2011-11-23 14:30:56 +00:00
<xsl:if test="$reference!=''">
<xsl:value-of select="$reference" disable-output-escaping="yes"/>
</xsl:if>
</li>
2013-11-10 15:08:45 +00:00
<li><h4 style="background-color:#DEE2E4">DOI</h4>
2011-11-23 14:30:56 +00:00
<xsl:if test="//idCitation/citIdType='DOI'">
<ul>
<xsl:for-each select="//idCitation/citId">
<li><xsl:value-of select="."/></li>
</xsl:for-each>
</ul>
</xsl:if>
</li>
2013-11-10 15:08:45 +00:00
<li><h4 style="background-color:#DEE2E4">Fund</h4>
<ol>
<xsl:if test="$fund!=''">
<xsl:value-of select="$fund" disable-output-escaping="yes"/>
</xsl:if>
</ol>
</li>
2013-11-10 15:08:45 +00:00
<li><h4 style="background-color:#DEE2E4">Limitation</h4>
<ol><xsl:for-each select="//Metadata/dataIdInfo/resConst/Consts/useLimit">
<li><xsl:value-of select="."/></li>
</xsl:for-each>
</ol>
2011-11-23 14:30:56 +00:00
</li>
2013-11-10 15:08:45 +00:00
<li><h4 style="background-color:#DEE2E4">Online Resources</h4>
<ol><xsl:for-each select="//Metadata/distInfo/distTranOps/onLineSrc">
<li><xsl:value-of select="orName"/><![CDATA[]]><xsl:value-of select="linkage"/></li>
</xsl:for-each>
</ol>
2011-09-21 09:12:23 +00:00
</li>
2013-11-10 15:08:45 +00:00
<li><h4 style="background-color:#DEE2E4">Thumbnail</h4></li>
2011-11-23 14:30:56 +00:00
<div style="text-align:center;">
<xsl:for-each select="//Metadata/dataIdInfo/graphOver">
<xsl:variable name="imgurl" select="concat('http://westdc.westgis.ac.cn/gndata/',$thumburl,'/public/',bgFileName)"/>
<xsl:if test="bgFileDesc='large_thumbnail'">
<img width="600" class="figure" align="center">
<xsl:attribute name="src">
<xsl:value-of select="$imgurl"/>
</xsl:attribute>
<xsl:attribute name="alt">
<xsl:value-of select="bgFileDesc"/>
</xsl:attribute>
</img>
</xsl:if>
<xsl:if test="bgFileDesc='thumbnail'">
<img class="figure" align="center">
<xsl:attribute name="src">
<xsl:value-of select="$imgurl"/>
</xsl:attribute>
<xsl:attribute name="alt">
<xsl:value-of select="bgFileDesc"/>
</xsl:attribute>
</img>
</xsl:if>
</xsl:for-each>
2011-11-23 14:30:56 +00:00
</div>
<xsl:if test="//Metadata/dataIdInfo/idCitation/citRespParty[role/RoleCd/@value='principalInvestigator']">
2013-11-10 15:08:45 +00:00
<li><h4 style="background-color:#DEE2E4">Principal Investigator</h4>
2011-09-21 09:12:23 +00:00
<ol>
2011-11-23 14:30:56 +00:00
<xsl:for-each select="//Metadata/dataIdInfo/idCitation/citRespParty[role/RoleCd/@value='principalInvestigator']">
2013-11-10 15:08:45 +00:00
<li>Man:
2011-09-21 09:12:23 +00:00
<ul>
2013-11-10 15:08:45 +00:00
<li><span style="background-color:#dedede">Name: </span><xsl:value-of select="rpIndName"/></li>
<li><span style="background-color:#dedede">Organization: </span><xsl:value-of select="rpOrgName"/></li>
<li><span style="background-color:#dedede">Address: </span><xsl:value-of select="rpCntInfo/cntAddress/country"/><![CDATA[--]]><xsl:value-of select="rpCntInfo/cntAddress/adminArea"/><![CDATA[--]]><xsl:value-of select="rpCntInfo/cntAddress/city"/><![CDATA[--]]><xsl:value-of select="rpCntInfo/cntAddress/delPoint"/></li>
<li><span style="background-color:#dedede">Zip code: </span><xsl:value-of select="rpCntInfo/cntAddress/postCode"/></li>
2011-09-21 09:12:23 +00:00
</ul>
</li></xsl:for-each>
</ol>
2011-11-23 14:30:56 +00:00
</li>
</xsl:if>
<xsl:if test="//Metadata/dataIdInfo/idCitation/citRespParty[role/RoleCd/@value='resourceProvider']">
2013-11-10 15:08:45 +00:00
<li><h4 style="background-color:#DEE2E4">Resource Provider</h4>
<ol>
2011-11-23 14:30:56 +00:00
<xsl:for-each select="//Metadata/dataIdInfo/idCitation/citRespParty[role/RoleCd/@value='resourceProvider']">
2013-11-10 15:08:45 +00:00
<li>Man:
<ul>
2013-11-10 15:08:45 +00:00
<li><span style="background-color:#dedede">Name: </span><xsl:value-of select="rpIndName"/></li>
<li><span style="background-color:#dedede">Organization: </span><xsl:value-of select="rpOrgName"/></li>
<li><span style="background-color:#dedede">Address: </span><xsl:value-of select="rpCntInfo/cntAddress/country"/><![CDATA[--]]><xsl:value-of select="rpCntInfo/cntAddress/adminArea"/><![CDATA[--]]><xsl:value-of select="rpCntInfo/cntAddress/city"/><![CDATA[--]]><xsl:value-of select="rpCntInfo/cntAddress/delPoint"/></li>
<li><span style="background-color:#dedede">Zip code: </span><xsl:value-of select="rpCntInfo/cntAddress/postCode"/></li>
</ul>
</li></xsl:for-each>
</ol>
2011-11-23 14:30:56 +00:00
</li>
</xsl:if>
<xsl:if test="//Metadata/dataIdInfo/idPoC[role/RoleCd/@value='pointOfContact']">
2013-11-10 15:08:45 +00:00
<li><h4 style="background-color:#DEE2E4">Point of Contact</h4>
2011-09-21 09:12:23 +00:00
<ol>
2011-11-23 14:30:56 +00:00
<xsl:for-each select="//Metadata/dataIdInfo/idPoC[role/RoleCd/@value='pointOfContact']">
2013-11-10 15:08:45 +00:00
<li>PoC
2011-09-21 09:12:23 +00:00
<ul>
2013-11-10 15:08:45 +00:00
<li><span style="background-color:#dedede">Name: </span><xsl:value-of select="rpIndName"/></li>
<li><span style="background-color:#dedede">Organization: </span><xsl:value-of select="rpOrgName"/></li>
<li><span style="background-color:#dedede">Address: </span><xsl:value-of select="rpCntInfo/cntAddress/country"/><![CDATA[--]]><xsl:value-of select="rpCntInfo/cntAddress/adminArea"/><![CDATA[--]]><xsl:value-of select="rpCntInfo/cntAddress/city"/><![CDATA[--]]><xsl:value-of select="rpCntInfo/cntAddress/delPoint"/></li>
<li><span style="background-color:#dedede">Zip code: </span><xsl:value-of select="rpCntInfo/cntAddress/postCode"/></li>
<li><span style="background-color:#dedede">Email: </span><xsl:value-of select="rpCntInfo/cntAddress/eMailAdd"/></li>
<li><span style="background-color:#dedede">Phone: </span><xsl:value-of select="rpCntInfo/cntPhone/voiceNum"/></li>
2011-09-21 09:12:23 +00:00
</ul>
</li></xsl:for-each>
</ol>
2011-11-23 14:30:56 +00:00
</li>
</xsl:if>
<xsl:if test="//Metadata/mdContact[role/RoleCd/@value='author']">
2013-11-10 15:08:45 +00:00
<li><h4 style="background-color:#DEE2E4">Metadata Author</h4>
2011-09-21 09:12:23 +00:00
<ol>
2011-11-23 14:30:56 +00:00
<xsl:for-each select="//Metadata/mdContact[role/RoleCd/@value='author']">
2013-11-10 15:08:45 +00:00
<li>Author:
2011-09-21 09:12:23 +00:00
<ul>
2013-11-10 15:08:45 +00:00
<li><span style="background-color:#dedede">Name: </span><xsl:value-of select="rpIndName"/></li>
<li><span style="background-color:#dedede">Organization: </span><xsl:value-of select="rpOrgName"/></li>
<li><span style="background-color:#dedede">Address: </span><xsl:value-of select="rpCntInfo/cntAddress/country"/><![CDATA[--]]><xsl:value-of select="rpCntInfo/cntAddress/adminArea"/><![CDATA[--]]><xsl:value-of select="rpCntInfo/cntAddress/city"/><![CDATA[--]]><xsl:value-of select="rpCntInfo/cntAddress/delPoint"/></li>
<li><span style="background-color:#dedede">Zip code: </span><xsl:value-of select="rpCntInfo/cntAddress/postCode"/></li>
<li><span style="background-color:#dedede">Email: </span><xsl:value-of select="rpCntInfo/cntAddress/eMailAdd"/></li>
<li><span style="background-color:#dedede">Phone: </span><xsl:value-of select="rpCntInfo/cntPhone/voiceNum"/></li>
2011-09-21 09:12:23 +00:00
</ul>
</li></xsl:for-each>
</ol>
2011-11-23 14:30:56 +00:00
</li>
</xsl:if>
<xsl:if test="//Metadata/mdContact[role/RoleCd/@value='publisher']">
2013-11-10 15:08:45 +00:00
<li><h4 style="background-color:#DEE2E4">Publisher</h4>
2011-09-21 09:12:23 +00:00
<ol>
2011-11-23 14:30:56 +00:00
<xsl:for-each select="//Metadata/mdContact[role/RoleCd/@value='publisher']">
2013-11-10 15:08:45 +00:00
<li>Man:
2011-09-21 09:12:23 +00:00
<ul>
2013-11-10 15:08:45 +00:00
<li><span style="background-color:#dedede">Name: </span><xsl:value-of select="rpIndName"/></li>
<li><span style="background-color:#dedede">Organization: </span><xsl:value-of select="rpOrgName"/></li>
<li><span style="background-color:#dedede">Address: </span><xsl:value-of select="rpCntInfo/cntAddress/country"/><![CDATA[--]]><xsl:value-of select="rpCntInfo/cntAddress/adminArea"/><![CDATA[--]]><xsl:value-of select="rpCntInfo/cntAddress/city"/><![CDATA[--]]><xsl:value-of select="rpCntInfo/cntAddress/delPoint"/></li>
<li><span style="background-color:#dedede">Zip code: </span><xsl:value-of select="rpCntInfo/cntAddress/postCode"/></li>
<li><span style="background-color:#dedede">Email: </span><xsl:value-of select="rpCntInfo/cntAddress/eMailAdd"/></li>
<li><span style="background-color:#dedede">Phone: </span><xsl:value-of select="rpCntInfo/cntPhone/voiceNum"/></li>
2011-09-21 09:12:23 +00:00
</ul>
</li></xsl:for-each>
</ol>
2011-11-23 14:30:56 +00:00
</li>
</xsl:if>
<xsl:if test="//Metadata/distInfo/distributor/distorCont[role/RoleCd/@value='distributor']">
2013-11-10 15:08:45 +00:00
<li><h4 style="background-color:#DEE2E4">Distributor</h4>
2011-09-21 09:12:23 +00:00
<ol>
2011-11-23 14:30:56 +00:00
<xsl:for-each select="//Metadata/distInfo/distributor/distorCont[role/RoleCd/@value='distributor']">
2013-11-10 15:08:45 +00:00
<li>Man:
2011-09-21 09:12:23 +00:00
<ul>
2013-11-10 15:08:45 +00:00
<li><span style="background-color:#dedede">Name: </span><xsl:value-of select="rpIndName"/></li>
<li><span style="background-color:#dedede">Organization: </span><xsl:value-of select="rpOrgName"/></li>
<li><span style="background-color:#dedede">Address: </span><xsl:value-of select="rpCntInfo/cntAddress/country"/><![CDATA[--]]><xsl:value-of select="rpCntInfo/cntAddress/adminArea"/><![CDATA[--]]><xsl:value-of select="rpCntInfo/cntAddress/city"/><![CDATA[--]]><xsl:value-of select="rpCntInfo/cntAddress/delPoint"/></li>
<li><span style="background-color:#dedede">Zip code: </span><xsl:value-of select="rpCntInfo/cntAddress/postCode"/></li>
<li><span style="background-color:#dedede">Email: </span><xsl:value-of select="rpCntInfo/cntAddress/eMailAdd"/></li>
<li><span style="background-color:#dedede">Phone: </span><xsl:value-of select="rpCntInfo/cntPhone/voiceNum"/></li>
<li><span style="background-color:#dedede">Fax: </span><xsl:value-of select="rpCntInfo/cntPhone/faxNum"/></li>
2011-09-21 09:12:23 +00:00
</ul>
</li></xsl:for-each>
</ol>
2011-11-23 14:30:56 +00:00
</li>
</xsl:if>
</ol>
2011-09-21 09:12:23 +00:00
</xsl:template>
</xsl:stylesheet>