Martin Desruisseaux created SIS-420:
---------------------------------------

             Summary: Forward references in XML
                 Key: SIS-420
                 URL: https://issues.apache.org/jira/browse/SIS-420
             Project: Spatial Information Systems
          Issue Type: Improvement
          Components: Metadata
    Affects Versions: 0.8, 0.7
            Reporter: Martin Desruisseaux


In a metadata XML document, an element may be replaced by a reference to 
another element. [Example derived from 
catalog.data.gov|https://catalog.data.gov/harvest/object/d2901928-f55b-4ef3-88e9-9de7d3e30554]
 (search {{Level_2}} in that document):

{code:xml}
<gmd:processStep>
  <gmi:LE_ProcessStep>
    <gmd:source xlink:href="#Level_2"/>
  </gmi:LE_ProcessStep>
</gmd:processStep>
<gmd:source>
  <gmd:LI_Source id="Level_2">
      <gmd:description>
          <gco:CharacterString>Source Contribution: The Level 2 data are used 
in processing Level 3 data.</gco:CharacterString>
      </gmd:description>
  <gmd:LI_Source>
</gmd:source>
{code}

Support of such reference has been implemented in SIS-173, but only in the 
cases where the content is defined before {{xlink:href}}. In above example, we 
have the opposite order. Such forward references should be implemented in SIS. 
One possible approach may be to to store the parent object and the property 
name in a {{java.util.Map}} until the definition is found, in which case we can 
use {{AbstractMetadata.asMap()}} for setting the final value.




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to