Re: catalog schema question: variable element

Hi Darren,

Quite right, you certainly can have multiple <variables> elements.

My mistake, I was misreading the schema.

Sorry about that.

Ethan

Darren Hardy wrote:
Yes, I'm trying to write validate catalog.xml files that will work with THREDDS tools, but will also be a data source for a digital library system that we're using.

I'm looking at the 1.0 schema but I don't see that restriction:

  http://www.unidata.ucar.edu/schemas/thredds/InvCatalog.1.0.xsd

To test, I grabbed a working catalog:

http://motherlode.ucar.edu:8080/thredds/catalog/nexrad/level2/KVWX/20060809/catalog.xml

Then, I added a second variables section, like so:

<catalog xmlns="http://www.unidata.ucar.edu/namespaces/thredds/InvCatalog/v1.0";
    xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:schemaLocation="http://www.unidata.ucar.edu/namespaces/thredds/InvCatalog/v1.0 http://www.unidata.ucar.edu/schemas/thredds/InvCatalog.1.0.xsd";>

....

      <variables vocabulary="DIF">
<variable name="Reflectivity" vocabulary_name="EARTH SCIENCE &gt; Spectral/Engineering &gt; Radar &gt; Radar Reflectivity" units="db" /> <variable name="Velocity" vocabulary_name="EARTH SCIENCE &gt; Spectral/Engineering &gt; Radar &gt; Doppler Velocity" units="m/s" /> <variable name="SpectrumWidth" vocabulary_name="EARTH SCIENCE &gt; Spectral/Engineering &gt; Radar &gt; Doppler Spectrum Width" units="m/s" />
      </variables>

      <variables vocabulary="human-readable">
<variable name="foobar" vocabulary_name="blah blah blah" units="db" />
      </variables>

....
</catalog>

and it passed a Xerces validation of it.



-Darren

--
Darren Hardy
Ph.D. Student
Bren School of Environmental Science & Management
University of California, Santa Barbara
dhardy@xxxxxxxxxxxxx
www.bren.ucsb.edu/~dhardy

On Aug 9, 2006, at 12:23 PM, Ethan Davis wrote:

Hi Darren,

Darren Hardy wrote:
Ok, so I could use two <variables> elements to provide all these descriptions, like so:

<variables vocabulary="CF-1.0">
<variable name="SST" vocabulary_name="sea_surface_temperature" units="degC"/>
   <!-- Foobar omitted because it does not have a CF standard_name -->
</variables>

<variables vocabulary="human-readable">
<variable name="SST" vocabulary_name="OI Cloud-free SST, blah blah blah" units="degC"/> <variable name="Foobar" vocabulary_name="My foobar variable" units="m" />
</variables>

It looks like the catalog schema provides for multiple variables elements, so this would work for me.
Currently, the schema only allows one <variables> element per dataset. The schema defines it like this

     <xsd:element ref="variables"/>

and the default for the minOccurs and maxOccurs attributes is one. So, I don't think a catalog with a <dataset> element that had two child <variables> elements would validate.

How are you planning on your catalog being used? Are you trying to feed this information into another system?

Ethan

--Ethan R. Davis Telephone: (303) 497-8155
Software Engineer                             Fax:       (303) 497-8690
UCAR Unidata Program Center                   E-mail:    edavis@xxxxxxxx
P.O. Box 3000
Boulder, CO 80307-3000 http://www.unidata.ucar.edu/ ---------------------------------------------------------------------------


===============================================================================
To unsubscribe thredds, visit:
http://www.unidata.ucar.edu/mailing-list-delete-form.html
===============================================================================


--
Ethan R. Davis                                Telephone: (303) 497-8155
Software Engineer                             Fax:       (303) 497-8690
UCAR Unidata Program Center                   E-mail:    edavis@xxxxxxxx
P.O. Box 3000
Boulder, CO  80307-3000                       http://www.unidata.ucar.edu/
---------------------------------------------------------------------------


==============================================================================
To unsubscribe thredds, visit:
http://www.unidata.ucar.edu/mailing-list-delete-form.html
==============================================================================


  • 2006 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the thredds archives: