2009-03-06 03:20:46 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
|
|
xmlns:geonet="http://www.fao.org/geonetwork"
|
|
|
|
xmlns:xalan= "http://xml.apache.org/xalan">
|
|
|
|
|
|
|
|
<xsl:output method="html" version="4.0" indent="yes"/>
|
|
|
|
<xsl:variable name="iso" select="/Metadata/dataIdInfo/idCitation/resTitle"/>
|
|
|
|
<xsl:template match="/">
|
|
|
|
<xsl:apply-templates select="Metadata" />
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<xsl:template match="Metadata">
|
|
|
|
<fieldset>
|
|
|
|
<legend><strong>元数据:
|
|
|
|
<xsl:choose>
|
|
|
|
<xsl:when test="($iso != '')">
|
|
|
|
<xsl:value-of select="$iso"/>
|
|
|
|
</xsl:when>
|
|
|
|
<xsl:otherwise>
|
|
|
|
<xsl:text>元数据文档</xsl:text>
|
|
|
|
</xsl:otherwise>
|
|
|
|
</xsl:choose></strong>
|
|
|
|
</legend>
|
|
|
|
<fieldset><legend>元数据实体信息</legend>
|
|
|
|
<ul>
|
|
|
|
<xsl:if test="mdFileID">
|
|
|
|
<ul><li class="name">文件唯一标识符</li><li><xsl:value-of select="mdFileID"/></li></ul>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="mdLang">
|
|
|
|
<ul><li class="name">语言</li><li>
|
|
|
|
<xsl:value-of select="mdLang//@value"/>
|
|
|
|
</li></ul>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="mdChar">
|
|
|
|
<ul><li class="name">编码</li><li>
|
|
|
|
<xsl:value-of select="mdChar//@value"/>
|
|
|
|
</li></ul>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="mdParentID">
|
|
|
|
<ul><li class="name">父级标识符</li><li><xsl:value-of select="mdParentID"/></li></ul>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="mdHrLv">
|
|
|
|
<ul><li class="name">层级</li><li><xsl:value-of select="mdHrLv"/><xsl:value-of select="mdHrLv//@value"/></li></ul>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="mdHrLvName">
|
|
|
|
<ul><li class="name">层级名</li><li><xsl:value-of select="mdHrLvName"/></li></ul>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="mdDateSt">
|
|
|
|
<ul><li class="name">元数据更新时间</li><li><xsl:value-of select="mdDateSt"/></li></ul>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="mdStanName">
|
|
|
|
<ul><li class="name">元数据标准</li><li><xsl:value-of select="mdStanName"/></li></ul>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="mdStanVer">
|
|
|
|
<ul><li class="name">元数据标准版本</li><li><xsl:value-of select="mdStanVer"/></li></ul>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="dataSetURI">
|
|
|
|
<ul><li class="name">数据集地址</li><li><xsl:value-of select="dataSetURI"/></li></ul>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:apply-templates select="mdContact"/>
|
|
|
|
</ul>
|
|
|
|
</fieldset>
|
|
|
|
<xsl:apply-templates select="dataIdInfo"/>
|
|
|
|
<xsl:if test="distInfo">
|
|
|
|
<xsl:apply-templates select="distInfo"/>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="spatRepInfo">
|
|
|
|
<xsl:apply-templates select="spatRepInfo"/>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="refSysInfo">
|
|
|
|
<xsl:apply-templates select="refSysInfo"/>
|
|
|
|
</xsl:if>
|
|
|
|
</fieldset>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="spatRepInfo">
|
|
|
|
<fieldset><legend>空间表示信息</legend>
|
|
|
|
<xsl:apply-templates/>
|
|
|
|
</fieldset>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="refSysInfo">
|
|
|
|
<fieldset><legend>空间参考信息</legend>
|
|
|
|
<xsl:apply-templates/>
|
|
|
|
</fieldset>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="dataIdInfo">
|
|
|
|
<fieldset><legend>标识信息</legend>
|
|
|
|
<xsl:apply-templates select="idCitation"/>
|
|
|
|
|
|
|
|
<div class="item"><span class="name">摘要</span><xsl:value-of select="idAbs" /></div>
|
|
|
|
<xsl:if test="idPurp">
|
|
|
|
<ul><li class="name">目的</li><li><xsl:value-of select="idPurp"/></li></ul>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:for-each select="idCredit">
|
|
|
|
<ul><li class="name">credit</li><li><xsl:value-of select="."/></li></ul>
|
|
|
|
</xsl:for-each>
|
|
|
|
<!-- todo:status -->
|
|
|
|
<xsl:for-each select="idPoC">
|
|
|
|
<xsl:apply-templates select="idPoC" />
|
|
|
|
</xsl:for-each>
|
|
|
|
<xsl:for-each select="resMaint">
|
|
|
|
<xsl:apply-templates select="resMaint" />
|
|
|
|
</xsl:for-each>
|
|
|
|
<xsl:for-each select="graphOver">
|
|
|
|
<xsl:apply-templates select="graphOver" />
|
|
|
|
</xsl:for-each>
|
|
|
|
<xsl:for-each select="dsFormat">
|
|
|
|
<xsl:apply-templates select="dsFormat" />
|
|
|
|
</xsl:for-each>
|
|
|
|
<xsl:if test="descKeys">
|
|
|
|
<xsl:apply-templates select="descKeys" />
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:for-each select="idSpecUse">
|
|
|
|
<xsl:apply-templates select="idSpecUse" />
|
|
|
|
</xsl:for-each>
|
|
|
|
<xsl:for-each select="resConst">
|
|
|
|
<xsl:apply-templates select="idPoC" />
|
|
|
|
</xsl:for-each>
|
|
|
|
<xsl:for-each select="aggrInfo">
|
|
|
|
<xsl:apply-templates select="idPoC" />
|
|
|
|
</xsl:for-each>
|
|
|
|
<!-- todo:DataIdent -->
|
|
|
|
<xsl:for-each select="spatRpType">
|
|
|
|
<xsl:apply-templates select="spatRpType" />
|
|
|
|
</xsl:for-each>
|
|
|
|
<xsl:for-each select="dataScale">
|
|
|
|
<xsl:apply-templates select="dataScale" />
|
|
|
|
</xsl:for-each>
|
|
|
|
<xsl:for-each select="dataChar">
|
|
|
|
<ul><li class="name">编码</li><li><xsl:value-of select=".//@value"/></li></ul>
|
|
|
|
</xsl:for-each>
|
|
|
|
<xsl:for-each select="dataLang">
|
|
|
|
<ul><li class="name">语言</li><li><xsl:value-of select=".//@value"/></li></ul>
|
|
|
|
</xsl:for-each>
|
|
|
|
<xsl:for-each select="tpCat">
|
|
|
|
<xsl:if test="TopicCatCd">
|
|
|
|
<ul><li class="name">类别</li><li><xsl:value-of select=".//@value"/></li></ul>
|
|
|
|
</xsl:if>
|
|
|
|
</xsl:for-each>
|
|
|
|
<xsl:if test="geoBox">
|
|
|
|
<xsl:apply-templates select="geoBox"/>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="dataExt">
|
|
|
|
<xsl:apply-templates select="dataExt"/>
|
|
|
|
</xsl:if>
|
|
|
|
</fieldset>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="distInfo">
|
|
|
|
<fieldset><legend>分发信息</legend>
|
|
|
|
<xsl:apply-templates select="distFormat"/>
|
|
|
|
<xsl:apply-templates select="distributor"/>
|
|
|
|
<xsl:apply-templates select="distTranOps"/>
|
|
|
|
</fieldset>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="distFormat|distorFormat">
|
|
|
|
<fieldset><legend>数据分发格式</legend>
|
|
|
|
<ul><li class="name">分发格式</li><li><xsl:value-of select="formatName"/></li></ul>
|
|
|
|
<ul><li class="name">版本</li><li><xsl:value-of select="formatVer"/></li></ul>
|
|
|
|
<xsl:if test="formatAmdNum">
|
|
|
|
<ul><li class="name">改进版本号</li><li><xsl:value-of select="formatAmdNum"/></li></ul>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="formatSpec">
|
|
|
|
<ul><li class="name">规范</li><li><xsl:value-of select="formatSpec"/></li></ul>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="fileDecmTech">
|
|
|
|
<ul><li class="name">解压缩技术</li><li><xsl:value-of select="fileDecmTech"/></li></ul>
|
|
|
|
</xsl:if>
|
|
|
|
</fieldset>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="distributor">
|
|
|
|
<fieldset><legend>分发者</legend>
|
|
|
|
<xsl:apply-templates select="distorCont"/>
|
|
|
|
<xsl:if test="distorOrdPrc">
|
|
|
|
<xsl:apply-templates select="distorOrdPrc"/>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="distorFormat">
|
|
|
|
<xsl:apply-templates select="distorFormat"/>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="distorTran">
|
|
|
|
<xsl:apply-templates select="distorTran"/>
|
|
|
|
</xsl:if>
|
|
|
|
</fieldset>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="distorTran|distTranOps">
|
|
|
|
<fieldset><legend>数据传输选项</legend>
|
|
|
|
<xsl:if test="unitsODist">
|
|
|
|
<ul><li class="name">unitsOfDistribution</li><li><xsl:value-of select="unitsODist"/></li></ul>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="transSize">
|
|
|
|
<ul><li class="name">文件大小(Mb)</li><li><xsl:value-of select="transSize"/></li></ul>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="onLineSrc">
|
|
|
|
<xsl:apply-templates select="onLineSrc"/>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="offLineMed">
|
|
|
|
<xsl:apply-templates select="offLineMed"/>
|
|
|
|
</xsl:if>
|
|
|
|
</fieldset>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="onLineSrc">
|
|
|
|
<fieldset><legend>在线资源</legend>
|
|
|
|
<ul><li class="name">地址</li><li><xsl:value-of select="linkage"/></li></ul>
|
|
|
|
<xsl:if test="protocol">
|
|
|
|
<ul><li class="name">协议</li><li><xsl:value-of select="protocol"/></li></ul>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="appProfile">
|
|
|
|
<ul><li class="name">可用应用程序</li><li><xsl:value-of select="appProfile"/></li></ul>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="orName">
|
|
|
|
<ul><li class="name">名称</li><li><xsl:value-of select="orName"/></li></ul>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="orDesc">
|
|
|
|
<ul><li class="name">描述</li><li><xsl:value-of select="orDesc"/></li></ul>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="orFunct">
|
|
|
|
<xsl:apply-templates select="orFunct"/>
|
|
|
|
</xsl:if>
|
|
|
|
</fieldset>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="offLineMed">
|
|
|
|
<fieldset><legend>离线资源</legend>
|
|
|
|
<xsl:if test="medName">
|
|
|
|
<xsl:apply-templates select="medName"/>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:for-each select="medDensity">
|
|
|
|
<ul><li class="name">density</li><li><xsl:value-of select="."/></li></ul>
|
|
|
|
</xsl:for-each>
|
|
|
|
<xsl:if test="medDenUnits">
|
|
|
|
<ul><li class="name">density units</li><li><xsl:value-of select="medDenUnits"/></li></ul>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="medVol">
|
|
|
|
<ul><li class="name">数量</li><li><xsl:value-of select="medVol"/></li></ul>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="medFormat">
|
|
|
|
<xsl:apply-templates select="medFormat"/>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="medNote">
|
|
|
|
<ul><li class="name">注释</li><li><xsl:value-of select="medNote"/></li></ul>
|
|
|
|
</xsl:if>
|
|
|
|
</fieldset>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="dataExt">
|
|
|
|
<!-- todo -->
|
|
|
|
<fieldset><legend>数据时空边界</legend>
|
|
|
|
<xsl:apply-templates/>
|
|
|
|
</fieldset>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="geoBox">
|
|
|
|
<fieldset><legend>经纬度范围框</legend>
|
|
|
|
<ul><li class="name">东</li><li><xsl:value-of select="eastBL"/></li></ul>
|
|
|
|
<ul><li class="name">南</li><li><xsl:value-of select="southBL"/></li></ul>
|
|
|
|
<ul><li class="name">西</li><li><xsl:value-of select="westBL"/></li></ul>
|
|
|
|
<ul><li class="name">北</li><li><xsl:value-of select="northBL"/></li></ul>
|
|
|
|
</fieldset>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="descKeys">
|
2009-12-30 02:53:52 +00:00
|
|
|
<fieldset>
|
|
|
|
<xsl:if test="keyTyp"><legend>关键词:<xsl:value-of select=".//@value"/></legend></xsl:if>
|
2009-03-06 03:20:46 +00:00
|
|
|
<xsl:for-each select="keyword">
|
|
|
|
<ul><li class="name">关键词</li><li><xsl:value-of select="."/></li></ul>
|
|
|
|
</xsl:for-each>
|
|
|
|
<!-- 省略了同义词 -->
|
|
|
|
</fieldset>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="idCitation">
|
|
|
|
<fieldset><legend>引用说明</legend>
|
|
|
|
<ul><li class="name">名称</li><li><xsl:value-of select="resTitle"/></li></ul>
|
|
|
|
<xsl:for-each select="resAltTitle">
|
|
|
|
<ul><li class="name">别名</li><li><xsl:value-of select="."/></li></ul>
|
|
|
|
</xsl:for-each>
|
|
|
|
<xsl:apply-templates select="resRefDate" />
|
|
|
|
<xsl:if test="resEd">
|
|
|
|
<ul><li class="name">版本</li><li><xsl:value-of select="resEd"/></li></ul>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="resEdDate">
|
|
|
|
<xsl:apply-templates select="resEdDate" />
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="citId">
|
|
|
|
<xsl:apply-templates select="citId" />
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="citRespParty">
|
|
|
|
<xsl:apply-templates select="citRespParty" />
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:for-each select="presForm">
|
|
|
|
<ul><li class="name">表现形式</li><li><xsl:value-of select=".//@value"/></li></ul>
|
|
|
|
</xsl:for-each>
|
|
|
|
<!-- todo: datasetSeries -->
|
|
|
|
<xsl:if test="otherCitDet">
|
|
|
|
<div class="item"><span class="name">文献引用参考</span><xsl:value-of select="otherCitDet"/></div>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="collTitle">
|
|
|
|
<ul><li>collectivetitle</li><li><xsl:value-of select="collTitle"/></li></ul>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="isbn">
|
|
|
|
<ul><li>ISBN</li><li><xsl:value-of select="isbn"/></li></ul>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="issn">
|
|
|
|
<ul><li>ISSN</li><li><xsl:value-of select="issn"/></li></ul>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="RespParty">
|
|
|
|
<xsl:apply-templates select="RespParty" />
|
|
|
|
</xsl:if>
|
|
|
|
</fieldset>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="resRefDate | resEdDate">
|
|
|
|
<fieldset><legend>日期</legend>
|
|
|
|
<ul><li class="name">时间</li><li><xsl:value-of select="refDate"/></li></ul>
|
|
|
|
<ul><li class="name">类型</li><li><xsl:value-of select="refDateType//@value"/></li></ul>
|
|
|
|
</fieldset>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="citId">
|
|
|
|
<fieldset><legend>标识符</legend>
|
|
|
|
<xsl:if test="identAuth">
|
|
|
|
<xsl:apply-templates select="identAuth" />
|
|
|
|
</xsl:if>
|
|
|
|
<ul><li class="name">代码</li><li><xsl:value-of select="identCode"/></li></ul>
|
|
|
|
<!-- 还需处理RsIdent类 -->
|
|
|
|
<xsl:if test="identCodeSpace">
|
|
|
|
<ul><li class="name">代码空间</li><li><xsl:value-of select="identCodeSpace"/></li></ul>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="identVrsn">
|
|
|
|
<ul><li class="name">版本</li><li><xsl:value-of select="identVrsn"/></li></ul>
|
|
|
|
</xsl:if>
|
|
|
|
</fieldset>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="mdContact | distorCont | citRespParty | identAuth | RespParty | idPoC | distorCont">
|
|
|
|
<fieldset><legend>联系信息</legend>
|
|
|
|
<ul><li class="name">负责人</li><li><xsl:value-of select="rpIndName"/></li></ul>
|
|
|
|
<ul><li class="name">单位名称</li><li><xsl:value-of select="rpOrgName"/></li></ul>
|
|
|
|
<ul><li class="name">职务</li><li><xsl:value-of select="rpPosName"/></li></ul>
|
|
|
|
<ul><li class="name">职责</li><li><xsl:value-of select="role//@value"/></li></ul>
|
|
|
|
<xsl:if test="rpCntInfo">
|
|
|
|
<xsl:if test="rpCntInfo/cntPhone">
|
|
|
|
<xsl:for-each select="rpCntInfo/cntPhone/voiceNum">
|
|
|
|
<ul><li class="name">电话号码</li>
|
|
|
|
<li><xsl:value-of select="." /></li></ul>
|
|
|
|
</xsl:for-each>
|
|
|
|
<xsl:for-each select="rpCntInfo/cntPhone/faxNum">
|
|
|
|
<ul><li class="name">传真号码</li>
|
|
|
|
<li><xsl:value-of select="." /></li></ul>
|
|
|
|
</xsl:for-each>
|
|
|
|
</xsl:if>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="rpCntInfo/cntAddress">
|
|
|
|
<xsl:if test="rpCntInfo/cntAddress/postCode">
|
|
|
|
<ul><li class="name">邮政编码</li><li><xsl:value-of select="rpCntInfo/cntAddress/postCode" /></li></ul>
|
|
|
|
</xsl:if>
|
|
|
|
<ul><li class="name">详细地址</li>
|
|
|
|
<xsl:if test="rpCntInfo/cntAddress/country">
|
|
|
|
<li><xsl:value-of select="rpCntInfo/cntAddress/country" /></li>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="rpCntInfo/cntAddress/adminArea">
|
|
|
|
<li><xsl:value-of select="rpCntInfo/cntAddress/adminArea" /></li>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="rpCntInfo/cntAddress/city">
|
|
|
|
<li><xsl:value-of select="rpCntInfo/cntAddress/city" /></li>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:for-each select="rpCntInfo/cntAddress/delPoint">
|
|
|
|
<li><xsl:value-of select="." /></li>
|
|
|
|
</xsl:for-each></ul>
|
|
|
|
<xsl:for-each select="rpCntInfo/cntAddress/eMailAdd">
|
|
|
|
<ul><li class="name">电子邮件</li><li><xsl:value-of select="." /></li></ul>
|
|
|
|
</xsl:for-each>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="cntHours">
|
|
|
|
<ul><li class="name">服务时间</li><li><xsl:value-of select="cntHours"/></li></ul>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="cntInstr">
|
|
|
|
<ul><li class="name">联系方法</li><li><xsl:value-of select="cntInstr"/></li></ul>
|
|
|
|
</xsl:if>
|
|
|
|
</fieldset>
|
|
|
|
</xsl:template>
|
|
|
|
</xsl:stylesheet>
|