[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: netCDF DTD



>To: address@hidden
>From: Joe Van Andel <address@hidden>
>Subject: Re: 20000424: netCDF DTD
>Organization: NCAR/ATD
>Keywords: XML, DTD

Hi Joe,

> I've exchanged email with  Robert E. McGrath <address@hidden>
> regarding XML and netCDF.
> 
> He's done an experiment translating netCDF to HDF5, described here:
> 
> http://hdf.ncsa.uiuc.edu/HDF5/XML/nctoh5/writeup.htm
> 
> He tells me that he was using an unofficial DTD for netCDF, but that
> Unidata may be working on an "official" DTD for netCDF.  Is anyone
> working on this?

John Caron has developed the appended DTD for netCDF.  He also wrote
"Comparison of 3 NetCDF DTDs" which refers to the McGrath paper and
describes the differences among the existing DTDs.  I can't find a
reference to an online version of his comparison, so I'll CC: him on
this reply, hoping he can provide it.

We can't really call John's DTD an "official DTD" for netCDF yet,
because:

 - there is no ncdump/ncgen software such as Bear Giles provided that
   converts between the binary representation and the conforming XML
   representation;
 - we think it might be better to use XML Schema instead of a DTD to
   constrain this representation;
 - there might be use for multiple XML representations for netCDF data
   for different purposes.

We also need to have a way to evolve DTDs for netCDF, since we think
it may be necessary to anticipate changes.

--Russ


<?xml version="1.0" encoding="UTF-8"?>
<!ELEMENT netcdf (file, dimension*, variable*, attribute*)>
<!ATTLIST netcdf
        xmlns CDATA #FIXED 
"http://www.unidata.ucar.edu/staff/caron/xml/netcdf.dtd";
>
<!-- file -->
<!ELEMENT file EMPTY>
<!ATTLIST file
        name CDATA #REQUIRED
>
<!-- dimension -->
<!ELEMENT dimension EMPTY>
<!ATTLIST dimension
        name ID #REQUIRED
        length CDATA #REQUIRED
        isUnlimited (true | false) "false"
        hasCoordinateVariable (true | false) #IMPLIED
>
<!-- variable -->
<!ELEMENT variable (dimensions, attribute*)>
<!ATTLIST variable
        name CDATA #REQUIRED
        type (double | float | int | short | byte | char) #REQUIRED
        isCoordinateVariable (true | false) #IMPLIED
>
<!ELEMENT dimensions EMPTY>
<!ATTLIST dimensions
        idrefs IDREFS #REQUIRED
>
<!-- attributes -->
<!ELEMENT attribute (value*)>
<!ATTLIST attribute
        name CDATA #REQUIRED
        type (String | Number) #REQUIRED
        value CDATA #IMPLIED
>
<!ELEMENT value (#PCDATA)>