westdc-zf1/data/doc.xsl

186 lines
13 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<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"/>
<xsl:param name="abstract" select="defaultstring"/>
<xsl:template match="/">
<div id="uuid" style="color:red"><u>
<xsl:variable name="uuid" select="//Metadata/mdFileID"/>
<a href="http://westdc.westgis.ac.cn/data/{$uuid}">
<xsl:value-of select="//Metadata/mdFileID"/>
</a>
</u></div>
<center><span style="font-size:20px;background-color:grey;"><xsl:value-of select="//Metadata/dataIdInfo/idCitation/resTitle"/></span></center>
<div><span id="etitle">英文标题:</span><xsl:value-of select="//Metadata/dataIdInfo/idCitation/resAltTitle"/></div>
<ol>
<li><h4 style="background-color:#DEE2E4">摘要</h4>
<p>
<xsl:choose>
<xsl:when test="$abstract!=''">
<xsl:value-of select="$abstract" disable-output-escaping="yes"/>
</xsl:when>
<xsl:otherwise><xsl:value-of select="//Metadata/dataIdInfo/idAbs"/></xsl:otherwise></xsl:choose></p></li>
<li><h4 style="background-color:#DEE2E4">关键词</h4>
<ul>
<li><span style="background-color:#dedede">主题关键词:</span>
<xsl:for-each select="//Metadata/dataIdInfo/descKeys[keyTyp/KeyTypCd/@value='theme']/keyword">
<xsl:value-of select="."/><![CDATA[,]]>
</xsl:for-each></li>
<li>
<span style="background-color:#dedede">位置关键词:</span>
<xsl:for-each select="//Metadata/dataIdInfo/descKeys[keyTyp/KeyTypCd/@value='place']/keyword">
<xsl:value-of select="."/><![CDATA[,]]>
</xsl:for-each>
</li>
<li>
<span style="background-color:#dedede">时间关键词:</span>
<xsl:for-each select="//Metadata/dataIdInfo/descKeys[keyTyp/KeyTypCd/@value='temporal']/keyword">
<xsl:value-of select="."/><![CDATA[,]]>
</xsl:for-each>
</li>
<li>
<span style="background-color:#dedede">学科关键词:</span>
<xsl:for-each select="//Metadata/dataIdInfo/descKeys[keyTyp/KeyTypCd/@value='discipline']/keyword">
<xsl:value-of select="."/><![CDATA[,]]>
</xsl:for-each>
</li>
</ul>
</li>
<li><h4 style="background-color:#DEE2E4">本数据的引用</h4>
<ol>
<xsl:for-each select="//Metadata/dataIdInfo/idCitation/otherCitDet">
<li><xsl:value-of select="."/></li>
</xsl:for-each>
</ol>
</li>
<li><h4 style="background-color:#DEE2E4">数据调查者</h4>
<ol>
<xsl:for-each select="//Metadata/dataIdInfo/idCitation/citRespParty[role/RoleCd/@value='principalInvestigator']">
<li>调查者:
<ul>
<li><span style="background-color:#dedede">姓名:</span><xsl:value-of select="rpIndName"/></li>
<li><span style="background-color:#dedede">单位:</span><xsl:value-of select="rpOrgName"/></li>
<li><span style="background-color:#dedede">通讯地址:</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">邮编:</span><xsl:value-of select="rpCntInfo/cntAddress/postCode"/></li>
</ul>
</li></xsl:for-each>
</ol>
</li>
<li><h4 style="background-color:#DEE2E4">数据联系人</h4>
<ol>
<xsl:for-each select="//Metadata/dataIdInfo/idPoC[role/RoleCd/@value='pointOfContact']">
<li>联系人:
<ul>
<li><span style="background-color:#dedede">姓名:</span><xsl:value-of select="rpIndName"/></li>
<li><span style="background-color:#dedede">单位:</span><xsl:value-of select="rpOrgName"/></li>
<li><span style="background-color:#dedede">通讯地址:</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">邮编:</span><xsl:value-of select="rpCntInfo/cntAddress/postCode"/></li>
<li><span style="background-color:#dedede">电子邮件:</span><xsl:value-of select="rpCntInfo/cntAddress/eMailAdd"/></li>
<li><span style="background-color:#dedede">电话:</span><xsl:value-of select="rpCntInfo/cntPhone/voiceNum"/></li>
</ul>
</li></xsl:for-each>
</ol>
</li>
<li><h4 style="background-color:#DEE2E4">元数据作者</h4>
<ol>
<xsl:for-each select="//Metadata/mdContact[role/RoleCd/@value='author']">
<li>作者:
<ul>
<li><span style="background-color:#dedede">姓名:</span><xsl:value-of select="rpIndName"/></li>
<li><span style="background-color:#dedede">单位:</span><xsl:value-of select="rpOrgName"/></li>
<li><span style="background-color:#dedede">通讯地址:</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">邮编:</span><xsl:value-of select="rpCntInfo/cntAddress/postCode"/></li>
<li><span style="background-color:#dedede">电子邮件:</span><xsl:value-of select="rpCntInfo/cntAddress/eMailAdd"/></li>
<li><span style="background-color:#dedede">电话:</span><xsl:value-of select="rpCntInfo/cntPhone/voiceNum"/></li>
</ul>
</li></xsl:for-each>
</ol>
</li>
<li><h4 style="background-color:#DEE2E4">元数据发布者</h4>
<ol>
<xsl:for-each select="//Metadata/mdContact[role/RoleCd/@value='publisher']">
<li>发布者:
<ul>
<li><span style="background-color:#dedede">姓名:</span><xsl:value-of select="rpIndName"/></li>
<li><span style="background-color:#dedede">单位:</span><xsl:value-of select="rpOrgName"/></li>
<li><span style="background-color:#dedede">通讯地址:</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">邮编:</span><xsl:value-of select="rpCntInfo/cntAddress/postCode"/></li>
<li><span style="background-color:#dedede">电子邮件:</span><xsl:value-of select="rpCntInfo/cntAddress/eMailAdd"/></li>
<li><span style="background-color:#dedede">电话:</span><xsl:value-of select="rpCntInfo/cntPhone/voiceNum"/></li>
</ul>
</li></xsl:for-each>
</ol>
</li>
<li><h4 style="background-color:#DEE2E4">数据分发者</h4>
<ol>
<xsl:for-each select="//Metadata/distInfo/distributor/distorCont[role/RoleCd/@value='distributor']">
<li>分发者:
<ul>
<li><span style="background-color:#dedede">姓名:</span><xsl:value-of select="rpIndName"/></li>
<li><span style="background-color:#dedede">单位:</span><xsl:value-of select="rpOrgName"/></li>
<li><span style="background-color:#dedede">通讯地址:</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">邮编:</span><xsl:value-of select="rpCntInfo/cntAddress/postCode"/></li>
<li><span style="background-color:#dedede">电子邮件:</span><xsl:value-of select="rpCntInfo/cntAddress/eMailAdd"/></li>
<li><span style="background-color:#dedede">电话:</span><xsl:value-of select="rpCntInfo/cntPhone/voiceNum"/></li>
<li><span style="background-color:#dedede">传真:</span><xsl:value-of select="rpCntInfo/cntPhone/faxNum"/></li>
</ul>
</li></xsl:for-each>
</ol>
</li>
<li><h4 style="background-color:#DEE2E4">地理范围</h4>
<div>
<table border="1" cellspacing="0" cellpadding="4" style="text-align:center" align="center">
<tr>
<td><![CDATA[-]]></td>
<td>北:<xsl:value-of select="//northBL"/></td>
<td><![CDATA[-]]></td>
</tr>
<tr>
<td>西:<xsl:value-of select="//westBL"/></td>
<td><![CDATA[-]]></td>
<td>东:<xsl:value-of select="//eastBL"/></td>
</tr>
<tr>
<td><![CDATA[-]]></td>
<td>南:<xsl:value-of select="//southBL"/></td>
<td><![CDATA[-]]></td>
</tr>
</table>
</div>
</li>
<li><h4 style="background-color:#DEE2E4">项目支持信息</h4>
<p><xsl:value-of select="//Metadata/dataIdInfo/suppInfo"/></p>
</li>
<li><h4 style="background-color:#DEE2E4">相关链接</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>
</li>
<li><h4 style="background-color:#DEE2E4">缩略图</h4></li>
<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,'/',bgFileName)"/>
<img class="figure" align="center">
<xsl:attribute name="src">
<xsl:value-of select="$imgurl" disable-output-escaping="yes"/>
</xsl:attribute>
<xsl:attribute name="alt">
<xsl:value-of select="bgFileDesc"/>
</xsl:attribute>
</img>
</xsl:for-each>
<xsl:if test="//Metadata/dataIdInfo/graphOver[bgFileName!='' and bgFileName!='http://heihe.westgis.ac.cn/water/thumb.jpg']">
<img width="600" height="400" class="figure" align="center"><xsl:attribute name="src">http://test.westgis.ac.cn:8080/geonetwork/srv/cn/graphover.show?id=<xsl:value-of select='$id'/>&amp;fname=<xsl:value-of select='//Metadata/dataIdInfo/graphOver[1]/bgFileName'/>&amp;access=public</xsl:attribute></img>
</xsl:if>
<xsl:if test="//Metadata/dataIdInfo/graphOver[bgFileName='' or bgFileName='http://heihe.westgis.ac.cn/water/thumb.jpg']">
<img class="figure" align="center"><xsl:attribute name="src">http://westdc.westgis.ac.cn/images/nothumb.png</xsl:attribute></img>
</xsl:if>
</div>
</ol>
</xsl:template>
</xsl:stylesheet>