Schema definitions for some useful data types for use in XML files.
- Author
- T. Paul
The following XML data types are defined in AugerSchemaTypes.xsd
- unsigned31BitInt an integer between 0 and 2^31-1
- nonNegativeDouble a double >= 0.0
- positiveDouble a double> 0.0
- doubleWithUnit requires the unit attribute
<energy
unit=
"GeV"> 10 </energy>
- nonNegativeDoubleWithUnit combination of above
- positiveDoubleWithUnit combination of above
- listOfDoubles arbitrarily long list of doubles
<doubles> 1.1 2.2 3.3 4.4 5.5 </doubles>
- listOfDoublesWithUnits list requiring the unit attribute
<energies unit="GeV"> 1 2 3 4 5 </energies>
- listOfInts arbitrarily long list of ints
- listOfPositiveInts combination of above
- listOfNonNegativeInts combination of above
- listOfStrings arbitrarily long list of strings
<animals> cat goat tapir </animals>
- ThreeVector 3-Vector of doubles
- ThreeVectorWithUnits 3-Vector of doubles, units required
- tabulatedFunction list of x values and y values and an optional scaleY
<func>
<x> 1 2 3 </x>
<y> 4 5 6 </y>
<scaleY> 10 </scaleY>
</func>
- tabulatedFunctionUnitX list of x values and y values, units required in x
<func>
<x unit="meter"> 1 2 3 </x>
<y> 10 20 30 </y>
</func>
- tabulatedFunctionUnitY list of x values and y values, units required in y
<func>
<x> 1 2 3 </x>
<y unit="GeV"> 10 20 30 </y>
</func>
- tabulatedFunctionWithUnits list of x values and y values. units required. example:
<func>
<x unit="s"> 1 2 3 </x>
<y unit="m"> 10 20 30 </y>
</func>
- tabulatedFunctionComplexLgAmpPhase list of x values and y values and y-phase. y can be LgAmp, LgPow or dB. units required. example:
<func>
<x unit="MHz">
0.00 15.0 25.0 35.0 45.0 55.0 65.0 75.0 85.0 95.0 105.0 4000.0
</x>
<dB>
-20.0 -20.0 -20.0 -20.0 20.0 20.0 25.0 20.0 20.0 20.0 -30.0 -50.0
</dB>
<Phase unit="radian">
0.200 0.30 0.40 0.50 0.55 0.56 0.57 0.58 0.59 0.60 0.610 1.00
</Phase>
</func>
- bool please use this bool rather than the schema namespace boolean to avoid confusion during casting. (The XML schema namespace bool allows true and false as well as 1 and 0, which can easily be misinterpreted during parsing)
- YesNo takes either "yes" or "no" as content
- OnOff takes either "on" or "off" as content
- dateTime should be used for TimeStamp-like data since it can specify date and time including nanoseconds. For example:
<eventTime> 2004-01-01T04:33:12.000000013 </eventTime>
- function can be used as a much more general from of doubleWithUnit. Units and math expressions are allowed. The value is evaluated at run time. This is not optimized for speed, but for flexibility.
<avgXmax variables=
"E D10"> 500*
g/
cm2 + (log10(E/
eV)-19) * D10 </avgXmax>
Definition in file AugerSchemaTypes.dox.