<?xml version="1.0" encoding="UTF-8"?>
<grammar xmlns:jmd="http://www.gisc.kishou.go.jp/xsd/jmd0.1" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
  <start>
    <a:documentation>jmd0.1 - JMA's simple schema for WIS Discovery Metadata
revisions:
* 2014-06-27: charset added for support of WMO Core Metadata Profile v1.3
* 2011-07-30: widely-advertised version</a:documentation>
    <element name="jmd:metadata">
      <interleave>
        <zeroOrMore>
          <attribute>
            <a:documentation>this too liberal rule is intended for XSD schemaLocation etc.</a:documentation>
            <anyName/>
          </attribute>
        </zeroOrMore>
        <optional>
          <element name="jmd:mduuid">
            <a:documentation>UUID computed from serialized XML representation of this record.
Intended for storage management purpose.
Semantic comparison of two jmd:metadata records should
ignore this field.</a:documentation>
            <data type="token"/>
          </element>
        </optional>
        <optional>
          <element name="jmd:mdfid">
            <a:documentation>Metadata file identifier.
Should be named globally unique.
Declared optional for situations such as drafting process,
but is [Mandatory] for published metadata.</a:documentation>
            <data type="string"/>
          </element>
        </optional>
        <element name="jmd:wisorg">
          <a:documentation>Organization name of contact for metadata.
In WIS, it's name of the WIS Centre that has created the metadata.
Hence this is a property of metadata, not of dataset. 
Full spelled name in English is preferred to acronyms or
abbreviation unless the word is clearly understood in entire WIS.
[Mandatory]</a:documentation>
          <data type="string"/>
        </element>
        <oneOrMore>
          <element name="jmd:wiscont">
            <a:documentation>URLs as conctact for metadata.
In WIS, it should be any dereferencable URI
that can be used to make contact to the WIS Centre.
Schemes mailto:, http:, tel:, or fax: are supported.
Thre is no limitation on number, except that 
http: URL cannot be given more than once for ISO 19115 compatibility.
[Mandatory]</a:documentation>
            <data type="anyURI"/>
          </element>
        </oneOrMore>
        <optional>
          <element name="jmd:orgorg">
            <a:documentation>Organization name of contact for data content.
This is a property of dataset, not of metadata.
Full spelled name in English is preferred to acronyms or
abbreviation unless those words are understood in entire WIS.
If the element is missing jmd:wisorg is used instead.</a:documentation>
            <data type="string"/>
          </element>
        </optional>
        <zeroOrMore>
          <element name="jmd:orgcont">
            <a:documentation>URLs as conctact for data content
Schemes mailto:, http:, tel:, or fax: are expected.
Thre is no limitation on number, except that
http: URL cannot be given more than once for ISO 19115 compatibility.
If the element is missing jmd:wiscont is used instead.</a:documentation>
            <data type="anyURI"/>
          </element>
        </zeroOrMore>
        <element name="jmd:mddate">
          <a:documentation>The timestamp or date when this metadata record is made.
[Mandatory]</a:documentation>
          <choice>
            <data type="date"/>
            <data type="dateTime"/>
          </choice>
        </element>
        <optional>
          <element name="jmd:mdcycle">
            <a:documentation>Frequency at which metadata (not the data content)
is expected to be updated.</a:documentation>
            <ref name="jmdDataFrequencyCode"/>
          </element>
        </optional>
        <zeroOrMore>
          <element name="jmd:subjkey">
            <a:documentation>Subject Keywords
Word or short phrase that describes the discipline or
field of learning of the dataset.
Use of code list "jmdTopicCategoryCode" is strongly recommended.
This is optional for backward compatibility but is [Mandatory]
for WCMP compliance.</a:documentation>
            <choice>
              <ref name="jmdTopicCategoryCode"/>
              <data type="token"/>
            </choice>
          </element>
        </zeroOrMore>
        <element name="jmd:title">
          <a:documentation>Title of the dataset
Some DAR catalogue displays only titles of the search result, thus it should be as descriptive as possible, while it is less useful to extend it more than one line. Rule of thumb: the text that exceeds 80 characters is suggested to be written in abstract.
[Mandatory]</a:documentation>
          <data type="string"/>
        </element>
        <element name="jmd:abstract">
          <a:documentation>Abstract.
Narrative description of the dataset. The more information is more welcomed. Even duplicated information (such as geographic domain or thematic content) is useful, since typical DAR catalogue displays titles and abstracts in the search result.
[Mandatory]</a:documentation>
          <data type="string"/>
        </element>
        <zeroOrMore>
          <element name="jmd:themekey">
            <a:documentation>Thematic keywords.
Word or phrase that describe the theme or content of the dataset, such as physical quantity, weather phenomenon, observation type or data processing.  Multiple phrases for multiple concept should be stored in separate &lt;jmd:themekey&gt; elements.  Metadata creator/manager is advised not to spend too much effort to make the keyword list complete.  Five or ten keywords should be enough for data discovery by users in other disciplines.
No specific controlled vocabulary has been assigned.
It is too liberal and new restriction may apply in the future.</a:documentation>
            <data type="token"/>
          </element>
        </zeroOrMore>
        <zeroOrMore>
          <element name="jmd:southbc">
            <a:documentation>Latitude of southern end of the geographical bounding box
WGS 84 is assumed as CRS [cf: Rec 1 WMO/CBS-Ext.(06)],
but DAR does not require high precision.
Even ten-degree range is welcomed for mobile observation.
Multiple use is currently not recommended
since its portability is unclear.
Units must be degree and must be shown explicitly.
Acceptable range: -90 to 90, northward positive (cf. ISO 19115).</a:documentation>
            <data type="float"/>
            <attribute name="units">
              <value>deg</value>
            </attribute>
          </element>
        </zeroOrMore>
        <zeroOrMore>
          <element name="jmd:northbc">
            <a:documentation>Latitude of northern end of the geographical bounding box
WGS 84 is assumed as CRS [cf: Rec 1 WMO/CBS-Ext.(06)],
but DAR does not require high precision.
Even ten-degree range is welcomed for mobile observation.
Multiple use is currently not recommended
since its portability is unclear.
Units must be degree and must be shown explicitly.
Acceptable range: -90 to 90, northward positive (cf. ISO 19115).</a:documentation>
            <data type="float"/>
            <attribute name="units">
              <value>deg</value>
            </attribute>
          </element>
        </zeroOrMore>
        <zeroOrMore>
          <element name="jmd:westbc">
            <a:documentation>Longitude of western end of the geographical bounding box
WGS 84 is assumed as CRS [cf: Rec 1 WMO/CBS-Ext.(06)],
but DAR does not require high precision.
Even ten-degree range is welcomed for mobile observation.
Multiple use is currently not recommended
since its portability is unclear.
Units must be degree and must be shown explicitly.
Acceptable range: -180 to 180, eastward positive (cf. ISO 19115).</a:documentation>
            <data type="float"/>
            <attribute name="units">
              <value>deg</value>
            </attribute>
          </element>
        </zeroOrMore>
        <zeroOrMore>
          <element name="jmd:eastbc">
            <a:documentation>Longitude of eastern end of the geographical bounding box
WGS 84 is assumed as CRS [cf: Rec 1 WMO/CBS-Ext.(06)],
but DAR does not require high precision.
Even ten-degree range is welcomed for mobile observation.
Multiple use is currently not recommended
since its portability is unclear.
Units must be degree and must be shown explicitly.
Acceptable range: -180 to 180, eastward positive (cf. ISO 19115).</a:documentation>
            <data type="float"/>
            <attribute name="units">
              <value>deg</value>
            </attribute>
          </element>
        </zeroOrMore>
        <zeroOrMore>
          <element name="jmd:placekey">
            <a:documentation>Geographical keywords to describe the horizontal extent of data</a:documentation>
            <data type="token"/>
            <optional>
              <attribute name="code">
                <a:documentation>More computer-friendly notation of the place.
Currently WMO Station Index (5 digits) and
ICAO location identifier (4 uppercase letters) are recognised.</a:documentation>
                <data type="token"/>
              </attribute>
            </optional>
          </element>
        </zeroOrMore>
        <zeroOrMore>
          <element name="jmd:horizres">
            <a:documentation>Horizontal resolution of the dataset.
If different grid spacings are used in meridional and zonal directions, use coarser value.</a:documentation>
            <data type="float"/>
            <optional>
              <attribute name="units">
                <a:documentation>Units of horizontal resolution: "deg" is assumed if missing.</a:documentation>
                <choice>
                  <value>deg</value>
                  <value>km</value>
                  <value>m</value>
                </choice>
              </attribute>
            </optional>
          </element>
        </zeroOrMore>
        <zeroOrMore>
          <element name="jmd:stratkey">
            <a:documentation>Vertical location keywords.
Word or short phrase that describes vertical extent of the dataset.
Use of code list "jmdTopicCategoryCode" is enforced for
former Excel version but not here for ISO compatibility. 
It is too liberal and new restriction may apply in the future.</a:documentation>
            <choice>
              <ref name="jmdVerticalExtentCode"/>
              <data type="token"/>
            </choice>
          </element>
        </zeroOrMore>
        <optional>
          <element name="jmd:avail">
            <a:documentation>The time period for which a dataset fragment is available. This element is used when old data is removed after some period of time.  Hence it is nonsense to use it with &lt;jmd:begdate&gt;.</a:documentation>
            <data type="float"/>
            <ref name="att_time_units"/>
          </element>
        </optional>
        <optional>
          <element name="jmd:begdate">
            <a:documentation>The beginning date (and time if appropriate) to which the available data refers.  This element is used when old data is not deleted. Hence it is nonsense to use it with &lt;jmd:avail&gt;.</a:documentation>
            <ref name="weak_datetime_type"/>
          </element>
        </optional>
        <optional>
          <element name="jmd:enddate">
            <a:documentation>The ending date (and time if appropriate) to which the available data refers.  This element is used (1) if no new data is coming, or (2) in case metadata is issued every time the data is updated.</a:documentation>
            <ref name="weak_datetime_type"/>
          </element>
        </optional>
        <optional>
          <element name="jmd:revdate">
            <a:documentation>The actual date when the content of the dataset is updated or released.
Rationale: Some academic data sources issue many versions of the same dataset including the time the data content refers to.  In some cases old versions of the data are not withdrawn and many versions are kept available at the same time to compare the progress of technology.  Hence there is a need to distinguish them and &lt;jmd:begdate&gt; does not work.  Metadata may be managed independently with the dataset so &lt;jmd:mddate&gt; won't work too.</a:documentation>
            <ref name="weak_datetime_type"/>
          </element>
        </optional>
        <optional>
          <element name="jmd:maxftime">
            <a:documentation>Maximum forecast time of the dataset, relative to analysis reference time.
Rationale: Some NWP centre is running many forecast models for different forecast time range.  There is a need to distinguish all the same dataset except for the forecast time period.</a:documentation>
            <data type="float"/>
            <ref name="att_time_units"/>
          </element>
        </optional>
        <optional>
          <element name="jmd:updcycle">
            <a:documentation>Frequency at which the data content (not metadata) is expected to be updated.   This element gives temporal resolution in an approximate sense.  There is no need of guarantee of regular update: for example, you can use "hourly" if hourly observation is done only in daytime or in storm watch.  Similarly an observation three times a day at 00Z, 12Z, 18Z can be described as "6-hourly" (or no problem to use "8-hourly" if it is described as "three times a day").
[near-deprecated]</a:documentation>
            <ref name="jmdDataFrequencyCode"/>
          </element>
        </optional>
        <zeroOrMore>
          <element name="jmd:updtime">
            <a:documentation>Time of the day at which the data is updated or delivered.</a:documentation>
            <data type="time"/>
          </element>
        </zeroOrMore>
        <optional>
          <element name="jmd:charset">
            <a:documentation>character set of the resource.  Needed for data. </a:documentation>
            <ref name="gmd_MD_CharacterSetCode"/>
          </element>
        </optional>
        <zeroOrMore>
          <element name="jmd:format">
            <a:documentation>File format or WMO code form in which the dataset is expressed.
FM number and name for WMO Codes (ex. "FM 92 GRIB" for GRIB).</a:documentation>
            <data type="token"/>
            <optional>
              <attribute name="code">
                <a:documentation>Version number of format.
CBS session for WMO Codes (ex. "XI Ext." for PILOT,
"XI Ext." for GRIB Edition 1, and "XIV" for GRIB Edition 2).</a:documentation>
                <data type="token"/>
              </attribute>
            </optional>
          </element>
        </zeroOrMore>
        <zeroOrMore>
          <element name="jmd:instpat">
            <a:documentation>Instance Pattern.
Regular expression to be matched with filename in GISC Cache,
in order to search dataset fragments from dataset metadata.
This element is designed for globally-distributed data
for which the data originator (NC or DCPC) cannot specify actual URL.
GTS bulletin is assumed to be a file with "T_" form
of WMO Filename Convention.</a:documentation>
            <data type="token"/>
          </element>
        </zeroOrMore>
        <oneOrMore>
          <element name="jmd:url">
            <a:documentation>Dereferencable URI to reach data retrieval facility.
It may be dataset itself, HTML page to navigate inside
a dataset to list fragments, HTML form to request delivery,
or some data service protocol.</a:documentation>
            <data type="anyURI"/>
            <optional>
              <attribute name="org">
                <data type="anyURI"/>
              </attribute>
            </optional>
            <optional>
              <attribute name="cont">
                <data type="anyURI"/>
              </attribute>
            </optional>
          </element>
        </oneOrMore>
        <zeroOrMore>
          <element name="jmd:raccess">
            <a:documentation>Brief description of restriction on data access. 
Value "no restriction" is recommended for dataset with open access.
The reason why this restriction is imposed
is usually out of scope; use other elements in this section instead.</a:documentation>
            <data type="string"/>
          </element>
        </zeroOrMore>
        <zeroOrMore>
          <element name="jmd:audience">
            <a:documentation>Brief description of a group of people
who will be allowed to access the data.  
Distribution Scope Code (GlobalDistribution/RegionalDistribution/
...) is mandatory for GTS data and recommended for other data.</a:documentation>
            <data type="string"/>
          </element>
        </zeroOrMore>
        <zeroOrMore>
          <element name="jmd:rredist">
            <a:documentation>Brief description of the policy of redistribution.
GTSPriority1/2/3/4 must be used for GTS data.</a:documentation>
            <data type="string"/>
          </element>
        </zeroOrMore>
        <zeroOrMore>
          <element name="jmd:ruse">
            <a:documentation>Brief description of the use policy imposed on the dataset.
</a:documentation>
            <data type="string"/>
          </element>
        </zeroOrMore>
        <optional>
          <element name="jmd:idxdate">
            <a:documentation>The date when the metadata is incorporated in DAR catalogue.
Internal purposes</a:documentation>
            <choice>
              <data type="date"/>
              <data type="dateTime"/>
            </choice>
          </element>
        </optional>
        <zeroOrMore>
          <element name="jmd:topicat">
            <a:documentation>Topic category of ISO 19115.
High-level geospatial data thematic classification to assist in the grouping and search of available geospatial datasets.
This is optional for compatibility to versions before 2010-09-15,
and "climatologyMeteorologyAtmosphere" is assumed if none is specified.</a:documentation>
            <ref name="gmd_MD_TopicCategoryCode_Type"/>
          </element>
        </zeroOrMore>
      </interleave>
    </element>
  </start>
  <define name="att_time_units">
    <attribute name="units">
      <choice>
        <value>s</value>
        <value>min</value>
        <value>h</value>
        <value>d</value>
        <value>mon</value>
        <value>a</value>
      </choice>
    </attribute>
  </define>
  <define name="weak_datetime_type">
    <choice>
      <data type="gYear"/>
      <data type="gYearMonth"/>
      <data type="date"/>
      <data type="dateTime"/>
    </choice>
  </define>
  <define name="jmdTopicCategoryCode">
    <a:documentation>Possible values for subject keywrords</a:documentation>
    <choice>
      <value>weatherObservations</value>
      <value>weatherForecasts</value>
      <value>meteorology</value>
      <value>hydrology</value>
      <value>climatology</value>
      <value>landMeteorologyClimate</value>
      <value>synopticMeteorology</value>
      <value>marineMeteorology</value>
      <value>agriculturalMeteorology</value>
      <value>aerology</value>
      <value>marineAerology</value>
      <value>oceanography</value>
      <value>landHydrology</value>
      <value>rocketSounding</value>
      <value>pollution</value>
      <value>waterPollution</value>
      <value>landWaterPollution</value>
      <value>seaPollution</value>
      <value>landPollution</value>
      <value>airPollution</value>
      <value>glaciology</value>
      <value>actinometry</value>
      <value>satelliteObservation</value>
      <value>airplaneObservation</value>
      <value>observationPlatform</value>
      <value>atmosphericComposition</value>
      <value>spaceWeather</value>
    </choice>
  </define>
  <define name="jmdDataFrequencyCode">
    <a:documentation>Extended frequency code to that of ISO 19115,
partly derived from obsolete version 1.0 of WMO Core Profile.
[near-deprecated]</a:documentation>
    <choice>
      <ref name="isoDataFrequencyCode"/>
      <value>1-minute</value>
      <value>5-minute</value>
      <value>10-minute</value>
      <value>15-minute</value>
      <value>30-minute</value>
      <value>2-hourly</value>
      <value>8-hourly</value>
      <value>10-daily</value>
      <value>decadally</value>
      <value>continuous</value>
      <value>continually</value>
      <value>quarterly</value>
      <value>daily 12Z</value>
      <value>irregularly</value>
      <value>irregulaly</value>
      <value>irregulaly AS AVAILABLE</value>
      <value>irregularly AS REQUIRED</value>
      <value>irregulaly AS REQUIRED</value>
    </choice>
  </define>
  <define name="isoDataFrequencyCode">
    <a:documentation>Frequency code defined in ISO 19115
[near-deprecated]</a:documentation>
    <choice>
      <value>continual</value>
      <value>daily</value>
      <value>weekly</value>
      <value>fortnightly</value>
      <value>monthly</value>
      <value>quartely</value>
      <value>biannually</value>
      <value>annually</value>
      <value>asNeeded</value>
      <value>irregular</value>
      <value>notPlanned</value>
      <value>unknown</value>
      <value>hourly</value>
      <value>3-hourly</value>
      <value>6-hourly</value>
      <value>12-hourly</value>
    </choice>
  </define>
  <define name="jmdVerticalExtentCode">
    <a:documentation>Possible values for vertical extent code,
enforced in the former Excel version of the schema.</a:documentation>
    <choice>
      <value>Surface</value>
      <value>Sea surface</value>
      <value>Upper-air</value>
      <value>Surface/Upper</value>
      <value>Ocean</value>
      <value>Troposphere</value>
      <value>Stratosphere</value>
      <value>Top of Atmosphere</value>
    </choice>
  </define>
  <define name="gmd_MD_TopicCategoryCode_Type">
    <a:documentation>Possible values of topicat, defined in ISO 19115.</a:documentation>
    <choice>
      <value>farming</value>
      <value>biota</value>
      <value>boundaries</value>
      <value>climatologyMeteorologyAtmosphere</value>
      <value>economy</value>
      <value>elevation</value>
      <value>environment</value>
      <value>geoscientificInformation</value>
      <value>health</value>
      <value>imageryBaseMapsEarthCover</value>
      <value>intelligenceMilitary</value>
      <value>inlandWaters</value>
      <value>location</value>
      <value>oceans</value>
      <value>planningCadastre</value>
      <value>society</value>
      <value>structure</value>
      <value>transportation</value>
      <value>utilitiesCommunication</value>
    </choice>
  </define>
  <define name="gmd_MD_CharacterSetCode">
    <choice>
      <value>ucs2</value>
      <value>ucs4</value>
      <value>utf7</value>
      <value>utf8</value>
      <value>utf16</value>
      <value>8859part1</value>
      <value>8859part2</value>
      <value>8859part3</value>
      <value>8859part4</value>
      <value>8859part5</value>
      <value>8859part6</value>
      <value>8859part7</value>
      <value>8859part8</value>
      <value>8859part9</value>
      <value>8859part10</value>
      <value>8859part11</value>
      <value>8859part12</value>
      <value>8859part13</value>
      <value>8859part14</value>
      <value>8859part15</value>
      <value>8859part16</value>
      <value>jis</value>
      <value>shiftJIS</value>
      <value>eucJP</value>
      <value>usAscii</value>
      <value>ebcdic</value>
      <value>eucKR</value>
      <value>big5</value>
      <value>GB2312</value>
      <value>8859part7</value>
    </choice>
  </define>
</grammar>
<!-- end -->
