westdc-zf1/data/iso.html.xsl

396 lines
13 KiB
XML
Raw Normal View History

2009-03-06 03:20:46 +00:00
<?xml version='1.0' encoding='utf-8'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html"/>
<xsl:strip-space elements="*"/>
<xsl:template match="/">
<xsl:variable name="fgdc" select="/Metadata/idinfo/citation/citeinfo/title"/>
<xsl:variable name="iso" select="/Metadata/dataIdInfo/idCitation/resTitle"/>
<div class="bodyText">
<h1 class="toolbarTitle">
<xsl:choose>
<xsl:when test="($iso != '')">
<xsl:value-of select="$iso"/>
</xsl:when>
<xsl:otherwise>
<xsl:text>元数据文档</xsl:text>
</xsl:otherwise>
</xsl:choose>
</h1>
<xsl:if test="/Metadata/dataIdInfo">
<dl>
<xsl:apply-templates select="/Metadata/mdFileID"/>
</dl>
<dl>
<xsl:apply-templates select="/Metadata/mdLang"/>
</dl>
<dl>
<xsl:apply-templates select="/Metadata/mdChar"/>
</dl>
<dl>
<xsl:apply-templates select="/Metadata/mdParentID"/>
</dl>
<dl>
<xsl:apply-templates select="/Metadata/mdHrLv"/>
</dl>
<dl>
<xsl:apply-templates select="/Metadata/mdHrLvName"/>
</dl>
<dl>
<xsl:apply-templates select="/Metadata/mdContact"/>
</dl>
<dl>
<xsl:apply-templates select="/Metadata/mdDateSt"/>
</dl>
<dl>
<xsl:apply-templates select="/Metadata/mdStanName"/>
</dl>
<dl>
<xsl:apply-templates select="/Metadata/mdStanVer"/>
</dl>
<dl>
<xsl:apply-templates select="/Metadata/distInfo"/>
</dl>
<dl>
<xsl:apply-templates select="/Metadata/dataIdInfo"/>
</dl>
<dl>
<xsl:apply-templates select="/Metadata/appSchInfo"/>
</dl>
<dl>
<xsl:apply-templates select="/Metadata/porCatInfo"/>
</dl>
<dl>
<xsl:apply-templates select="/Metadata/mdMaint"/>
</dl>
<dl>
<xsl:apply-templates select="/Metadata/mdConst"/>
</dl>
<dl>
<xsl:apply-templates select="/Metadata/dqInfo"/>
</dl>
<dl>
<xsl:apply-templates select="/Metadata/spatRepInfo"/>
</dl>
<dl>
<xsl:apply-templates select="/Metadata/refSysInfo"/>
</dl>
<dl>
<xsl:apply-templates select="/Metadata/contInfo"/>
</dl>
<dl>
<xsl:apply-templates select="/Metadata/mdExtInfo"/>
</dl>
</xsl:if>
<xsl:for-each select="/Metadata/*">
<xsl:variable select="position()" name="number"/>
<xsl:if test="local-name() != 'Binary' and local-name() != 'Esri' and local-name() != 'idinfo' and local-name() != 'dataqual' and local-name() != 'spdoinfo' and local-name() != 'spref' and local-name() != 'eainfo' and local-name() != 'distinfo' and local-name() != 'metainfo' and local-name() != 'mdFileID' and local-name() != 'mdLang' and local-name() != 'mdChar' and local-name() != 'mdParentID' and local-name() != 'mdHrLv' and local-name() != 'mdHrLvName' and local-name() != 'mdContact' and local-name() != 'mdDateSt' and local-name() != 'mdStanName' and local-name() != 'mdStanVer' and local-name() != 'distInfo' and local-name() != 'dataIdInfo' and local-name() != 'appSchInfo' and local-name() != 'porCatInfo' and local-name() != 'mdMaint' and local-name() != 'mdConst' and local-name() != 'dqInfo' and local-name() != 'spatRepInfo' and local-name() != 'refSysInfo' and local-name() != 'contInfo' and local-name() != 'mdExtInfo'">
<xsl:apply-templates select="." mode="other">
<xsl:with-param select="$number - 1" name="number"/>
</xsl:apply-templates>
</xsl:if>
</xsl:for-each>
</div>
</xsl:template>
<xsl:template match="*">
<xsl:choose>
<xsl:when test="@value">
<em>
<xsl:value-of select="westdc:get_text(local-name())"/>
</em>
<xsl:value-of select="@value"/>
</xsl:when>
<xsl:when test="./*[@value]">
<dt>
<em>
<xsl:value-of select="westdc:get_text(local-name())"/>
</em>
<xsl:apply-templates select="*"/>
</dt>
</xsl:when>
<xsl:when test="*">
<dt>
<em>
<xsl:value-of select="westdc:get_text(local-name())"/>
</em>
</dt>
<dl>
<xsl:apply-templates select="*"/>
</dl>
</xsl:when>
<xsl:otherwise>
<xsl:if test="text() != ''">
<dt>
<em>
<xsl:value-of select="westdc:get_text(local-name())"/>
</em>
<xsl:apply-templates select="text()"/>
</dt>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template mode="other" match="*">
<xsl:param name="number"/>
<xsl:if test="$number = 0">
<hr/>
<h3 class="headTitle">
<xsl:text>Other markup</xsl:text>
</h3>
</xsl:if>
<xsl:choose>
<xsl:when test="*">
<dl>
<dt>
<em>
<xsl:value-of select="local-name()"/>
<xsl:text>:</xsl:text>
</em>
</dt>
<xsl:apply-templates mode="other">
<xsl:with-param select="$number+1" name="number"/>
</xsl:apply-templates>
</dl>
</xsl:when>
<xsl:otherwise>
<xsl:if test="text() != ''">
<dt>
<em>
<xsl:value-of select="local-name()"/>
<xsl:text>:</xsl:text>
</em>
<xsl:value-of select="text()"/>
</dt>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- filtered out -->
<xsl:template match="PubSourceCd | ContentDevTypeCd">
</xsl:template>
<xsl:template match="text()">
<xsl:value-of select="."/>
</xsl:template>
<xsl:template match="onlink">
<xsl:if test="text() != ''">
<dt>
<em>
<xsl:value-of select="."/>
</em>
<xsl:element name="a">
<xsl:attribute name="href">
<xsl:value-of select="."/>
</xsl:attribute>
<xsl:value-of select="."/>
</xsl:element>
</dt>
</xsl:if>
</xsl:template>
<xsl:template match="orDesc">
<dt>
<em>
<xsl:value-of select="."/>
</em>
<xsl:value-of select="."/>
</dt>
</xsl:template>
<xsl:template match="linkage">
<xsl:if test="text() != ''">
<dt>
<em>
<xsl:value-of select="."/>
</em>
<xsl:element name="a">
<xsl:attribute name="href">
<xsl:value-of select="."/>
</xsl:attribute>
<xsl:value-of select="."/>
</xsl:element>
</dt>
</xsl:if>
</xsl:template>
<xsl:template match="tranParaAv">
<dt>
<em>
<xsl:value-of select="."/>
</em>
<xsl:value-of select="."/>
</dt>
</xsl:template>
<xsl:template match="chkPtAv">
<dt>
<em>
<xsl:value-of select="."/>
</em>
<xsl:value-of select="."/>
</dt>
</xsl:template>
<xsl:template match="ctrlPtAv">
<dt>
<em>
<xsl:value-of select="."/>
</em>
<xsl:value-of select="."/>
</dt>
</xsl:template>
<xsl:template match="orieParaAv">
<dt>
<em>
<xsl:value-of select="westdc:get_text(local-name())"/>
</em>
<xsl:value-of select="westdc:get_orieParaAv(text())"/>
</dt>
</xsl:template>
<xsl:template match="incWithDS">
<dt>
<em>
<xsl:value-of select="westdc:get_text(local-name())"/>
</em>
<xsl:value-of select="westdc:get_incWithDS(text())"/>
</dt>
</xsl:template>
<xsl:template match="compCode">
<dt>
<em>
<xsl:value-of select="westdc:get_text(local-name())"/>
</em>
<xsl:value-of select="westdc:get_compCode(text())"/>
</dt>
</xsl:template>
<xsl:template match="trianInd">
<dt>
<em>
<xsl:value-of select="westdc:get_text(local-name())"/>
</em>
<xsl:value-of select="westdc:get_trianInd(text())"/>
</dt>
</xsl:template>
<xsl:template match="radCalDatAv">
<dt>
<em>
<xsl:value-of select="westdc:get_text(local-name())"/>
</em>
<xsl:value-of select="westdc:get_radCalDatAv(text())"/>
</dt>
</xsl:template>
<xsl:template match="camCalInAv">
<dt>
<em>
<xsl:value-of select="westdc:get_text(local-name())"/>
</em>
<xsl:value-of select="westdc:get_camCalInAv(text())"/>
</dt>
</xsl:template>
<xsl:template match="filmDistInAv">
<dt>
<em>
<xsl:value-of select="westdc:get_text(local-name())"/>
</em>
<xsl:value-of select="westdc:get_filmDistInAv(text())"/>
</dt>
</xsl:template>
<xsl:template match="lensDistInAv">
<dt>
<em>
<xsl:value-of select="westdc:get_text(local-name())"/>
</em>
<xsl:value-of select="westdc:get_lensDistInAv(text())"/>
</dt>
</xsl:template>
<xsl:template match="conPass">
<dt>
<em>
<xsl:value-of select="westdc:get_text(local-name())"/>
</em>
<xsl:value-of select="westdc:get_conPass(text())"/>
</dt>
</xsl:template>
<xsl:template match="exTypeCode">
<dt>
<em>
<xsl:value-of select="westdc:get_text(local-name())"/>
</em>
<xsl:value-of select="westdc:get_exTypeCode(text())"/>
</dt>
</xsl:template>
<xsl:template match="languageCode">
<xsl:value-of select="westdc:get_languageCode(@value)"/>
</xsl:template>
<xsl:template match="CharSetCd">
<xsl:value-of select="westdc:get_CharSetCd(@value)"/>
</xsl:template>
<xsl:template match="ScopeCd">
<xsl:value-of select="westdc:get_ScopeCd(@value)"/>
</xsl:template>
<xsl:template match="MaintFreqCd">
<xsl:value-of select="westdc:get_MaintFreqCd(@value)"/>
</xsl:template>
<xsl:template match="ClasscationCd">
<xsl:value-of select="westdc:get_ClasscationCd(@value)"/>
</xsl:template>
<xsl:template match="RestrictCd">
<xsl:value-of select="westdc:get_RestrictCd(@value)"/>
</xsl:template>
<xsl:template match="TopicCatCd">
<xsl:value-of select="westdc:get_TopicCatCd(@value)"/>
</xsl:template>
<xsl:template match="ProgCd">
<xsl:value-of select="westdc:get_ProgCd(@value)"/>
</xsl:template>
<xsl:template match="SpatRepTypCd">
<xsl:value-of select="westdc:get_SpatRepTypCd(@value)"/>
</xsl:template>
<xsl:template match="KeyTypCd">
<xsl:value-of select="westdc:get_KeyTypCd(@value)"/>
</xsl:template>
<xsl:template match="EvalMethTypeCd">
<xsl:value-of select="westdc:get_EvalMethTypeCd(@value)"/>
</xsl:template>
<xsl:template match="MedNameCd">
<xsl:value-of select="westdc:get_MedNameCd(@value)"/>
</xsl:template>
<xsl:template match="MedFormCd">
<xsl:value-of select="westdc:get_MedFormCd(@value)"/>
</xsl:template>
<xsl:template match="ObCd">
<xsl:value-of select="westdc:get_ObCd(@value)"/>
</xsl:template>
<xsl:template match="DatatypeCd">
<xsl:value-of select="westdc:get_DatatypeCd(@value)"/>
</xsl:template>
<xsl:template match="PresFormCd">
<xsl:value-of select="westdc:get_PresFormCd(@value)"/>
</xsl:template>
<xsl:template match="DateTypCd">
<xsl:value-of select="westdc:get_DateTypCd(@value)"/>
</xsl:template>
<xsl:template match="RoleCd">
<xsl:value-of select="westdc:get_RoleCd(@value)"/>
</xsl:template>
<xsl:template match="OnFunctCd">
<xsl:value-of select="westdc:get_OnFunctCd(@value)"/>
</xsl:template>
<xsl:template match="ContentTypCd">
<xsl:value-of select="westdc:get_ContentTypCd(@value)"/>
</xsl:template>
<xsl:template match="ImgCondCd">
<xsl:value-of select="westdc:get_ImgCondCd(@value)"/>
</xsl:template>
<xsl:template match="CellGeoCd">
<xsl:value-of select="westdc:get_CellGeoCd(@value)"/>
</xsl:template>
<xsl:template match="DimNameTypCd">
<xsl:value-of select="westdc:get_DimNameTypCd(@value)"/>
</xsl:template>
<xsl:template match="GeoObjTypCd">
<xsl:value-of select="westdc:get_GeoObjTypCd(@value)"/>
</xsl:template>
<xsl:template match="PixOrientCd">
<xsl:value-of select="westdc:get_PixOrientCd(@value)"/>
</xsl:template>
<xsl:template match="TopoLevCd">
<xsl:value-of select="westdc:get_TopoLevCd(@value)"/>
</xsl:template>
<xsl:template match="/Metadata/Binary"/>
</xsl:stylesheet>