Simple STC for WhenWhere

Arnold Rots arots at head.cfa.harvard.edu
Tue Apr 26 10:50:38 PDT 2005


I made a few changes to the STC schemata: version 1.22 (though they
have not yet been submitted to the IVOA site.

Here I give some examples with increasing amounts of detail included
in the XML document.
The first example gives the minimum required: definition of name
spaces and schema location; specification of observatory location
and coordinate system through XIncludes since they are likely to be
fixed for any provider.
Parsers need not substitute the contents of the XInclude files, but
can just go by the names since we intend to control those; they may also
choose to completely ignore the XIncludes: where it is of importance
in the rest of the document, it is uniquely identified by the IDREF.

Subsequent examples gradually add more information.  The intent is to
show how the basic frame is fairly simple and how people can add
additional pieces as needed and appropriate.

  - Arnold


This first example only has an empty AstroCoords element in the
ObservationLocation.

  <?xml version="1.0" encoding="UTF-8"?> 
  <ObsDataLocation xmlns="http://www.ivoa.net/xml/STC/stc-v1.22.xsd"
    xmlns:crd="http://www.ivoa.net/xml/STC/STCcoords/v1.22"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xi="http://www.w3.org/2001/XInclude"
    xsi:schemaLocation="http://www.ivoa.net/xml/STC/stc-v1.22.xsd stc-v1.22.xsd"> 

    <xi:include href="KPNO.xml"/> <!-- ObservatoryLocation --> 

    <ObservationLocation ID="TaxTimeEvent"> 
      <xi:include href="ICRS-TT-WAVELENGTH-TOPO.xml"/> <!-- AstroCoordSys --> 
      <crd:AstroCoords coord_system_id="ICRS-TT-WAVELENGTH-TOPO"> 
      </crd:AstroCoords> 
    </ObservationLocation> 

  </ObsDataLocation>


In the second example, we have added Time and Position elements to
AstroCoords, though they are still empty.  We could have chosen to add
only one of them.

  <?xml version="1.0" encoding="UTF-8"?> 
  <ObsDataLocation xmlns="http://www.ivoa.net/xml/STC/stc-v1.22.xsd"
    xmlns:crd="http://www.ivoa.net/xml/STC/STCcoords/v1.22"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xi="http://www.w3.org/2001/XInclude"
    xsi:schemaLocation="http://www.ivoa.net/xml/STC/stc-v1.22.xsd stc-v1.22.xsd"> 

    <xi:include href="KPNO.xml"/>

    <ObservationLocation ID="TaxTimeEvent"> 
      <xi:include href="ICRS-TT-WAVELENGTH-TOPO.xml"/>
      <crd:AstroCoords coord_system_id="ICRS-TT-WAVELENGTH-TOPO"> 
        <crd:Time unit="s"> 
        </crd:Time> 
        <crd:Position2D unit="deg"> 
        </crd:Position2D> 
      </crd:AstroCoords> 
    </ObservationLocation> 

  </ObsDataLocation>


In the third example we added values for the Time and Position
coordinates.  Again, it is perfectly legal to provide only one of the
two.

  <?xml version="1.0" encoding="UTF-8"?> 
  <ObsDataLocation xmlns="http://www.ivoa.net/xml/STC/stc-v1.22.xsd"
    xmlns:crd="http://www.ivoa.net/xml/STC/STCcoords/v1.22"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xi="http://www.w3.org/2001/XInclude"
    xsi:schemaLocation="http://www.ivoa.net/xml/STC/stc-v1.22.xsd stc-v1.22.xsd"> 

    <xi:include href="KPNO.xml"/>

    <ObservationLocation ID="TaxTimeEvent"> 
      <xi:include href="ICRS-TT-WAVELENGTH-TOPO.xml"/>
      <crd:AstroCoords coord_system_id="ICRS-TT-WAVELENGTH-TOPO"> 
        <crd:Time unit="s"> 
          <crd:TimeInstant> 
            <crd:ISOTime>2005-04-15T23:59:59</crd:ISOTime> 
          </crd:TimeInstant> 
        </crd:Time> 
        <crd:Position2D unit="deg"> 
          <crd:Value2>148.88821 69.06529</crd:Value2> 
        </crd:Position2D> 
      </crd:AstroCoords> 
    </ObservationLocation> 

  </ObsDataLocation>


The fourth example has errors added to Time and Position.

  <?xml version="1.0" encoding="UTF-8"?> 
  <ObsDataLocation xmlns="http://www.ivoa.net/xml/STC/stc-v1.22.xsd"
    xmlns:crd="http://www.ivoa.net/xml/STC/STCcoords/v1.22"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xi="http://www.w3.org/2001/XInclude"
    xsi:schemaLocation="http://www.ivoa.net/xml/STC/stc-v1.22.xsd stc-v1.22.xsd"> 

    <xi:include href="KPNO.xml"/>

    <ObservationLocation ID="TaxTimeEvent"> 
      <xi:include href="ICRS-TT-WAVELENGTH-TOPO.xml"/>
      <crd:AstroCoords coord_system_id="ICRS-TT-WAVELENGTH-TOPO"> 
        <crd:Time unit="s"> 
          <crd:TimeInstant> 
            <crd:ISOTime>2005-04-15T23:59:59</crd:ISOTime> 
          </crd:TimeInstant> 
          <crd:Error>1.0</crd:Error> 
        </crd:Time> 
        <crd:Position2D unit="deg"> 
          <crd:Value2>148.88821 69.06529</crd:Value2> 
          <crd:Error2Radius>0.1</crd:Error2Radius> 
        </crd:Position2D> 
      </crd:AstroCoords> 
    </ObservationLocation> 

  </ObsDataLocation>


The fifth (and last) example adds spectral information to the
document.

  <?xml version="1.0" encoding="UTF-8"?> 
  <ObsDataLocation xmlns="http://www.ivoa.net/xml/STC/stc-v1.22.xsd"
    xmlns:crd="http://www.ivoa.net/xml/STC/STCcoords/v1.22"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xi="http://www.w3.org/2001/XInclude"
    xsi:schemaLocation="http://www.ivoa.net/xml/STC/stc-v1.22.xsd stc-v1.22.xsd"> 

    <xi:include href="KPNO.xml"/>

    <ObservationLocation ID="TaxTimeEvent"> 
      <xi:include href="ICRS-TT-WAVELENGTH-TOPO.xml"/>
      <crd:AstroCoords coord_system_id="ICRS-TT-WAVELENGTH-TOPO"> 
        <crd:Time unit="s"> 
          <crd:TimeInstant> 
            <crd:ISOTime>2005-04-15T23:59:59</crd:ISOTime> 
          </crd:TimeInstant> 
          <crd:Error>1.0</crd:Error> 
        </crd:Time> 
        <crd:Position2D unit="deg"> 
          <crd:Value2>148.88821 69.06529</crd:Value2> 
          <crd:Error2Radius>0.1</crd:Error2Radius> 
        </crd:Position2D> 
        <crd:Spectral unit="nm"> 
          <crd:Value>460</crd:Value> 
          <crd:Resolution>40</crd:Resolution> 
        </crd:Spectral> 
      </crd:AstroCoords> 
    </ObservationLocation> 

  </ObsDataLocation>

--------------------------------------------------------------------------
Arnold H. Rots                                Chandra X-ray Science Center
Smithsonian Astrophysical Observatory                tel:  +1 617 496 7701
60 Garden Street, MS 67                              fax:  +1 617 495 7356
Cambridge, MA 02138                             arots at head.cfa.harvard.edu
USA                                     http://hea-www.harvard.edu/~arots/
--------------------------------------------------------------------------



More information about the voevent mailing list