forked from geonetwork/core-geonetwork
-
Notifications
You must be signed in to change notification settings - Fork 1
/
config-editor.xsd
2404 lines (2027 loc) · 82.7 KB
/
config-editor.xsd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?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: [email protected]
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<xs:element name="editor">
<xs:annotation>
<xs:documentation>
<![CDATA[
A metadata editor configuration is defined for a specific schema plugin standard
(see :ref:`implementing-a-schema-plugin`).
The editor configuration defines the navigation menu for the editor (i.e. list of views and tabs),
the list of fields and the type of control to use. Controls can
be HTML-type (e.g. text, date) or more advanced controls built using
`AngularJS directives <https://docs.angularjs.org/guide/directive>`_.
To build such an editor configuration, the user needs to know the XSD of the standard
to properly build views, tabs and fields according to the element names
(see :code:`schemas/config-editor.xsd`). Create an editor root element and
attach:
* the schema and
* namespaces for the standards
.. code-block:: xml
<editor xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:gn="http://www.fao.org/geonetwork"
xmlns:gco="http://www.isotc211.org/2005/gco"
xmlns:gmd="http://www.isotc211.org/2005/gmd"
xmlns:gmx="http://www.isotc211.org/2005/gmx"
xmlns:srv="http://www.isotc211.org/2005/srv"
xmlns:gml="http://www.opengis.net/gml"
xmlns:xlink="http://www.w3.org/1999/xlink"
xsi:noNamespaceSchemaLocation="../../../../../../config-editor.xsd">
An editor configuration should first define some general element descriptions and then
a set of views with at least one defined view.
]]></xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="1" ref="fields"/>
<xs:element minOccurs="0" maxOccurs="1" ref="fieldsWithFieldset"/>
<xs:element minOccurs="0" maxOccurs="1" ref="fieldsWithAnchorOption"/>
<xs:element minOccurs="0" maxOccurs="1" ref="multilingualFields"/>
<xs:element minOccurs="0" maxOccurs="1" ref="tableFields"/>
<xs:element minOccurs="1" maxOccurs="1" ref="views"/>
<xs:element minOccurs="0" maxOccurs="1" ref="snippets"/>
<xs:element minOccurs="0" maxOccurs="1" ref="batchEditing"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="fields">
<xs:annotation>
<xs:documentation>
<![CDATA[
Defining field type
-------------------
Define the form fields type configuration. The default is simple text input.
This list contains a list of fields which do not use a simple text input.
The list of possible values are:
* all HTML5 input type or
* an AngularJS directive name. MUST start with ``data-`` and
could end with ``-textarea`` to create a textarea element or
with ``-div`` if the directive does not apply
to the input or textarea but to the div element containing it.
An element can only have one type defined.
.. code-block:: xml
<editor>
<fields>
<for name="gmd:abstract" use="textarea"/>
<for name="gco:Real" use="number"/>
<for name="gco:Boolean" use="checkbox"/>
<for name="gco:Date" use="data-gn-date-picker"/>
The other option to define a more advanced field type is to catch the element using
and XSL template. This approach is used for keywords in ISO19139
(see for example :code:`schemas/iso19139/src/main/plugin/iso19139/layout/layout-custom-fields-keywords.xsl`).
]]>
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="for" minOccurs="1" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:unique name="uniqueForElementName">
<xs:selector xpath="for"/>
<xs:field xpath="@name"/>
</xs:unique>
</xs:element>
<xs:element name="fieldsWithFieldset">
<xs:annotation>
<xs:documentation>
<![CDATA[
Grouping element from the standards
-----------------------------------
List of elements to be displayed in a fieldset (i.e. boxed element). Those
elements usually contain children elements and define major sections in the
standard. For example, in ISO19139, `identification` and `distribution` are major
sections and should usually be displayed as a group of `information`.
.. code-block:: xml
<editor>
<fields>...</fields>
<fieldsWithFieldset>
<name>gmd:identificationInfo</name>
<name>gmd:distributionInfo</name>
]]></xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="unbounded" ref="name"/>
</xs:sequence>
</xs:complexType>
<xs:unique name="uniqueFieldswithFieldset">
<xs:selector xpath="name"/>
<xs:field xpath="."/>
</xs:unique>
</xs:element>
<xs:element name="fieldsWithAnchorOption">
<xs:annotation>
<xs:documentation>
<![CDATA[
Defining elements to display a replacement selection for CharacterString or Anchor
----------------------------------------------------------------------------------
List of element to display a replacement selection for CharacterString or Anchor
when adding them to the editor.
.. code-block:: xml
<editor>
<fields>...</fields>
<fieldsWithFieldset>...</fieldsWithFieldset>
<fieldsWithAnchorOption>
<name>gfc::code</name>
]]></xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="unbounded" ref="name"/>
</xs:sequence>
</xs:complexType>
<xs:unique name="uniqueFieldsWithAnchorOption">
<xs:selector xpath="name"/>
<xs:field xpath="."/>
</xs:unique>
</xs:element>
<xs:element name="multilingualFields">
<xs:annotation>
<xs:documentation>
<![CDATA[
Defining multilingual fields
----------------------------
Configure here the list of multilingual fields for a standard.
By default, if the standard has multilingual support like ISO19139, all fields will be displayed
as multilingual fields. Define in the exclude section the exceptions (e.g. `gmd:identifier` in ISO19139).
Then this section also allows to define how multilingual fields are displayed using the expanded elements.
If expanded, then one field per language is displayed with no need to click on the language switcher.
.. figure:: ../../user-guide/describing-information/img/multilingual-editing.png
.. code-block:: xml
<editor>
<fields>...</fields>
<fieldsWithFieldset>...</fieldsWithFieldset>
<multilingualFields>
<expanded>
<name>gmd:title</name>
<name>gmd:abstract</name>
</expanded>
<exclude>
<name>gmd:identifier</name>
<name>gmd:metadataStandardName</name>
]]></xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="1" ref="expanded"/>
<xs:element maxOccurs="1" ref="exclude"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="tableFields">
<xs:annotation>
<xs:documentation>
<![CDATA[
Defining fields to display as tables
------------------------------------
Configure here the list of fields to display using a table. This only applies to flat mode views.
.. figure:: ../../user-guide/describing-information/img/table-fields.png
.. code-block:: xml
<editor>
<fields>...</fields>
<fieldsWithFieldset>...</fieldsWithFieldset>
<multilingualFields>...</multilingualFields>
<tableFields>
<table for="gmd:CI_OnlineResource">
<header>
<col/>
<col label="gmd:protocol"/>
<col label="gmd:linkage"/>
<col label="gmd:name"/>
<col/>
</header>
<row>
<col orderControl=".."/>
<col xpath="gmd:protocol"/>
<col xpath="gmd:linkage"/>
<col xpath="gmd:name"/>
<col del=".."/>
</row>
</table>
Tables can also contains subforms.
Configuration is defined in the table config with a section element pointing to the element to add as a new row. In the following example, service operation are displayed in a table:
* with 3 columns: operation name, DCP and connect point.
* if parameters are defined, one subrow will be created per parameters
* and if srv:parameters is in flatModeException, and extra row will be added to allow to add new parameters for the operation
.. code-block:: xml
<table for="srv:SV_OperationMetadata">
<header>
<col label="srv:operationName"/>
<col label="srv:DCP"/>
<col label="srv:connectPoint"/>
<col/>
</header>
<row>
<col xpath="srv:operationName"/>
<col xpath="srv:DCP"/>
<col xpath="srv:connectPoint/gmd:CI_OnlineResource/gmd:linkage"/>
<col del=".."/>
<section xpath="srv:SV_OperationMetadata/srv:parameters"
or="parameters" in="srv:SV_OperationMetadata"/>
</row>
</table>
]]></xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="table">
<xs:complexType>
<xs:attribute name="for" use="required">
<xs:annotation>
<xs:documentation>
<![CDATA[
Element to match for creating the table.
]]>
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="label" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>Table header label (from strings.xml), if not defined is used the value of attribute 'for' use the related element label from labels.xml</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="fieldset" type="xs:string" use="optional" fixed="false">
<xs:annotation>
<xs:documentation>To not to add an extra section around the table. This means that editor can't remove the element targeted by the table.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:sequence>
<xs:element maxOccurs="1" ref="header"/>
<xs:element maxOccurs="1" ref="row"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="snippets">
<xs:annotation>
<xs:documentation>
<![CDATA[
Defining reusable list of snippets which can be referenced in templates.
----------------------------------------------------------------------------------
Defining reusable list of snippets which can be referenced in templates.
.. code-block:: xml
<editor>
<snippets>
<list name="reports">
<snippet label="inspire-address">
<gmd:report>...</gmd:report>
</snippet>
<snippet label="inspire-administrative-units">
<gmd:report>...</gmd:report>
</snippet>
</list>
</snippets>
<!-- ... -->
<action type="add" ...>
<template>
<snippets name="reports"/>
<template>
</action>
]]></xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="list">
<xs:complexType>
<xs:attribute name="name" use="required">
<xs:annotation>
<xs:documentation>
<![CDATA[
Snippet list name to be used as a reference.
]]>
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="unbounded" ref="snippet"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="header">
<xs:annotation>
<xs:documentation>
<![CDATA[
Table header row.
]]>
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="unbounded" name="col">
<xs:complexType>
<xs:attribute name="label" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="row">
<xs:annotation>
<xs:documentation>
<![CDATA[
Table column.
]]>
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="unbounded" name="col">
<xs:complexType>
<xs:sequence>
<xs:element ref="directiveAttributes"/>
</xs:sequence>
<xs:attribute name="xpath" type="xs:string" use="optional"/>
<xs:attribute name="del" type="xs:string" use="optional"/>
<xs:attribute name="orderControl" type="xs:string" use="optional"/>
<xs:attribute name="use" type="xs:string" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" ref="section"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="expanded">
<xs:annotation>
<xs:documentation>
<![CDATA[
In multilingual mode, define which mode the widget should have. If expanded, then one field per
language is displayed below each other. If not, then a button for each language allows to
switch from one language to another.
]]>
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="unbounded" ref="name"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="exclude">
<xs:annotation>
<xs:documentation>
<![CDATA[
All fields in ISO could be multilingual. Define element to exclude. TODO: it may be
relevant to have parent defined to have more control over the list.
]]></xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="name" minOccurs="1" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>
<![CDATA[
The element name including its namespace prefix (eg.
gmd:identificationInfo).
]]>
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attribute name="parent" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>
<![CDATA[
The parent element name including its namespace prefix (eg.
gmd:identificationInfo).
]]>
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="ancestor" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>
<![CDATA[
One of the element ancestors name including its namespace prefix (eg.
gmd:identificationInfo).
]]>
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="child" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>
<![CDATA[
The first child name including its namespace prefix (eg.
gmd:identificationInfo).
]]>
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="name" type="xs:string">
<xs:annotation>
<xs:documentation>
<![CDATA[
The element name including its namespace prefix (eg.
gmd:identificationInfo).
]]>
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="for">
<xs:annotation>
<xs:documentation>A field configuration.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="directiveAttributes" minOccurs="0" maxOccurs="1"/>
<xs:element ref="template" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
<xs:attribute name="name" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>
<![CDATA[
The element name including its namespace prefix (eg.
gmd:identificationInfo).
]]>
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute ref="use"/>
<xs:attribute ref="addDirective"/>
<xs:attribute name="xpath" type="xs:string" use="optional"/>
<xs:attribute name="includeFrom" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>
<![CDATA[
Used in for elements in flatModeException to include them from this mode if the parent or xpath of the element is listed in this attribute (comma separated value).
For example, apply flatModeExceptions only to all mcc:description in resource identifier.
.. code-block:: xml
<for name="mcc:description"
includeFrom="/mdb:MD_Metadata/mdb:identificationInfo/mri:MD_DataIdentification/mri:citation/cit:CI_Citation/cit:identifier/mcc:MD_Identifier"/>
]]>
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="excludeFrom" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>
<![CDATA[
Used in for elements in flatModeException to exclude them from this mode if the parent of the element is listed in this attribute (comma separated value).
For example, apply flatModeExceptions to all gmd:contact, except for the ones in gmd:MD_MaintenanceInformation.
.. code-block:: xml
<for name="gmd:contact"
excludeFrom="gmd:MD_MaintenanceInformation"/>
]]>
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="views">
<xs:annotation>
<xs:documentation>
<![CDATA[
Configuring views
-----------------
At least one view MUST be defined, but more view modes can be defined depending on the needs.
By default ISO19139 defines 3 views (i.e. default, advanced, xml) and has one disabled view (i.e. INSPIRE).
See :code:`schemas/iso19139/src/main/plugin/iso19139/layout/config-editor.xml` for the configuration.
.. figure:: ../../user-guide/describing-information/img/view-mode.png
Another basic example is the Dublin Core view (see :code:`schemas/dublin-core/src/main/plugin/dublin-core/layout/config-editor.xml`).
To create a new view, use the following:
.. code-block:: xml
<views>
<view name="viewNameInLocalizationFile">
...
</view>
]]>
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="unbounded" ref="view"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="view">
<xs:annotation>
<xs:documentation>
<![CDATA[
Defining a view
---------------
A view has a label and defines a specific rendering of the metadata records.
A view is composed of one or more tabs.
.. code-block:: xml
<views>
<view name="custom-view">
....
</view>
The view could be displayed or not according to the metadata record content or
the current user session using the `displayIfRecord` and `displayIfServiceInfo` attributes.
]]>
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="1" ref="sidePanel"/>
<xs:element minOccurs="1" maxOccurs="unbounded" ref="tab">
<xs:annotation>
<xs:documentation><![CDATA[
A tab is composed of a set of elements.
]]></xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" ref="flatModeExceptions"/>
<xs:element minOccurs="0" maxOccurs="1" ref="thesaurusList"/>
</xs:sequence>
<xs:attribute name="name" use="required" type="xs:string">
<xs:annotation>
<xs:documentation><![CDATA[
The key of the view name stored in ``{schema}/loc/{lang}/strings.xml`` or the element name with namespace prefix.
.. code-block:: xml
<strings>
<default>Simple</default>
<inspire>INSPIRE</inspire>
<custom-view>My view</custom-view>
]]></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="default" type="xs:boolean" fixed="true">
<xs:annotation>
<xs:documentation><![CDATA[
One default view per schema can be configured. The default tab of the default
view will be used if no tab parameter set. To customize the tab to use
on a per metadata record basis, check the EditorController.js file schemaCustomConfig
function.
]]></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="disabled" type="xs:boolean" fixed="true">
<xs:annotation>
<xs:documentation><![CDATA[
Hide the view from the menu if the attribute is defined. Allows to easily disable a view.
]]></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="class" type="xs:string">
<xs:annotation>
<xs:documentation><![CDATA[
Define custom CSS class to be set on the form element. This is mainly used
to set the type of indent:
* gn-label-above-input: to put label above form input
* gn-indent-colored: colored left border on each fieldset
* gn-indent-bluescale: blue scale colored left border on each fieldset
See `catalog/views/default/less/gn_editor_default.less` to add your custom editor styles.
]]></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="upAndDownControlHidden" type="xs:boolean" fixed="true">
<xs:annotation>
<xs:documentation><![CDATA[
Define if up and down control should be displayed in that view. If not defined, controls are displayed.
Hide those controls in a view to make it easier with less controls for the end-user.
.. figure:: ../../user-guide/describing-information/img/editor-control-updown.png
]]></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="displayAttributes" type="xs:boolean" fixed="true">
<xs:annotation>
<xs:documentation><![CDATA[
Display attributes by default when loading the view.
]]></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="displayTooltips" type="xs:boolean" fixed="true">
<xs:annotation>
<xs:documentation><![CDATA[
Display help documentation for all elements by default when loading the view.
]]></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="displayTooltipsMode">
<xs:annotation>
<xs:documentation><![CDATA[
Display help documentation onfocus (default), onhover or by clicking on an icon.
]]></xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="icon"/>
<xs:enumeration value="onfocus"/>
<xs:enumeration value="onhover"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute ref="displayIfRecord"/>
<xs:attribute ref="displayIfServiceInfo"/>
<xs:attribute name="hideTimeInCalendar" type="xs:boolean" fixed="true">
<xs:annotation>
<xs:documentation><![CDATA[
Define if calendar control should allow users to set date only or
datetime. If the attribute is not set, then date and datetime can be set. This is controlled at the view level,
switching to another view may allow more control over the dates.
]]></xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:unique name="uniqueTabName">
<xs:selector xpath="tab"/>
<xs:field xpath="@id"/>
</xs:unique>
</xs:element>
<xs:element name="sidePanel">
<xs:annotation>
<xs:documentation><![CDATA[
Defining the side panel configuration
-------------------------------------
The side panel can be composed of text element or directives.
A good default config with all directives is:
.. code-block:: xml
<sidePanel>
<directive gn-geo-publisher=""
data-ng-if="gnCurrentEdit.geoPublisherConfig"
data-config="{{gnCurrentEdit.geoPublisherConfig}}"
data-lang="lang"/>
<directive data-gn-validation-report=""/>
<directive data-gn-suggestion-list=""/>
<directive data-gn-need-help="creating-metadata"/>
<directive data-gn-onlinesrc-list=""
types="thumbnail|onlinesrc|parent|dataset|service|source|sibling|associated|fcats"/>
</sidePanel>
For the online source panel, the list of choices can be overridden with a "config-id" attribute
pointing to a JSON configuration file in config/associated-panel. This file allows to customize
the list of type of link user can set by defining for each type the list of fields to display and
default values for fields (eg. protocol, function, application profile).
.. code-block:: xml
<directive data-gn-onlinesrc-list=""
types="thumbnail|onlinesrc|parent|dataset|service|source|sibling|associated|fcats"
config-id="remotesensing"/>
</sidePanel>
To include text block use the following:
.. code-block:: xml
<sidePanel>
<text ref="defaultviewdesc"></text>
....
For overview, a simple manager can be used or the general one:
.. code-block:: xml
<!-- Simple overview manager + online source manger for other types
Limit the max number of overviews with data-number-of-overviews="3" attribute.
In the full view, editor can access and manage the file store and
thumbnail name and description not supported by the overview manager.
-->
<directive data-gn-overview-manager=""/>
<directive data-gn-onlinesrc-list=""
data-types="onlinesrc|parent|dataset|service|source|sibling|associated|fcats"/>
<!-- General online source manager
<directive data-gn-onlinesrc-list=""/>
-->
]]>
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="text"/>
<xs:element ref="directive"/>
<xs:element ref="section"/>
</xs:choice>
</xs:complexType>
</xs:element>
<xs:element name="tab">
<xs:annotation>
<xs:documentation><![CDATA[
Defining a tab
--------------
A view contains at least one tab. In that case it will be the default tab to display and no
top toolbar will be displayed to switch from one tab to another.
.. figure:: ../../user-guide/describing-information/img/editor-tab-switcher.png
Add custom view with one default tab and a field for the title:
.. code-block:: xml
<views>
<view name="custom-view">
<tab id="custom-tab" default="true">
<section>
<field xpath="/gmd:MD_Metadata/gmd:identificationInfo/*/gmd:citation/*/gmd:title"/>
</section>
</tab>
</view>
]]></xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:choice>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="text"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="directive"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="section">
<xs:annotation>
<xs:documentation><![CDATA[
For each section a fieldset is created.
]]></xs:documentation>
</xs:annotation>
</xs:element>
</xs:choice>
<xs:attribute name="default" type="xs:boolean" fixed="true">
<xs:annotation>
<xs:documentation><![CDATA[
Define if this tab is the default one for the view. Only one tab should be the default in a view.
]]></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="id" use="required" type="xs:string">
<xs:annotation>
<xs:documentation><![CDATA[
The tab key used in URL parameter to activate that tab. The key is also use for the tab label as defined in ``{schema}/loc/{lang}/strings.xml``.
It has to be unique for all views. A good practice is to use same prefix for all tabs in the same view.
]]></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute ref="mode"/>
<xs:attribute ref="displayIfRecord"/>
<xs:attribute ref="displayIfServiceInfo"/>
<xs:attribute name="hideIfNotDisplayed" fixed="true" type="xs:boolean">
<xs:annotation>
<xs:documentation><![CDATA[
Define if the tab should be hidden (and not disabled only) if not displayed based on display rules.
]]></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="toggle" fixed="true" type="xs:boolean">
<xs:annotation>
<xs:documentation><![CDATA[
Define if the tab should be displayed as a dropdown menu instead of a tab. This is used for advanced
section, which is not used often by the end-user. More than one tab could be grouped in that dropdown tab menu.
]]></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="formatter-order" type="xs:int">
<xs:annotation>
<xs:documentation><![CDATA[
Define the ordering index of this tab in the XSLT formatter (Note used for editor).
]]></xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="flatModeExceptions">
<xs:annotation>
<xs:documentation><![CDATA[
Configuring complex element display
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Elements to apply "flat" mode exceptions. By default,
"flat" mode does not display elements containing only children and no values.
Use `or` and `in` attributes to display non-existing elements.
To display the `gmd:descriptiveKeywords` element even if it does not exist in the metadata
record, or if the field should be displayed to enable the user to add new occurrences:
.. code-block:: xml
<field
xpath="/gmd:MD_Metadata/gmd:identificationInfo/*/gmd:descriptiveKeywords/*/gmd:keyword"
or="keyword"
in="/gmd:MD_Metadata/gmd:identificationInfo/*/gmd:descriptiveKeywords/*"/>
</tab>
<!-* Elements that should not use the "flat" mode -->
<flatModeExceptions>
<for name="gmd:descriptiveKeywords" />
</flatModeExceptions>
</view>
]]></xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="unbounded" ref="for"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="thesaurusList">
<xs:annotation>
<xs:documentation><![CDATA[
Customizing thesaurus
~~~~~~~~~~~~~~~~~~~~~
To configure:
* the type of transformations (eg. to-iso19139-keyword, to-iso19139-keyword-with-anchor - see convert/thesaurus-transformation.xsl in each plugins),
* the number of keywords allowed,
* if the widget has to be displayed in a fieldset or as simple field
* if the concept relationships are browsable (enable by default)
e.g. only 2 INSPIRE themes:
.. code-block:: xml
<thesaurusList>
<thesaurus key="external.theme.httpinspireeceuropaeutheme-theme"
maxtags="2"
fieldset="false"
transformations=""/>