📄 metadata-iso19115.xsl.svn-base
字号:
<?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"> <!-- default: in simple mode just a flat list --> <xsl:template mode="iso19115" match="*|@*"> <xsl:param name="schema"/> <xsl:param name="edit"/> <!-- do not show empty elements in view mode --> <xsl:choose> <xsl:when test="$edit=true()"> <xsl:apply-templates mode="element" select="."> <xsl:with-param name="schema" select="$schema"/> <xsl:with-param name="edit" select="true()"/> <xsl:with-param name="flat" select="$currTab='simple'"/> </xsl:apply-templates> </xsl:when> <xsl:otherwise> <xsl:variable name="empty"> <xsl:apply-templates mode="iso19115IsEmpty" select="."/> </xsl:variable> <xsl:if test="$empty!=''"> <xsl:apply-templates mode="element" select="."> <xsl:with-param name="schema" select="$schema"/> <xsl:with-param name="edit" select="false()"/> <xsl:with-param name="flat" select="$currTab='simple'"/> </xsl:apply-templates> </xsl:if> </xsl:otherwise> </xsl:choose> </xsl:template> <!-- these elements should be boxed --> <xsl:template mode="iso19115" match="mdContact|dataIdInfo|distInfo|graphOver|descKeys|spatRepInfo|idPoC|onLineSrc|dqInfo|refSysInfo|equScale|projection|ellipsoid|dataExt|geoBox|distributor"> <xsl:param name="schema"/> <xsl:param name="edit"/> <xsl:apply-templates mode="complexElement" select="."> <xsl:with-param name="schema" select="$schema"/> <xsl:with-param name="edit" select="$edit"/> </xsl:apply-templates> </xsl:template> <!-- Metadata --> <xsl:template mode="iso19115" match="Metadata"> <xsl:param name="schema"/> <xsl:param name="edit"/> <xsl:choose> <!-- metadata tab --> <xsl:when test="$currTab='metadata'"> <xsl:call-template name="iso19115Metadata"> <xsl:with-param name="schema" select="$schema"/> <xsl:with-param name="edit" select="$edit"/> </xsl:call-template> </xsl:when> <!-- identification tab --> <xsl:when test="$currTab='identification'"> <xsl:call-template name="iso19115Identification"> <xsl:with-param name="schema" select="$schema"/> <xsl:with-param name="edit" select="$edit"/> </xsl:call-template> </xsl:when> <!-- maintenance tab --> <xsl:when test="$currTab='maintenance'"> <xsl:apply-templates mode="elementEP" select="dataIdInfo/resMaint|dataIdInfo/geonet:child[string(@name)='resMaint']"> <xsl:with-param name="schema" select="$schema"/> <xsl:with-param name="edit" select="$edit"/> </xsl:apply-templates> </xsl:when> <!-- constraints tab --> <xsl:when test="$currTab='constraints'"> <xsl:apply-templates mode="elementEP" select="dataIdInfo/resConst|dataIdInfo/geonet:child[string(@name)='resConst']"> <xsl:with-param name="schema" select="$schema"/> <xsl:with-param name="edit" select="$edit"/> </xsl:apply-templates> </xsl:when> <!-- spatial tab --> <xsl:when test="$currTab='spatial'"> <xsl:call-template name="iso19115Spatial"> <xsl:with-param name="schema" select="$schema"/> <xsl:with-param name="edit" select="$edit"/> </xsl:call-template> </xsl:when> <!-- spatial2 tab --> <xsl:when test="$currTab='spatial2'"> <xsl:apply-templates mode="elementEP" select="spatRepInfo|geonet:child[string(@name)='spatRepInfo']"> <xsl:with-param name="schema" select="$schema"/> <xsl:with-param name="edit" select="$edit"/> </xsl:apply-templates> </xsl:when> <!-- refSys tab --> <xsl:when test="$currTab='refSys'"> <xsl:apply-templates mode="elementEP" select="refSysInfo|geonet:child[string(@name)='refSysInfo']"> <xsl:with-param name="schema" select="$schema"/> <xsl:with-param name="edit" select="$edit"/> </xsl:apply-templates> </xsl:when> <!-- distribution tab --> <xsl:when test="$currTab='distribution'"> <xsl:apply-templates mode="elementEP" select="distInfo|geonet:child[string(@name)='distInfo']"> <xsl:with-param name="schema" select="$schema"/> <xsl:with-param name="edit" select="$edit"/> </xsl:apply-templates> </xsl:when> <!-- dataQuality tab --> <xsl:when test="$currTab='dataQuality'"> <xsl:apply-templates mode="elementEP" select="dqInfo|geonet:child[string(@name)='dqInfo']"> <xsl:with-param name="schema" select="$schema"/> <xsl:with-param name="edit" select="$edit"/> </xsl:apply-templates> </xsl:when> <!-- appSchInfo tab --> <xsl:when test="$currTab='appSchInfo'"> <xsl:apply-templates mode="elementEP" select="appSchInfo|geonet:child[string(@name)='appSchInfo']"> <xsl:with-param name="schema" select="$schema"/> <xsl:with-param name="edit" select="$edit"/> </xsl:apply-templates> </xsl:when> <!-- porCatInfo tab --> <xsl:when test="$currTab='porCatInfo'"> <xsl:apply-templates mode="elementEP" select="porCatInfo|geonet:child[string(@name)='porCatInfo']"> <xsl:with-param name="schema" select="$schema"/> <xsl:with-param name="edit" select="$edit"/> </xsl:apply-templates> </xsl:when> <!-- default --> <xsl:otherwise> <xsl:call-template name="iso19115Simple"> <xsl:with-param name="schema" select="$schema"/> <xsl:with-param name="edit" select="$edit"/> <xsl:with-param name="flat" select="$currTab='simple'"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:template> <!-- simple mode; ISO order is: - mdFileID - mdLang - mdChar - mdParentID - mdHrLv - mdHrLvName - mdContact - mdDateSt - mdStanName - mdStanVer - distInfo - dataIdInfo - appSchInfo - porCatInfo - mdMaint - mdConst - dqInfo - spatRepInfo - refSysInfo - contInfo - mdExtInfo --> <xsl:template name="iso19115Simple"> <xsl:param name="schema"/> <xsl:param name="edit"/> <xsl:param name="flat"/> <xsl:apply-templates mode="elementEP" select="dataIdInfo|geonet:child[string(@name)='dataIdInfo']"> <xsl:with-param name="schema" select="$schema"/> <xsl:with-param name="edit" select="$edit"/> <xsl:with-param name="flat" select="$flat"/> </xsl:apply-templates> <xsl:apply-templates mode="elementEP" select="distInfo|geonet:child[string(@name)='distInfo']"> <xsl:with-param name="schema" select="$schema"/> <xsl:with-param name="edit" select="$edit"/> <xsl:with-param name="flat" select="$flat"/> </xsl:apply-templates> <xsl:apply-templates mode="elementEP" select="spatRepInfo|geonet:child[string(@name)='spatRepInfo']"> <xsl:with-param name="schema" select="$schema"/> <xsl:with-param name="edit" select="$edit"/> <xsl:with-param name="flat" select="$flat"/> </xsl:apply-templates> <xsl:apply-templates mode="elementEP" select="refSysInfo|geonet:child[string(@name)='refSysInfo']"> <xsl:with-param name="schema" select="$schema"/> <xsl:with-param name="edit" select="$edit"/> <xsl:with-param name="flat" select="$flat"/> </xsl:apply-templates> <xsl:apply-templates mode="elementEP" select="appSchInfo|geonet:child[string(@name)='appSchInfo']"> <xsl:with-param name="schema" select="$schema"/> <xsl:with-param name="edit" select="$edit"/> <xsl:with-param name="flat" select="$flat"/> </xsl:apply-templates> <xsl:apply-templates mode="elementEP" select="porCatInfo|geonet:child[string(@name)='porCatInfo']"> <xsl:with-param name="schema" select="$schema"/> <xsl:with-param name="edit" select="$edit"/> <xsl:with-param name="flat" select="$flat"/> </xsl:apply-templates> <xsl:apply-templates mode="elementEP" select="dqInfo|geonet:child[string(@name)='dqInfo']"> <xsl:with-param name="schema" select="$schema"/> <xsl:with-param name="edit" select="$edit"/> <xsl:with-param name="flat" select="$flat"/> </xsl:apply-templates> <xsl:call-template name="complexElementGui"> <xsl:with-param name="title" select="/root/gui/strings/metadata"/> <xsl:with-param name="content"> <xsl:call-template name="iso19115Simple2"> <xsl:with-param name="schema" select="$schema"/> <xsl:with-param name="edit" select="$edit"/> <xsl:with-param name="flat" select="$flat"/> </xsl:call-template> </xsl:with-param> <xsl:with-param name="schema" select="$schema"/> </xsl:call-template> <xsl:apply-templates mode="elementEP" select="contInfo|geonet:child[string(@name)='contInfo']"> <xsl:with-param name="schema" select="$schema"/> <xsl:with-param name="edit" select="$edit"/> <xsl:with-param name="flat" select="$flat"/> </xsl:apply-templates> <xsl:apply-templates mode="elementEP" select="mdExtInfo|geonet:child[string(@name)='mdExtInfo']"> <xsl:with-param name="schema" select="$schema"/> <xsl:with-param name="edit" select="$edit"/> <xsl:with-param name="flat" select="$flat"/> </xsl:apply-templates> </xsl:template> <xsl:template name="iso19115Simple2"> <xsl:param name="schema"/> <xsl:param name="edit"/> <xsl:param name="flat"/> <xsl:apply-templates mode="elementEP" select="mdFileID|geonet:child[string(@name)='mdFileID']"> <xsl:with-param name="schema" select="$schema"/> <xsl:with-param name="edit" select="$edit"/> <xsl:with-param name="flat" select="$flat"/> </xsl:apply-templates> <xsl:apply-templates mode="elementEP" select="mdLang|geonet:child[string(@name)='mdLang']"> <xsl:with-param name="schema" select="$schema"/> <xsl:with-param name="edit" select="$edit"/> <xsl:with-param name="flat" select="$flat"/> </xsl:apply-templates> <xsl:apply-templates mode="elementEP" select="mdChar|geonet:child[string(@name)='mdChar']"> <xsl:with-param name="schema" select="$schema"/> <xsl:with-param name="edit" select="$edit"/> <xsl:with-param name="flat" select="$flat"/> </xsl:apply-templates> <xsl:apply-templates mode="elementEP" select="mdParentID|geonet:child[string(@name)='mdParentID']"> <xsl:with-param name="schema" select="$schema"/> <xsl:with-param name="edit" select="$edit"/> <xsl:with-param name="flat" select="$flat"/> </xsl:apply-templates> <xsl:apply-templates mode="elementEP" select="mdHrLv|geonet:child[string(@name)='mdHrLv']"> <xsl:with-param name="schema" select="$schema"/> <xsl:with-param name="edit" select="$edit"/> <xsl:with-param name="flat" select="$flat"/> </xsl:apply-templates> <xsl:apply-templates mode="elementEP" select="mdHrLvName|geonet:child[string(@name)='mdHrLvName']"> <xsl:with-param name="schema" select="$schema"/> <xsl:with-param name="edit" select="$edit"/> <xsl:with-param name="flat" select="$flat"/> </xsl:apply-templates> <xsl:apply-templates mode="elementEP" select="mdDateSt|geonet:child[string(@name)='mdDateSt']"> <xsl:with-param name="schema" select="$schema"/> <xsl:with-param name="edit" select="$edit"/> <xsl:with-param name="flat" select="$flat"/> </xsl:apply-templates> <xsl:apply-templates mode="elementEP" select="mdStanName|geonet:child[string(@name)='mdStanName']"> <xsl:with-param name="schema" select="$schema"/> <xsl:with-param name="edit" select="$edit"/> <xsl:with-param name="flat" select="$flat"/> </xsl:apply-templates> <xsl:apply-templates mode="elementEP" select="mdStanVer|geonet:child[string(@name)='mdStanVer']"> <xsl:with-param name="schema" select="$schema"/> <xsl:with-param name="edit" select="$edit"/> <xsl:with-param name="flat" select="$flat"/> </xsl:apply-templates> <xsl:apply-templates mode="elementEP" select="mdConst|geonet:child[string(@name)='mdConst']"> <xsl:with-param name="schema" select="$schema"/> <xsl:with-param name="edit" select="$edit"/> <xsl:with-param name="flat" select="$flat"/> </xsl:apply-templates> <xsl:apply-templates mode="elementEP" select="mdMaint|geonet:child[string(@name)='mdMaint']"> <xsl:with-param name="schema" select="$schema"/> <xsl:with-param name="edit" select="$edit"/> <xsl:with-param name="flat" select="$flat"/> </xsl:apply-templates> <xsl:apply-templates mode="elementEP" select="mdContact|geonet:child[string(@name)='mdContact']"> <xsl:with-param name="schema" select="$schema"/> <xsl:with-param name="edit" select="$edit"/> <xsl:with-param name="flat" select="$flat"/> </xsl:apply-templates> </xsl:template> <xsl:template name="iso19115Metadata"> <xsl:param name="schema"/> <xsl:param name="edit"/> <xsl:apply-templates mode="elementEP" select="mdFileID|geonet:child[string(@name)='mdFileID']"> <xsl:with-param name="schema" select="$schema"/> <xsl:with-param name="edit" select="$edit"/> </xsl:apply-templates> <xsl:apply-templates mode="elementEP" select="mdLang|geonet:child[string(@name)='mdLang']"> <xsl:with-param name="schema" select="$schema"/> <xsl:with-param name="edit" select="$edit"/> </xsl:apply-templates> <xsl:apply-templates mode="elementEP" select="mdChar|geonet:child[string(@name)='mdChar']"> <xsl:with-param name="schema" select="$schema"/>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -