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

Re: catalog schema question: variable element



Hi Darren,

The mixed content for <variable> was added in InvCatalog version 1.0.1 (our current stable release). Looks like you are using 1.0.

I'm afraid our announcement of InvCatalog 1.0.1 was rolled up into a TDS release, so it wasn't very visible. AND our documentation didn't all get upgraded to reference 1.0.1. I just fixed the schema URL below in your schemaLocation line, http://www.unidata.ucar.edu/schemas/thredds/InvCatalog.1.0.xsd, to point to the 1.0.1 version. (All changes to the 1.0 line will be backward compatible. Boy, schema and namespace versioning isn't pretty.)

Sorry about that. If your parser is using the schema at that URL it should work now. If a local copy, you'll have to grab the 1.0.1 version.

Ethan


Darren Hardy wrote:
Those semantics would be ideal for me, but I'm getting a validation error when I try it. Here's my variables XML:

<catalog
    version="1.0"
    name="My Catalog"
    expires="2006-12-31T23:59-07:00"
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="CF-1.0">
                <variable
                  name="lat"
                  units="degree_north"
                  vocabulary_name="latitude">latitude</variable>
                <variable
                  name="lon"
                  units="degree_east"
                  vocabulary_name="longitude">longitude</variable>
                <variable
                  name="time"
                  units="days since 1858-11-17 00:00:00"
                  vocabulary_name="time">date in Julian days</variable>
                <variable
                  name="sst"
                  units="degC"
vocabulary_name="sea_surface_temperature">OI Cloud-free SST</variable>
                <variable
                    name="foobar"
                    units="meters"
                    vocabulary_name="unknown">this is foobar</variable>
              </variables>


And the validation error:

[Error] foo.xml:58:65: cvc-complex-type.2.1: Element 'variable' must have no character or element information item [children], because the type's content type is empty. [Error] foo.xml:62:67: cvc-complex-type.2.1: Element 'variable' must have no character or element information item [children], because the type's content type is empty. [Error] foo.xml:66:72: cvc-complex-type.2.1: Element 'variable' must have no character or element information item [children], because the type's content type is empty. [Error] foo.xml:70:89: cvc-complex-type.2.1: Element 'variable' must have no character or element information item [children], because the type's content type is empty. [Error] foo.xml:74:57: cvc-complex-type.2.1: Element 'variable' must have no character or element information item [children], because the type's content type is empty.
foo.xml: 889 ms (35 elems, 51 attrs, 0 spaces, 703 chars)

And here's the .xsd section from InvCatalog.1.0.xsd:

  <xsd:element name="variable">
      <xsd:complexType>
        <xsd:attribute name="name"  type="xsd:string" use="required"/>
<xsd:attribute name="vocabulary_name" type="xsd:string" use="required"/>
        <xsd:attribute name="units" type="xsd:string" />
      </xsd:complexType>
  </xsd:element>

Thanks,
-Darren



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

--
Ethan R. Davis                                Telephone: (303) 497-8155
Software Engineer                             Fax:       (303) 497-8690
UCAR Unidata Program Center                   E-mail:    address@hidden
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
===============================================================================