| 51 | === Translation of metadata schema labels === |
| 52 | ==== Main principles ==== |
| 53 | |
| 54 | A schema element could be defined using the following structure: |
| 55 | {{{ |
| 56 | <element name="elementNameWithNamespace" context=""> |
| 57 | <label>TheLabel</label> |
| 58 | <description>TheDefinition</description> |
| 59 | <condition/> |
| 60 | <help/> |
| 61 | </element> |
| 62 | }}} |
| 63 | |
| 64 | Required: |
| 65 | * name attribute |
| 66 | * label |
| 67 | Optional: |
| 68 | * context attribute (mainly/only used for ISO and ISO profil) |
| 69 | * description |
| 70 | * condition |
| 71 | * help |
| 72 | |
| 73 | TODO : Condition should probably be replaced only by schematron warning. |
| 74 | |
| 75 | |
| 76 | ==== ISO 19139 and ISO profil mechanism ==== |
| 77 | Title of element and tooltip are created using labels.xml localisation file. |
| 78 | For ISO 19139 record, only the web/geonetwork/xml/schemas/iso19139/loc/ directory is used using the GUI language. |
| 79 | For ISO profil help is first searched in: |
| 80 | * with context (ie. context is the class where the element is defined) in web/geonetwork/xml/schemas/iso19139.abc/loc/ |
| 81 | * with no context in web/geonetwork/xml/schemas/iso19139.abc/loc/ |
| 82 | * if not found search the iso19139 main help with context and if not without in web/geonetwork/xml/schemas/iso19139/loc/ |
| 83 | |
| 84 | ===== Context mechanism ===== |
| 85 | In the ISO, an element could be used in different places (eg. gmd:language is used in gmd:MD_Metadata and gmd:MD_DataIdentification). |
| 86 | To make the label of this element depending on its context (ie. its parent), use the context attribute in the element. |
| 87 | |
| 88 | {{{ |
| 89 | <element name="gmd:language" context="gmd:MD_Metadata" id="3.0"> |
| 90 | <label>Metadata language</label> |
| 91 | <description>Language used for documenting metadata</description> |
| 92 | <condition>conditional</condition> |
| 93 | </element> |
| 94 | <element name="gmd:language" context="gmd:MD_DataIdentification" id="39.0"> |
| 95 | <label>Language</label> |
| 96 | <description>Language(s) used within the dataset</description> |
| 97 | <help>language(s) used within the dataset</help> |
| 98 | <_condition>Mandatory</_condition> |
| 99 | </element> |
| 100 | <element name="gmd:language" context="gmd:MD_FeatureCatalogueDescription" id="235.0"> |
| 101 | <label>Language</label> |
| 102 | <description>Language(s) used within the catalogue</description> |
| 103 | </element> |
| 104 | }}} |
| 105 | |