📄 metadata-iso19139.xsl.svn-base
字号:
</xsl:if> <xsl:for-each select="/root/gui/strings/protocolChoice[@value]"> <option> <xsl:if test="string(@value)=$value"> <xsl:attribute name="selected"/> </xsl:if> <xsl:attribute name="value"><xsl:value-of select="string(@value)"/></xsl:attribute> <xsl:value-of select="string(.)"/> </option> </xsl:for-each> </select> </xsl:with-param> </xsl:apply-templates> </xsl:when> <xsl:otherwise> <xsl:apply-templates mode="element" select="."> <xsl:with-param name="schema" select="$schema"/> <xsl:with-param name="edit" select="false()"/> </xsl:apply-templates> </xsl:otherwise> </xsl:choose> </xsl:template> <!-- FIXME graphOver --> <xsl:template mode="iso19139" match="graphOver"> <xsl:param name="schema"/> <xsl:param name="edit"/> <xsl:if test="$edit=true() and $currTab!='simple'"> <xsl:apply-templates mode="iso19139EditGraphOver" select="."> <xsl:with-param name="schema" select="$schema"/> </xsl:apply-templates> </xsl:if> </xsl:template> <!-- FIXME --> <xsl:template mode="iso19139EditGraphOver" match="*"> <xsl:param name="schema"/> <xsl:apply-templates mode="complexElement" select="."> <xsl:with-param name="schema" select="$schema"/> <xsl:with-param name="edit" select="true()"/> <xsl:with-param name="content"> <xsl:choose> <xsl:when test="(string(bgFileDesc)='thumbnail' or string(bgFileDesc)='large_thumbnail') and string(bgFileName)!=''"> <xsl:apply-templates mode="iso19139FileRemove" select="bgFileName"/> </xsl:when> <xsl:when test="string(bgFileDesc)='thumbnail' or string(bgFileDesc)='large_thumbnail'"> <xsl:apply-templates mode="iso19139FileUpload" select="bgFileName"/> </xsl:when> <xsl:otherwise> <xsl:apply-templates mode="elementEP" select="bgFileName|geonet:child[string(@name)='bgFileName']"> <xsl:with-param name="schema" select="$schema"/> <xsl:with-param name="edit" select="true()"/> </xsl:apply-templates> </xsl:otherwise> </xsl:choose> <xsl:apply-templates mode="elementEP" select="bgFileDesc|geonet:child[string(@name)='bgFileDesc']"> <xsl:with-param name="schema" select="$schema"/> <xsl:with-param name="edit" select="true()"/> </xsl:apply-templates> <xsl:apply-templates mode="elementEP" select="bgFileType|geonet:child[string(@name)='bgFileType']"> <xsl:with-param name="schema" select="$schema"/> <xsl:with-param name="edit" select="true()"/> </xsl:apply-templates> </xsl:with-param> </xsl:apply-templates> </xsl:template> <!-- FIXME bgFileDesc --> <xsl:template mode="iso19139" match="bgFileDesc"> <xsl:param name="schema"/> <xsl:param name="edit"/> <xsl:choose> <xsl:when test="$edit=true()"> <xsl:apply-templates mode="simpleElement" select="."> <xsl:with-param name="schema" select="$schema"/> <xsl:with-param name="text"> <xsl:variable name="value" select="string(.)"/> <select name="_{geonet:element/@ref}" size="1"> <xsl:if test="string(.)=''"> <option value=""/> </xsl:if> <xsl:for-each select="/root/gui/strings/bgFileDescChoice[@value]"> <option value="{string(@value)}"> <xsl:if test="string(@value)=$value"> <xsl:attribute name="selected"/> </xsl:if> <xsl:value-of select="string(.)"/> </option> </xsl:for-each> </select> </xsl:with-param> </xsl:apply-templates> </xsl:when> <xsl:otherwise> <xsl:apply-templates mode="element" select="."> <xsl:with-param name="schema" select="$schema"/> <xsl:with-param name="edit" select="false()"/> </xsl:apply-templates> </xsl:otherwise> </xsl:choose> </xsl:template> <!-- file upload/download utilities --> <xsl:template mode="iso19139FileUpload" match="*"> <xsl:param name="access" select="'public'"/> <xsl:call-template name="simpleElementGui"> <xsl:with-param name="title" select="/root/gui/strings/file"/> <xsl:with-param name="text"> <table width="100%"><tr> <xsl:variable name="ref" select="geonet:element/@ref"/> <td width="70%"><input type="file" class="content" name="f_{$ref}" value="{string(.)}"/> </td> <td align="right"><button class="content" onclick="javascript:doFileUploadAction('{/root/gui/locService}/resources.upload','{$ref}',document.mainForm.f_{$ref}.value,'{$access}')"><xsl:value-of select="/root/gui/strings/upload"/></button></td> </tr></table> </xsl:with-param> <xsl:with-param name="schema"/> </xsl:call-template> </xsl:template> <xsl:template mode="iso19139FileRemove" match="*"> <xsl:param name="access" select="'public'"/> <xsl:call-template name="simpleElementGui"> <xsl:with-param name="title" select="/root/gui/strings/file"/> <xsl:with-param name="text"> <table width="100%"><tr> <xsl:variable name="ref" select="geonet:element/@ref"/> <td width="70%"><xsl:value-of select="string(.)"/></td> <td align="right"><button class="content" onclick="javascript:doFileRemoveAction('{/root/gui/locService}/resources.del','{$ref}','{$access}')"><xsl:value-of select="/root/gui/strings/remove"/></button></td> </tr></table> </xsl:with-param> <xsl:with-param name="schema"/> </xsl:call-template> </xsl:template> <!-- ============================================================================= --> <!-- === iso19139 brief formatting === --> <!-- ============================================================================= --> <xsl:template name="iso19139Brief"> <metadata> <xsl:variable name="id" select="geonet:info/id"/> <xsl:if test="gmd:has/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:title"> <title><xsl:value-of select="gmd:has/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:title"/></title> </xsl:if> <xsl:if test="gmd:has/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:abstract"> <abstract><xsl:value-of select="gmd:has/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:abstract"/></abstract> </xsl:if> <xsl:for-each select="gmd:has/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:descriptiveKeywords/gmd:MD_Keywords/gmd:keyword/gco:CharacterString[text()]"> <keyword><xsl:value-of select="."/></keyword> </xsl:for-each> <xsl:if test="gmd:has/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox"> <geoBox> <westBL><xsl:value-of select="gmd:has/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:westBoundLongitude"/></westBL> <eastBL><xsl:value-of select="gmd:has/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:eastBoundLongitude"/></eastBL> <southBL><xsl:value-of select="gmd:has/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:southBoundLatitude"/></southBL> <northBL><xsl:value-of select="gmd:has/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:northBoundLatitude"/></northBL> </geoBox> </xsl:if> <xsl:for-each select="gmd:has/gmd:MD_Metadata/gmd:distributionInfo/gmd:MD_Distribution/gmd:transferOptions/gmd:MD_DigitalTransferOptions/gmd:onLine/gmd:CI_OnlineResource"> <xsl:variable name="protocol" select="gmd:protocol/gco:CharacterString"/> <xsl:variable name="linkage" select="gmd:linkage/gmd:URL"/> <xsl:variable name="name" select="gmd:name/gco:CharacterString"/> <xsl:choose> <xsl:when test="starts-with($protocol,'WWW:DOWNLOAD-') and contains($protocol,'http--download') and $name"> <link type="download"><xsl:value-of select="$linkage"/></link> </xsl:when> <xsl:when test="starts-with($protocol,'ESRI:AIMS-') and contains($protocol,'-get-image') and $name"> <link type="arcims"> <xsl:value-of select="concat('javascript:popInterMap("',/root/gui/url,'/intermap/srv/',/root/gui/language,'/map.addServicesExt?url=',$linkage,'&service=',$name,'&type=1")')"/> </link> </xsl:when> <xsl:when test="starts-with($protocol,'OGC:WMS-') and contains($protocol,'-get-map') and $name"> <link type="wms"> <xsl:value-of select="concat('javascript:popInterMap("',/root/gui/url,'/intermap/srv/',/root/gui/language,'/map.addServicesExt?url=',$linkage,'&service=',$name,'&type=2")')"/> </link> </xsl:when> <xsl:when test="starts-with($protocol,'OGC:WMS-') and contains($protocol,'-get-capabilities') and $name"> <link type="wms"> <xsl:value-of select="concat('javascript:popInterMap("',/root/gui/url,'/intermap/srv/',/root/gui/language,'/map.addServicesExt?url=',$linkage,'&type=2")')"/> </link> </xsl:when> <xsl:when test="string($linkage)!=''"> <link type="url"><xsl:value-of select="$linkage"/></link> </xsl:when> </xsl:choose> </xsl:for-each> <xsl:if test="not(geonet:info/server)"> <xsl:variable name="siteId" select="string(/root/gui/env/siteId)"/> <xsl:variable name="source" select="string(geonet:info/source)"/> <xsl:variable name="uuid" select="string(geonet:info/uuid)"/> <xsl:for-each select="gmd:has/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:graphicOverview/gmd:MD_BrowseGraphic"> <xsl:variable name="fileName" select="gmd:fileName/gco:CharacterString"/> <xsl:variable name="fileDescription" select="gmd:fileDescription/gco:CharacterString"/> <xsl:choose> <xsl:when test="string($fileDescription)='thumbnail' and string($fileName)!=''"> <xsl:choose> <xsl:when test="$source=$siteId"> <image type="thumbnail"><xsl:value-of select="concat(/root/gui/locService,'/resources.get?id=',$id,'&fname=',$fileName,'&access=public')"/></image> </xsl:when> <xsl:when test="/root/gui/sources/source[string(code)=$source]"> <image type="thumbnail"><xsl:value-of select="concat(/root/gui/sources/source[string(code)=$source]/baseURL,'/srv/en/resources.get2?uuid=',$uuid,'&fname=',$fileName,'&access=public')"/></image> </xsl:when> </xsl:choose> </xsl:when> <xsl:when test="string($fileDescription)='large_thumbnail' and string($fileName)!=''"> <xsl:if test="$source=$siteId"> <image type="overview"><xsl:value-of select="concat(/root/gui/locService,'/graphover.show?id=',$id,'&fname=',$fileName,'&access=public')"/></image> </xsl:if> </xsl:when> </xsl:choose> </xsl:for-each> </xsl:if> <xsl:copy-of select="geonet:info"/> </metadata> </xsl:template> <!-- ============================================================================= --> <!-- iso19139 complete tab template --> <xsl:template name="iso19139CompleteTab"> <xsl:param name="tabLink"/> <xsl:call-template name="displayTab"> <xsl:with-param name="tab" select="'complete'"/> <!-- just a non-existing tab --> <xsl:with-param name="text" select="/root/gui/strings/completeTab"/> <xsl:with-param name="tabLink" select="$tabLink"/> </xsl:call-template> <xsl:call-template name="displayTab"> <xsl:with-param name="tab" select="'metadata'"/> <xsl:with-param name="text" select="/root/gui/strings/metadata"/> <xsl:with-param name="indent" select="'   '"/> <xsl:with-param name="tabLink" select="$tabLink"/> </xsl:call-template> <xsl:call-template name="displayTab"> <xsl:with-param name="tab" select="'identification'"/> <xsl:with-param name="text" select="/root/gui/strings/identificationTab"/> <xsl:with-param name="indent" select="'   '"/> <xsl:with-param name="tabLink" select="$tabLink"/> </xsl:call-template> <xsl:call-template name="displayTab"> <xsl:with-param name="tab" select="'maintenance'"/> <xsl:with-param name="text" select="/root/gui/strings/maintenanceTab"/> <xsl:with-param name="indent" select="'   '"/> <xsl:with-param name="tabLink" select="$tabLink"/> </xsl:call-template> <xsl:call-template name="displayTab"> <xsl:with-param name="tab" select="'constraints'"/> <xsl:with-param name="text" select="/root/gui/strings/constraintsTab"/> <xsl:with-param name="indent" select="'   '"/> <xsl:with-param name="tabLink" select="$tabLink"/> </xsl:call-template> <xsl:call-template name="displayTab"> <xsl:with-param name="tab" select="'spatial'"/> <xsl:with-param name="text" select="/root/gui/strings/spatialTab"/> <xsl:with-param name="indent" select="'   '"/> <xsl:with-param name="tabLink" select="$tabLink"/> </xsl:call-template> <xsl:call-template name="displayTab"> <xsl:with-param name="tab" select="'refSys'"/> <xsl:with-param name="text" select="/root/gui/strings/refSysTab"/> <xsl:with-param name="indent" select="'   '"/> <xsl:with-param name="tabLink" select="$tabLink"/> </xsl:call-template> <xsl:call-template name="displayTab"> <xsl:with-param name="tab" select="'distribution'"/> <xsl:with-param name="text" select="/root/gui/strings/distributionTab"/> <xsl:with-param name="indent" select="'   '"/> <xsl:with-param name="tabLink" select="$tabLink"/> </xsl:call-template> <xsl:call-template name="displayTab"> <xsl:with-param name="tab" select="'dataQuality'"/> <xsl:with-param name="text" select="/root/gui/strings/dataQualityTab"/> <xsl:with-param name="indent" select="'   '"/> <xsl:with-param name="tabLink" select="$tabLink"/> </xsl:call-template> <xsl:call-template name="displayTab"> <xsl:with-param name="tab" select="'appSchInfo'"/> <xsl:with-param name="text" select="/root/gui/strings/appSchInfoTab"/> <xsl:with-param name="indent" select="'   '"/> <xsl:with-param name="tabLink" select="$tabLink"/> </xsl:call-template> <xsl:call-template name="displayTab"> <xsl:with-param name="tab" select="'porCatInfo'"/> <xsl:with-param name="text" select="/root/gui/strings/porCatInfoTab"/> <xsl:with-param name="indent" select="'   '"/> <xsl:with-param name="tabLink" select="$tabLink"/> </xsl:call-template> </xsl:template> <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> <!-- utilities --> <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> <xsl:template mode="iso19139IsEmpty" match="*|@*"> <xsl:choose> <!-- normal element --> <xsl:when test="*"> <xsl:apply-templates mode="iso19139IsEmpty"/> </xsl:when> <!-- text element --> <xsl:when test="text()!=''">txt</xsl:when> <!-- empty element --> <xsl:otherwise> <!-- codelist? --> <xsl:variable name="name" select="name(.)"/> <xsl:if test="@codelist"> <xsl:if test="@codeListValue!=''">cdl</xsl:if> </xsl:if> </xsl:otherwise> </xsl:choose> </xsl:template></xsl:stylesheet>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -