ASCII Data DDX

From OPeNDAP Documentation
Revision as of 21:56, 14 April 2010 by Ndp (talk | contribs)
⧼opendap2-jumptonavigation⧽

Although inefficient, a pure XML data response could be very useful for inferencing engines. I imagine a response in which variables contain their values, much like Attributes. Consider this modified DDX:

<Dataset name="bears.nc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://xml.opendap.org/ns/DAP/3.3#"
>
   <Grid name="bears">
       <Array name="bears">
           <String/>
           <dimension name="i" size="2"/>
           <dimension name="j" size="3"/>
           <value>72.022</value>
           <value>72.184</value>
           <value>72.256</value>
           <value>72.745</value>
           <value>72.297</value>
           <value>72.367</value>
       </Array>
       <Map name="i">
           <Int32/>
           <dimension name="i" size="2"/>
           <value>1</value>
           <value>2</value>
       </Map>
       <Map name="j">
           <Float32/>
           <dimension name="j" size="3"/>
           <value>92</value>
           <value>93</value>
           <value>94</value>
       </Map>
   </Grid>
</Dataset>

We would need to iron out the details of how the element could be organized for the various data types. Possible ideas:

  • Simply use the same ordering and markers we use now in the XDR encoded binary content, and simply produce all of the values as their ASCII versions, suitably encoded for XML content.
  • Develop a structure for the content of the data element that is dependent on it its parents type. So atomic types would have single <value> element. One dimensional arrays would have multiple values elements. We would need to look at a possible more complex structure for multidimensional arrays and for Sequences. Structures and Grids would simply contain types already represented.