Skip to content

Commit

Permalink
update schema_plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
fvanderbiest committed Mar 11, 2020
1 parent 984c638 commit 34bdb97
Show file tree
Hide file tree
Showing 177 changed files with 10,188 additions and 5,448 deletions.
1 change: 0 additions & 1 deletion config/schema_plugins/csw-record/schema-ident.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
<name>csw-record</name>
<id>e5f27024-dde2-11df-a18e-001c2346de4c</id>
<version>2.0.2</version>
<appMinorVersionSupported>3.4.0</appMinorVersionSupported>
<title xml:lang="en">Dublin core (for CSW only)</title>
<schemaLocation>http://www.opengis.net/cat/csw/2.0.2
http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd
Expand Down
4 changes: 1 addition & 3 deletions config/schema_plugins/dublin-core/extract-relations.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@
<xsl:value-of select="."/>
</id>
<url>
<value lang="{$lang}">
<xsl:value-of select="."/>
</value>
<xsl:value-of select="."/>
</url>
<title>
<value lang="{$lang}">
Expand Down
4 changes: 2 additions & 2 deletions config/schema_plugins/dublin-core/formatter/xsl-view/view.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
xmlns:gn-fn-render="http://geonetwork-opensource.org/xsl/functions/render"
version="2.0"
exclude-result-prefixes="#all">
<!-- tr is defined at core-geonetwork/services/src/main/java/org/fao/geonet/api/records/formatters/SchemaLocalizations.java -->

<!-- Load the editor configuration to be able
to render the different views -->
<xsl:variable name="configuration"
Expand Down Expand Up @@ -72,7 +72,7 @@
<dt>
<xsl:value-of select="if ($fieldName)
then $fieldName
else tr:nodeLabel(tr:create($schema), name(), null)"/>
else tr:node-label(tr:create($schema), name(), null)"/>
</dt>
<dd>
<xsl:apply-templates mode="render-value" select="."/>
Expand Down
4 changes: 2 additions & 2 deletions config/schema_plugins/dublin-core/index-fields/default.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,9 @@
<xsl:variable name="keywordWithNoThesaurus"
select="/simpledc/dc:subject[text() != '']"/>
<xsl:if test="count($keywordWithNoThesaurus) > 0">
'otherKeywords': [
'keywords': [
<xsl:for-each select="$keywordWithNoThesaurus">
{'value': <xsl:value-of select="concat('''', replace(., '''', '\\'''), '''')"/>, 'link': ''}
<xsl:value-of select="concat('''', replace(., '''', '\\'''), '''')"/>
<xsl:if test="position() != last()">,</xsl:if>
</xsl:for-each>
]
Expand Down
20 changes: 8 additions & 12 deletions config/schema_plugins/dublin-core/index-fields/index.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,12 @@
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:dct="http://purl.org/dc/terms/"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:gn-fn-index="http://geonetwork-opensource.org/xsl/functions/index"
xmlns:daobs="http://daobs.org"
xmlns:saxon="http://saxon.sf.net/"
extension-element-prefixes="saxon"
exclude-result-prefixes="#all"
version="2.0">

<xsl:import href="common/index-utils.xsl"/>

<xsl:output method="xml" indent="yes"/>

<xsl:output name="default-serialize-mode"
Expand All @@ -43,7 +40,6 @@
encoding="utf-8"
escape-uri-attributes="yes"/>


<!-- List of keywords to search for to flag a record as opendata.
Do not put accents or upper case letters here as comparison will not
take them in account. -->
Expand All @@ -69,8 +65,13 @@
<xsl:template match="simpledc"
mode="index">
<!-- Main variables for the document -->
<xsl:variable name="identifier" as="xs:string?"
select="dc:identifier[1]"/>
<xsl:variable name="identifier" as="xs:string"
select="dc:identifier"/>


<xsl:message><xsl:value-of select="concat(
'#', count(preceding-sibling::simpledc), $identifier)"/>
</xsl:message>

<!-- Create a first document representing the main record. -->
<doc>
Expand Down Expand Up @@ -148,12 +149,7 @@
<xsl:for-each select="(dct:references|dc:relation)[normalize-space(.) != '']">
<xsl:variable name="name" select="tokenize(., '/')[last()]"/>
<!-- Index link where last token after the last / is the link name. -->
<link type="object">{
"protocol":"<xsl:value-of select="'WWW-LINK'"/>",
"url":"<xsl:value-of select="gn-fn-index:json-escape(.)"/>",
"name":"<xsl:value-of select="gn-fn-index:json-escape($name)"/>",
"description":""
}</link>
<link><xsl:value-of select="concat($name, '||', ., '|WWW-LINK|WWW:LINK|0')"/></link>
</xsl:for-each>
<xsl:for-each select="(dct:references|dc:relation)[normalize-space(.) != ''
and matches(., '.*(.gif|.png.|.jpeg|.jpg)$', 'i')]">
Expand Down
19 changes: 0 additions & 19 deletions config/schema_plugins/dublin-core/layout/config-editor.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
<!-- Form field type configuration. Default is text. -->
<fields>
<for name="dc:description" use="textarea"/>
<for name="dct:abstract" use="textarea"/>
<for name="dc:source" use="textarea"/>
<for name="dc:rights" use="textarea"/>

Expand All @@ -51,12 +50,6 @@
<!-- View configuration -->
<views>
<view name="default" upAndDownControlHidden="true">
<sidePanel>
<directive data-gn-validation-report=""/>
<directive data-gn-onlinesrc-list=""
data-types="onlines"/>
<directive data-gn-need-help="user-guide/describing-information/creating-metadata.html"/>
</sidePanel>
<tab id="default" default="true" mode="flat">
<section xpath="/simpledc"/>
</tab>
Expand All @@ -65,23 +58,11 @@
</flatModeExceptions>
</view>
<view name="advanced">
<sidePanel>
<directive data-gn-validation-report=""/>
<directive data-gn-onlinesrc-list=""
data-types="onlines"/>
<directive data-gn-need-help="user-guide/describing-information/creating-metadata.html"/>
</sidePanel>
<tab id="advanced" default="true">
<section xpath="/simpledc"/>
</tab>
</view>
<view name="xml">
<sidePanel>
<directive data-gn-validation-report=""/>
<directive data-gn-onlinesrc-list=""
data-types="onlines"/>
<directive data-gn-need-help="user-guide/describing-information/creating-metadata.html"/>
</sidePanel>
<tab id="xml" default="true"/>
</view>
</views>
Expand Down
11 changes: 3 additions & 8 deletions config/schema_plugins/dublin-core/layout/layout.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -137,18 +137,16 @@
<xsl:variable name="added" select="parent::node()/parent::node()/@gn:addedObj"/>
<xsl:variable name="container" select="parent::node()/parent::node()"/>

<xsl:variable name="xpath" select="gn-fn-metadata:getXPath(.)"/>

<!-- Add view and edit template-->
<xsl:call-template name="render-element">
<xsl:with-param name="label" select="$labelConfig"/>
<xsl:with-param name="value" select="."/>
<xsl:with-param name="cls" select="local-name()"/>
<!--<xsl:with-param name="widget"/>
<xsl:with-param name="widgetParams"/>-->
<xsl:with-param name="xpath" select="$xpath"/>
<xsl:with-param name="xpath" select="gn-fn-metadata:getXPath(.)"/>
<!--<xsl:with-param name="attributesSnippet" as="node()"/>-->
<xsl:with-param name="type" select="gn-fn-metadata:getFieldType($editorConfig, name(), '', $xpath)"/>
<xsl:with-param name="type" select="gn-fn-metadata:getFieldType($editorConfig, name(), '')"/>
<xsl:with-param name="name" select="if ($isEditing) then gn:element/@ref else ''"/>
<xsl:with-param name="editInfo"
select="gn:element"/>
Expand Down Expand Up @@ -192,7 +190,6 @@
select="gn-fn-metadata:getLabel($schema, $name, $labels, '', '', '')"/>
<xsl:call-template name="render-element-to-add">
<xsl:with-param name="label" select="$label/label"/>
<xsl:with-param name="class" select="if ($label/class) then $label/class else ''"/>
<xsl:with-param name="btnLabel" select="if ($label/btnLabel) then $label/btnLabel else ''"/>
<xsl:with-param name="btnClass" select="if ($label/btnClass) then $label/btnClass else ''"/>
<xsl:with-param name="childEditInfo" select="$newElementConfig/gn:child"/>
Expand All @@ -206,15 +203,13 @@
<!-- Readonly elements -->
<xsl:template mode="mode-dublin-core" priority="200" match="dc:identifier|dct:modified">

<xsl:variable name="xpath" select="gn-fn-metadata:getXPath(.)"/>

<xsl:call-template name="render-element">
<xsl:with-param name="label"
select="gn-fn-metadata:getLabel($schema, name(), $labels)"/>
<xsl:with-param name="value" select="."/>
<xsl:with-param name="cls" select="local-name()"/>
<xsl:with-param name="xpath" select="gn-fn-metadata:getXPath(.)"/>
<xsl:with-param name="type" select="gn-fn-metadata:getFieldType($editorConfig, name(), '', $xpath)"/>
<xsl:with-param name="type" select="gn-fn-metadata:getFieldType($editorConfig, name(), '')"/>
<xsl:with-param name="name" select="''"/>
<xsl:with-param name="editInfo" select="*/gn:element"/>
<xsl:with-param name="parentEditInfo" select="gn:element"/>
Expand Down
2 changes: 1 addition & 1 deletion config/schema_plugins/dublin-core/layout/tpl-brief.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
<image>IMAGE</image>
-->
<!-- TODO : ows:BoundingBox -->
<xsl:variable name="coverage" select="dc:coverage[1]"/>
<xsl:variable name="coverage" select="dc:coverage"/>
<xsl:variable name="n" select="substring-after($coverage,'North ')"/>
<xsl:variable name="north" select="substring-before($n,',')"/>
<xsl:variable name="s" select="substring-after($coverage,'South ')"/>
Expand Down
10 changes: 0 additions & 10 deletions config/schema_plugins/dublin-core/loc/ara/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,4 @@

<strings>
<xml_dublin-core>Save this metadata as a Dublin Core XML file</xml_dublin-core>
<xml_dublin-coreTooai_dc>Save this metadata as an OAI Dublin Core XML file
</xml_dublin-coreTooai_dc>

<xml>XML</xml>
<default>Simple</default>
<advanced>Full</advanced>

<providedBy>Provided by</providedBy>
<shareOnSocialSite>Share on social sites</shareOnSocialSite>
<associatedResources>Associated resources</associatedResources>
</strings>
10 changes: 0 additions & 10 deletions config/schema_plugins/dublin-core/loc/cat/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,4 @@

<strings>
<xml_dublin-core>Save this metadata as a Dublin Core XML file</xml_dublin-core>
<xml_dublin-coreTooai_dc>Save this metadata as an OAI Dublin Core XML file
</xml_dublin-coreTooai_dc>

<xml>XML</xml>
<default>Simple</default>
<advanced>Full</advanced>

<providedBy>Provided by</providedBy>
<shareOnSocialSite>Share on social sites</shareOnSocialSite>
<associatedResources>Associated resources</associatedResources>
</strings>
10 changes: 0 additions & 10 deletions config/schema_plugins/dublin-core/loc/chi/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,4 @@

<strings>
<xml_dublin-core>Save this metadata as a Dublin Core XML file</xml_dublin-core>
<xml_dublin-coreTooai_dc>Save this metadata as an OAI Dublin Core XML file
</xml_dublin-coreTooai_dc>

<xml>XML</xml>
<default>Simple</default>
<advanced>Full</advanced>

<providedBy>Provided by</providedBy>
<shareOnSocialSite>Share on social sites</shareOnSocialSite>
<associatedResources>Associated resources</associatedResources>
</strings>
10 changes: 0 additions & 10 deletions config/schema_plugins/dublin-core/loc/dut/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,4 @@

<strings>
<xml_dublin-core>Save this metadata as a Dublin Core XML file</xml_dublin-core>
<xml_dublin-coreTooai_dc>Save this metadata as an OAI Dublin Core XML file
</xml_dublin-coreTooai_dc>

<xml>XML</xml>
<default>Simple</default>
<advanced>Full</advanced>

<providedBy>Provided by</providedBy>
<shareOnSocialSite>Share on social sites</shareOnSocialSite>
<associatedResources>Associated resources</associatedResources>
</strings>
4 changes: 0 additions & 4 deletions config/schema_plugins/dublin-core/loc/eng/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,4 @@
<xml>XML</xml>
<default>Simple</default>
<advanced>Full</advanced>

<providedBy>Provided by</providedBy>
<shareOnSocialSite>Share on social sites</shareOnSocialSite>
<associatedResources>Associated resources</associatedResources>
</strings>
10 changes: 0 additions & 10 deletions config/schema_plugins/dublin-core/loc/fin/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,4 @@

<strings>
<xml_dublin-core>Save this metadata as a Dublin Core XML file</xml_dublin-core>
<xml_dublin-coreTooai_dc>Save this metadata as an OAI Dublin Core XML file
</xml_dublin-coreTooai_dc>

<xml>XML</xml>
<default>Simple</default>
<advanced>Full</advanced>

<providedBy>Provided by</providedBy>
<shareOnSocialSite>Share on social sites</shareOnSocialSite>
<associatedResources>Associated resources</associatedResources>
</strings>
7 changes: 1 addition & 6 deletions config/schema_plugins/dublin-core/loc/fre/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,9 @@

<strings>
<xml_dublin-core>Save this metadata as a Dublin Core XML file</xml_dublin-core>
<xml_dublin-coreTooai_dc>Save this metadata as an OAI Dublin Core XML file
</xml_dublin-coreTooai_dc>


<xml>XML</xml>
<default>Simple</default>
<advanced>Complète</advanced>

<providedBy>Provided by</providedBy>
<shareOnSocialSite>Share on social sites</shareOnSocialSite>
<associatedResources>Associated resources</associatedResources>
</strings>
10 changes: 0 additions & 10 deletions config/schema_plugins/dublin-core/loc/ger/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,4 @@

<strings>
<xml_dublin-core>Save this metadata as a Dublin Core XML file</xml_dublin-core>
<xml_dublin-coreTooai_dc>Save this metadata as an OAI Dublin Core XML file
</xml_dublin-coreTooai_dc>

<xml>XML</xml>
<default>Simple</default>
<advanced>Full</advanced>

<providedBy>Provided by</providedBy>
<shareOnSocialSite>Share on social sites</shareOnSocialSite>
<associatedResources>Associated resources</associatedResources>
</strings>
8 changes: 0 additions & 8 deletions config/schema_plugins/dublin-core/loc/ita/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,4 @@
<xml_dublin-core>Save this metadata as a Dublin Core XML file</xml_dublin-core>
<xml_dublin-coreTooai_dc>Save this metadata as an OAI Dublin Core XML file
</xml_dublin-coreTooai_dc>

<xml>XML</xml>
<default>Simple</default>
<advanced>Full</advanced>

<providedBy>Provided by</providedBy>
<shareOnSocialSite>Share on social sites</shareOnSocialSite>
<associatedResources>Associated resources</associatedResources>
</strings>
10 changes: 0 additions & 10 deletions config/schema_plugins/dublin-core/loc/nor/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,4 @@

<strings>
<xml_dublin-core>Save this metadata as a Dublin Core XML file</xml_dublin-core>
<xml_dublin-coreTooai_dc>Save this metadata as an OAI Dublin Core XML file
</xml_dublin-coreTooai_dc>

<xml>XML</xml>
<default>Simple</default>
<advanced>Full</advanced>

<providedBy>Provided by</providedBy>
<shareOnSocialSite>Share on social sites</shareOnSocialSite>
<associatedResources>Associated resources</associatedResources>
</strings>
8 changes: 0 additions & 8 deletions config/schema_plugins/dublin-core/loc/pol/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,4 @@
<xml_dublin-core>Save this metadata as a Dublin Core XML file</xml_dublin-core>
<xml_dublin-coreTooai_dc>Save this metadata as an OAI Dublin Core XML file
</xml_dublin-coreTooai_dc>

<xml>XML</xml>
<default>Simple</default>
<advanced>Full</advanced>

<providedBy>Provided by</providedBy>
<shareOnSocialSite>Share on social sites</shareOnSocialSite>
<associatedResources>Associated resources</associatedResources>
</strings>
10 changes: 0 additions & 10 deletions config/schema_plugins/dublin-core/loc/por/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,4 @@

<strings>
<xml_dublin-core>Save this metadata as a Dublin Core XML file</xml_dublin-core>
<xml_dublin-coreTooai_dc>Save this metadata as an OAI Dublin Core XML file
</xml_dublin-coreTooai_dc>

<xml>XML</xml>
<default>Simple</default>
<advanced>Full</advanced>

<providedBy>Provided by</providedBy>
<shareOnSocialSite>Share on social sites</shareOnSocialSite>
<associatedResources>Associated resources</associatedResources>
</strings>
10 changes: 0 additions & 10 deletions config/schema_plugins/dublin-core/loc/rus/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,4 @@

<strings>
<xml_dublin-core>Save this metadata as a Dublin Core XML file</xml_dublin-core>
<xml_dublin-coreTooai_dc>Save this metadata as an OAI Dublin Core XML file
</xml_dublin-coreTooai_dc>

<xml>XML</xml>
<default>Simple</default>
<advanced>Full</advanced>

<providedBy>Provided by</providedBy>
<shareOnSocialSite>Share on social sites</shareOnSocialSite>
<associatedResources>Associated resources</associatedResources>
</strings>
Loading

0 comments on commit 34bdb97

Please sign in to comment.