Commit 2f3ec624 authored by ByronCinNZ's avatar ByronCinNZ

Upgrade for GN3.6 effort thus far

parent 02da2266
/*
* Copyright (C) 2001-2016 Food and Agriculture Organization of the
* United Nations (FAO-UN), United Nations World Food Programme (WFP)
* and United Nations Environment Programme (UNEP)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at
* your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*
* Contact: Jeroen Ticheler - FAO - Viale delle Terme di Caracalla 2,
* Rome - Italy. email: geonetwork@osgeo.org
*/
package org.fao.geonet.schema.iso19139mcp14;
import org.jdom.Namespace;
/**
* Namespaces for iso19139 metadata standard.
* <p/>
* Created by francois on 3/26/14.
*/
public class ISO19139mcp14Namespaces {
public static final Namespace GCO =
Namespace.getNamespace("gco", "http://www.isotc211.org/2005/gco");
public static final Namespace SRV =
Namespace.getNamespace("srv", "http://www.isotc211.org/2005/srv");
public static final Namespace GMD =
Namespace.getNamespace("gmd", "http://www.isotc211.org/2005/gmd");
public static final Namespace GML =
Namespace.getNamespace("gml", "http://www.opengis.net/gml");
public static final Namespace MCP =
Namespace.getNamespace("mcp", "http://bluenet3.antcrc.utas.edu.au/mcp");
public static final Namespace XSI =
Namespace.getNamespace("xsi", "http://www.w3.org/2001/XMLSchema-instance");
public static final Namespace GTS =
Namespace.getNamespace("gts", "http://www.isotc211.org/2005/gts");
public static final Namespace GMX =
Namespace.getNamespace("gmx", "http://www.isotc211.org/2005/gmx");
public static final Namespace XLINK =
Namespace.getNamespace("xlink", "http://www.w3.org/1999/xlink");
}
...@@ -21,9 +21,9 @@ ...@@ -21,9 +21,9 @@
* Rome - Italy. email: geonetwork@osgeo.org * Rome - Italy. email: geonetwork@osgeo.org
*/ */
import iso19139.SummaryFactory import iso19139mcp14.SummaryFactory
def isoHandlers = new iso19139.Handlers(handlers, f, env) def isoHandlers = new iso19139mcp14.Handlers(handlers, f, env)
SummaryFactory.summaryHandler({it.parent() is it.parent()}, isoHandlers) SummaryFactory.summaryHandler({it.parent() is it.parent()}, isoHandlers)
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
* Rome - Italy. email: geonetwork@osgeo.org * Rome - Italy. email: geonetwork@osgeo.org
*/ */
package iso19139 package iso19139mcp14
import org.fao.geonet.domain.ISODate import org.fao.geonet.domain.ISODate
...@@ -106,4 +106,4 @@ public class Functions { ...@@ -106,4 +106,4 @@ public class Functions {
def isoUrlEl(node, href, text) { def isoUrlEl(node, href, text) {
return commonHandlers.func.urlEl(f.nodeLabel(node), href, text) return commonHandlers.func.urlEl(f.nodeLabel(node), href, text)
} }
} }
\ No newline at end of file
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
* Rome - Italy. email: geonetwork@osgeo.org * Rome - Italy. email: geonetwork@osgeo.org
*/ */
package iso19139 package iso19139mcp14
import org.fao.geonet.api.records.formatters.groovy.Environment import org.fao.geonet.api.records.formatters.groovy.Environment
import org.fao.geonet.api.records.formatters.groovy.MapConfig import org.fao.geonet.api.records.formatters.groovy.MapConfig
...@@ -31,17 +31,17 @@ public class Handlers { ...@@ -31,17 +31,17 @@ public class Handlers {
protected org.fao.geonet.api.records.formatters.groovy.Functions f protected org.fao.geonet.api.records.formatters.groovy.Functions f
protected Environment env protected Environment env
Matchers matchers Matchers matchers
iso19139.Functions isofunc iso19139mcp14.Functions isofunc
common.Handlers commonHandlers common.Handlers commonHandlers
List<String> packageViews List<String> packageViews
String rootEl = 'gmd:MD_Metadata' String rootEl = 'mcp:MD_Metadata'
public Handlers(handlers, f, env) { public Handlers(handlers, f, env) {
this.handlers = handlers this.handlers = handlers
this.f = f this.f = f
this.env = env this.env = env
commonHandlers = new common.Handlers(handlers, f, env) commonHandlers = new common.Handlers(handlers, f, env)
isofunc = new iso19139.Functions(handlers: handlers, f:f, env:env, commonHandlers: commonHandlers) isofunc = new iso19139mcp14.Functions(handlers: handlers, f:f, env:env, commonHandlers: commonHandlers)
matchers = new Matchers(handlers: handlers, f:f, env:env) matchers = new Matchers(handlers: handlers, f:f, env:env)
packageViews = [ packageViews = [
'gmd:identificationInfo', 'gmd:metadataMaintenance', 'gmd:metadataConstraints', 'gmd:spatialRepresentationInfo', 'gmd:identificationInfo', 'gmd:metadataMaintenance', 'gmd:metadataConstraints', 'gmd:spatialRepresentationInfo',
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
* Rome - Italy. email: geonetwork@osgeo.org * Rome - Italy. email: geonetwork@osgeo.org
*/ */
package iso19139 package iso19139mcp14
public class Matchers { public class Matchers {
def handlers; def handlers;
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
* Rome - Italy. email: geonetwork@osgeo.org * Rome - Italy. email: geonetwork@osgeo.org
*/ */
package iso19139 package iso19139mcp14
import org.fao.geonet.api.records.formatters.FormatType import org.fao.geonet.api.records.formatters.FormatType
import org.fao.geonet.api.records.formatters.groovy.Environment import org.fao.geonet.api.records.formatters.groovy.Environment
import org.fao.geonet.api.records.formatters.groovy.util.* import org.fao.geonet.api.records.formatters.groovy.util.*
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
<!-- Some utility --> <!-- Some utility -->
<xsl:include href="../../layout/evaluate.xsl"/> <xsl:include href="../../layout/evaluate.xsl"/>
<xsl:include href="../../layout/utility-tpl-multilingual.xsl"/> <xsl:include href="../../layout/utility-tpl-multilingual.xsl"/>
<xsl:include href="../../../iso19139/layout/utility-fn.xsl"/> <xsl:include href="../../layout/utility-fn.xsl"/>
<!-- The core formatter XSL layout based on the editor configuration --> <!-- The core formatter XSL layout based on the editor configuration -->
<xsl:include href="sharedFormatterDir/xslt/render-layout.xsl"/> <xsl:include href="sharedFormatterDir/xslt/render-layout.xsl"/>
......
...@@ -130,7 +130,7 @@ ...@@ -130,7 +130,7 @@
index="true"/> index="true"/>
<xsl:apply-templates select="*[name(.)='mcp:MD_Metadata' or @gco:isoType='mcp:MD_Metadata']" mode="metadata"/> <xsl:apply-templates select="*[name(.)='mcp:MD_Metadata' or @gco:isoType='gmd:MD_Metadata']" mode="metadata"/>
<xsl:apply-templates mode="index" select="*"/> <xsl:apply-templates mode="index" select="*"/>
......
...@@ -150,6 +150,15 @@ ...@@ -150,6 +150,15 @@
<xsl:with-param name="langId" select="$langId"/> <xsl:with-param name="langId" select="$langId"/>
</xsl:apply-templates> </xsl:apply-templates>
</xsl:template> </xsl:template>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<xsl:template mode="index" match="mcp:revisionDate/*">
<Field name="changeDate" string="{string(.)}" store="true" index="true"/>
<xsl:apply-templates mode="index" select="*"/>
</xsl:template>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- ========================================================================================= --> <!-- ========================================================================================= -->
...@@ -661,7 +670,7 @@ ...@@ -661,7 +670,7 @@
</xsl:attribute> </xsl:attribute>
</Field> </Field>
<xsl:variable name="identification" select="gmd:identificationInfo//gmd:MD_DataIdentification| <xsl:variable name="identification" select="gmd:identificationInfo//mcp:MD_DataIdentification|
gmd:identificationInfo//*[contains(@gco:isoType, 'MD_DataIdentification')]| gmd:identificationInfo//*[contains(@gco:isoType, 'MD_DataIdentification')]|
gmd:identificationInfo/srv:SV_ServiceIdentification"/> gmd:identificationInfo/srv:SV_ServiceIdentification"/>
......
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2001-2016 Food and Agriculture Organization of the
~ United Nations (FAO-UN), United Nations World Food Programme (WFP)
~ and United Nations Environment Programme (UNEP)
~
~ This program is free software; you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation; either version 2 of the License, or (at
~ your option) any later version.
~
~ This program is distributed in the hope that it will be useful, but
~ WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
~ General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program; if not, write to the Free Software
~ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
~
~ Contact: Jeroen Ticheler - FAO - Viale delle Terme di Caracalla 2,
~ Rome - Italy. email: geonetwork@osgeo.org
-->
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gts="http://www.isotc211.org/2005/gts" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gts="http://www.isotc211.org/2005/gts"
xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:gmx="http://www.isotc211.org/2005/gmx" xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:gmx="http://www.isotc211.org/2005/gmx"
xmlns:srv="http://www.isotc211.org/2005/srv" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:srv="http://www.isotc211.org/2005/srv" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mcp="http://bluenet3.antcrc.utas.edu.au/mcp"
xmlns:gml="http://www.opengis.net/gml" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:gml="http://www.opengis.net/gml" xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:mcp="http://bluenet3.antcrc.utas.edu.au/mcp"
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:gn="http://www.fao.org/geonetwork" xmlns:gn="http://www.fao.org/geonetwork"
xmlns:gn-fn-metadata="http://geonetwork-opensource.org/xsl/functions/metadata" xmlns:gn-fn-metadata="http://geonetwork-opensource.org/xsl/functions/metadata"
xmlns:gn-fn-iso19139="http://geonetwork-opensource.org/xsl/functions/profiles/iso19139" xmlns:gn-fn-iso19139="http://geonetwork-opensource.org/xsl/functions/profiles/iso19139"
xmlns:saxon="http://saxon.sf.net/" extension-element-prefixes="saxon" xmlns:saxon="http://saxon.sf.net/" extension-element-prefixes="saxon"
exclude-result-prefixes="#all"> exclude-result-prefixes="#all">
<xsl:include href="evaluate.xsl"/>
<xsl:include href="layout.xsl"/> <xsl:include href="layout.xsl"/>
<!-- <!--
Load the schema configuration for the editor. Load the schema configuration for the editor.
--> -->
<xsl:template name="get-iso19139.mcp-1.4-configuration"> <xsl:template name="get-iso19139.mcp-1.4-configuration">
...@@ -23,57 +47,17 @@ ...@@ -23,57 +47,17 @@
</xsl:template> </xsl:template>
<!-- The main dispatch point - process in iso19139.mcp mode first,
if we get something then use that otherwise process in iso19139
mode -->
<xsl:template name="dispatch-iso19139.mcp-1.4"> <xsl:template name="dispatch-iso19139.mcp-1.4">
<xsl:param name="base" as="node()"/> <xsl:param name="base" as="node()"/>
<xsl:param name="overrideLabel" as="xs:string" required="no" select="''"/> <xsl:param name="overrideLabel" as="xs:string" required="no" select="''"/>
<xsl:param name="refToDelete" as="node()?" required="no"/>
<xsl:param name="config" as="node()?" required="no"/>
<!-- process in iso19139 mode - but we can override any templates
defined for iso19139 by importing that stylesheet into our
mcp stylesheet - that way the iso19139 templates will have
a lower priority than ours -->
<xsl:apply-templates mode="mode-iso19139" select="$base"> <xsl:apply-templates mode="mode-iso19139" select="$base">
<xsl:with-param name="overrideLabel" select="$overrideLabel"/> <xsl:with-param name="overrideLabel" select="$overrideLabel"/>
<xsl:with-param name="schema" select="$schema"/> <xsl:with-param name="refToDelete" select="$refToDelete"/>
<xsl:with-param name="labels" select="$iso19139.mcp-1.4labels"/> <xsl:with-param name="config" select="$config"/>
</xsl:apply-templates> </xsl:apply-templates>
</xsl:template>
<!-- The following templates usually delegates all to iso19139. -->
<xsl:template name="evaluate-iso19139.mcp-1.4">
<xsl:param name="base" as="node()"/>
<xsl:param name="in"/>
<xsl:variable name="nodeOrAttribute" select="saxon:evaluate(concat('$p1', $in), $base)"/>
<xsl:choose>
<xsl:when test="$nodeOrAttribute/*">
<xsl:copy-of select="$nodeOrAttribute"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$nodeOrAttribute"/>
</xsl:otherwise>
</xsl:choose>
<!--<xsl:call-template name="evaluate-iso19139">
<xsl:with-param name="base" select="$base"/>
<xsl:with-param name="in" select="$in"/>
</xsl:call-template>-->
</xsl:template>
<xsl:template name="evaluate-iso19139.mcp-1.4-boolean">
<xsl:param name="base" as="node()"/>
<xsl:param name="in"/>
<xsl:call-template name="evaluate-iso19139-boolean">
<xsl:with-param name="base" select="$base"/>
<xsl:with-param name="in" select="$in"/>
</xsl:call-template>
</xsl:template> </xsl:template>
</xsl:stylesheet> </xsl:stylesheet>
...@@ -31,9 +31,9 @@ ...@@ -31,9 +31,9 @@
xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:gco="http://www.isotc211.org/2005/gco"
xmlns:gmx="http://www.isotc211.org/2005/gmx" xmlns:gmx="http://www.isotc211.org/2005/gmx"
xmlns:srv="http://www.isotc211.org/2005/srv" xmlns:srv="http://www.isotc211.org/2005/srv"
xmlns:mcp="http://bluenet3.antcrc.utas.edu.au/mcp"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:gml="http://www.opengis.net/gml" xmlns:gml="http://www.opengis.net/gml"
xmlns:mcp="http://bluenet3.antcrc.utas.edu.au/mcp"
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:gn="http://www.fao.org/geonetwork" xmlns:gn="http://www.fao.org/geonetwork"
xmlns:gn-fn-metadata="http://geonetwork-opensource.org/xsl/functions/metadata" xmlns:gn-fn-metadata="http://geonetwork-opensource.org/xsl/functions/metadata"
...@@ -43,27 +43,71 @@ ...@@ -43,27 +43,71 @@
extension-element-prefixes="saxon" extension-element-prefixes="saxon"
exclude-result-prefixes="#all"> exclude-result-prefixes="#all">
<xsl:import href="../../iso19139/layout/evaluate.xsl"/>
<xsl:import href="../../iso19139/layout/evaluate.xsl"/>
<!-- <xsl:include href="layout.xsl"/>
Load the schema configuration for the editor.
-->
<!--<xsl:template name="get-iso19139.mcp-1.4-configuration">
<xsl:copy-of select="document('config-editor.xml')"/>
</xsl:template>Byron - Copied over from dipatch.xsl. Threw errors. Comment out.
-->
<!-- The main dispatch point - process in iso19139.mcp mode first,
if we get something then use that otherwise process in iso19139
mode -->
<!-- <xsl:template name="dispatch-iso19139.mcp-1.4">
<xsl:param name="base" as="node()"/>
<xsl:param name="overrideLabel" as="xs:string" required="no" select="''"/>
</xsl:template> Byron - Copied over from dipatch.xsl. Threw errors. Comment out.
-->
<!-- process in iso19139 mode - but we can override any templates
defined for iso19139 by importing that stylesheet into our
mcp stylesheet - that way the iso19139 templates will have
a lower priority than ours -->
<!-- <xsl:apply-templates mode="mode-iso19139" select="$base">
<xsl:with-param name="overrideLabel" select="$overrideLabel"/>
<xsl:with-param name="schema" select="$schema"/>
<xsl:with-param name="labels" select="$iso19139.mcp-1.4labels"/>
</xsl:apply-templates>
</xsl:template> Byron - Copied over from dipatch.xsl. Threw errors. Comment out.
-->
<!-- The following templates usually delegates all to iso19139. --> <!-- The following templates usually delegates all to iso19139. -->
<xsl:template name="evaluate-iso19139.mcp-1.4"> <xsl:template name="evaluate-iso19139.mcp-1.4">
<xsl:param name="base" as="node()"/> <xsl:param name="base" as="node()"/>
<xsl:param name="in"/> <xsl:param name="in"/>
<!--<xsl:copy-of select="saxon:evaluate(concat('$p1', $in), $base)"/>-->
<xsl:call-template name="evaluate-iso19139">
<xsl:variable name="nodeOrAttribute" select="saxon:evaluate(concat('$p1', $in), $base)"/>
<xsl:choose>
<xsl:when test="$nodeOrAttribute/*">
<xsl:copy-of select="$nodeOrAttribute"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$nodeOrAttribute"/>
</xsl:otherwise>
</xsl:choose>
<!--<xsl:call-template name="evaluate-iso19139">
<xsl:with-param name="base" select="$base"/> <xsl:with-param name="base" select="$base"/>
<xsl:with-param name="in" select="$in"/> <xsl:with-param name="in" select="$in"/>
</xsl:call-template> </xsl:call-template>-->
</xsl:template> </xsl:template>
<xsl:template name="evaluate-iso19139.mcp-1.4-boolean"> <xsl:template name="evaluate-iso19139.mcp-1.4-boolean">
<xsl:param name="base" as="node()"/> <xsl:param name="base" as="node()"/>
<xsl:param name="in"/> <xsl:param name="in"/>
<!--<xsl:copy-of select="saxon:evaluate(concat('$p1', $in), $base)"/>-->
<xsl:call-template name="evaluate-iso19139-boolean"> <xsl:call-template name="evaluate-iso19139-boolean">
<xsl:with-param name="base" select="$base"/> <xsl:with-param name="base" select="$base"/>
<xsl:with-param name="in" select="$in"/> <xsl:with-param name="in" select="$in"/>
</xsl:call-template> </xsl:call-template>
</xsl:template> </xsl:template>
</xsl:stylesheet> </xsl:stylesheet>
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2001-2016 Food and Agriculture Organization of the
~ United Nations (FAO-UN), United Nations World Food Programme (WFP)
~ and United Nations Environment Programme (UNEP)
~
~ This program is free software; you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation; either version 2 of the License, or (at
~ your option) any later version.
~
~ This program is distributed in the hope that it will be useful, but
~ WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
~ General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program; if not, write to the Free Software
~ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
~
~ Contact: Jeroen Ticheler - FAO - Viale delle Terme di Caracalla 2,
~ Rome - Italy. email: geonetwork@osgeo.org
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:gmd="http://www.isotc211.org/2005/gmd"
xmlns:gco="http://www.isotc211.org/2005/gco"
xmlns:mcp="http://bluenet3.antcrc.utas.edu.au/mcp"
xmlns:gn-fn-iso19139="http://geonetwork-opensource.org/xsl/functions/profiles/iso19139"
version="2.0"
exclude-result-prefixes="#all">
<!-- Get lang #id in metadata PT_Locale section, deprecated: if not return the 2 first letters
of the lang iso3code in uper case.
if not return the lang iso3code in uper case.
-->
<xsl:function name="gn-fn-iso19139:getLangId" as="xs:string">
<xsl:param name="md"/>
<xsl:param name="lang"/>
<xsl:choose>
<xsl:when
test="$md/gmd:locale/gmd:PT_Locale[gmd:languageCode/gmd:LanguageCode/@codeListValue = $lang]/@id">
<xsl:value-of
select="concat('#', $md/gmd:locale/gmd:PT_Locale[gmd:languageCode/gmd:LanguageCode/@codeListValue = $lang]/@id)"
/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat('#', upper-case($lang))"/>
</xsl:otherwise>
</xsl:choose>
</xsl:function>
<xsl:function name="gn-fn-iso19139:getCodeListType" as="xs:string">
<xsl:param name="name" as="xs:string"/>
<xsl:variable name="configType" select="$editorConfig/editor/fields/for[@name = $name]/@use"/>
<xsl:value-of select="if ($configType) then $configType else 'select'"/>
</xsl:function>
<xsl:function name="gn-fn-iso19139:isNotMultilingualField" as="xs:boolean">
<xsl:param name="element" as="node()"/>
<xsl:param name="editorConfig" as="node()"/>
<xsl:variable name="elementName" select="name($element)"/>
<xsl:variable name="exclusionMatchesParent" as="xs:boolean">
<xsl:variable name="parentName"
select="name($element/..)"/>
<xsl:value-of select="count($editorConfig/editor/multilingualFields/exclude/
name[. = $elementName]/@parent[. = $parentName]) > 0"/>
</xsl:variable>
<xsl:variable name="exclusionMatchesAncestor" as="xs:boolean">
<xsl:variable name="ancestorNames"
select="$element/ancestor::*/name()"/>
<xsl:value-of select="count($editorConfig/editor/multilingualFields/exclude/
name[. = $elementName]/@ancestor[. = $ancestorNames]) > 0"/>
</xsl:variable>
<xsl:variable name="exclusionMatchesChild" as="xs:boolean">
<xsl:variable name="childName"
select="name($element/*[1])"/>
<xsl:value-of select="count($editorConfig/editor/multilingualFields/exclude/
name[. = $elementName]/@child[. = $childName]) > 0"/>
</xsl:variable>
<xsl:variable name="excluded"
as="xs:boolean"
select="
count($editorConfig/editor/multilingualFields/exclude/name[. = $elementName and not(@*)]) > 0 or
$exclusionMatchesAncestor = true() or
$exclusionMatchesParent = true() or
$exclusionMatchesChild = true() or
count($element/gco:Boolean) > 0"/>
<!--
<xsl:message>===== elementName <xsl:copy-of select="$elementName"/></xsl:message>
<xsl:message>= <xsl:copy-of select="$exclusionMatchesParent"/></xsl:message>
<xsl:message>= <xsl:copy-of select="$exclusionMatchesAncestor"/></xsl:message>
<xsl:message>= <xsl:copy-of select="$exclusionMatchesChild"/></xsl:message>
<xsl:message>= excluded<xsl:copy-of select="$excluded"/></xsl:message>-->
<xsl:value-of select="$excluded"/>
</xsl:function>
</xsl:stylesheet>
...@@ -28,7 +28,7 @@ xmlns:mcp="http://bluenet3.antcrc.utas.edu.au/mcp" ...@@ -28,7 +28,7 @@ xmlns:mcp="http://bluenet3.antcrc.utas.edu.au/mcp"
</xsl:call-template> </xsl:call-template>
</xsl:variable> </xsl:variable>
<xsl:variable name="identification" select="gmd:identificationInfo/gmd:MD_DataIdentification| <xsl:variable name="identification" select="gmd:identificationInfo/mcp:MD_DataIdentification|