Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • columnId is a reference to a column in the forecast table (see below), usually a parameter,
  • rowId is a reference to a row in the forecast table (see below), usually a location,
  • ifForecastValue indicates a condition based on the value of the published forecast,
  • ifForecastPublicationTime indicates a condition based on the publication time of the forecast,
  • ifForecastPublished indicates a condition based on whether a forecast has been published or not,
  • operator is one of "lt" (less than), "gt" (greater than), "le" (less than or equal to), "ge" (greater than or equal to), "eq" (equal to), "ne" (not equal to), "before", or "after", depending on the type of condition,
  • value is the reference value to compare to; depending on the condition type, this can be an integer/real value, a boolean value, or a date/time value.

...

Code Block
xml
xml
<frame>
   <title>condition example</title>
   <start date="2008-03-13" time="00:01:00"/>
   <stop date="2008-03-13" time="00:02:00"/>
   <popup>true</popup>
   <condition>
      <columnId>water_level</columnId>
      <rowId>Lowestoft</rowId>
      <ifForecastPublished>
         <operator>eq</operator>
         <value>false</value>
      </ifForecastPublished>
   </condition>
   <message>Hurry, the forecast for Lowestoft has not been published yet!</message>
</frame>
<frame>
   <title>condition example</title>
   <start date="2008-03-13" time="00:10:00"/>
   <stop date="2008-03-13" time="00:11:00"/>
   <popup>true</popup>
   <condition>
      <columnId>water_level</columnId>
      <rowId>Lowestoft</rowId>
      <ifForecastPublicationTime>
         <operator>after</operator>
         <value date="2008-03-13" time="00:10:00"/>
      </ifForecastPublicationTime>
   </condition>
   <message>You were quite late with the forecast for Lowestoft</message>
</frame>
<frame>
   <title>condition example</title>
   <start date="2008-03-13" time="00:15:00"/>
   <stop date="2008-03-13" time="00:16:00"/>
   <popup>true</popup>
   <condition>
      <columnId>water_level</columnId>
      <rowId>Lowestoft</rowId>
      <ifForecastValue>
         <operator>ge</operator>
         <value>300</value>
      </ifForecastValue>
   </condition>
   <file>emergency_telephone_call.txt<mp3</file>
</frame>

An event can be associated with a story frame by specifying the file key. Depending on the file type, a suitable application is started for displaying the file (e.g. a pdf-file is displayed in Adobe Reader and the contents of a txt-file is displayed in a message dialog window). The file key has an optional language attribute lang that behaves the same as for the title keys.

...