2.2.5.9 CalendarRule Element

The CalendarRule XML element specifies the calendar parameters for a single calendar event. It is the root element of XML documents that are used in WSRM method parameters, including methods of the IWRMCalendar interface (section 3.2.4.4).

 <xs:element name="CalendarRule"
   minOccurs="0"
   maxOccurs="1"
 > 
   <xs:complexType name="CalendarRule">
     <xs:choice
       minOccurs="1"
       maxOccurs="unbounded"
     >
       <xs:element name="DtStart"
         type="xsd:string"
         minOccurs="1"
         maxOccurs="1"
        />
       <xs:element name="DtEnd"
         type="xsd:string"
         minOccurs="0"
         maxOccurs="1"
        />
       <xs:element name="Freq"
         type="xsd:string"
         minOccurs="1"
         maxOccurs="1"
        />
       <xs:element name="Interval"
         type="xsd:double"
         minOccurs="1"
         maxOccurs="1"
        />
       <xs:element name="ByDay"
         minOccurs="0"
         maxOccurs="1"
       >
         <xs:complexType name="ByDay">
           <xs:sequence
             maxOccurs="unbounded"
             minOccurs="0"
           >
             <xs:element name="Day"
               type="xsd:string"
               minOccurs="0"
               maxOccurs="unbounded"
              />
           </xs:sequence>
         </xs:complexType>
       </xs:element>
       <xs:element name="ByMonthDay"
         minOccurs="0"
         maxOccurs="1"
       >
         <xs:complexType name="ByMonthDay">
           <xs:sequence>
             <xs:element name="MonthDay"
               type="xsd:double"
               minOccurs="0"
               maxOccurs="unbounded"
              />
           </xs:sequence>
         </xs:complexType>
       </xs:element>
       <xs:element name="ByYearDay"
         minOccurs="0"
         maxOccurs="1"
       >
         <xs:complexType name="ByYearDay">
           <xs:sequence>
             <xs:element name="YearDay"
               type="xsd:double"
               minOccurs="0"
               maxOccurs="unbounded"
              />
           </xs:sequence>
         </xs:complexType>
       </xs:element>
       <xs:element name="ByWeekNo"
         minOccurs="0"
         maxOccurs="1"
       >
         <xs:complexType name="ByWeekNo">
           <xs:sequence>
             <xs:element name="WeekNo"
               type="xsd:double"
               minOccurs="0"
               maxOccurs="unbounded"
              />
           </xs:sequence>
         </xs:complexType>
       </xs:element>
       <xs:element name="ByMonth"
         minOccurs="0"
         maxOccurs="1"
       >
         <xs:complexType name="ByMonth">
           <xs:sequence>
             <xs:element name="Month"
               type="xsd:double"
               minOccurs="0"
               maxOccurs="unbounded"
              />
           </xs:sequence>
         </xs:complexType>
       </xs:element>
       <xs:element name="BySetPos"
         minOccurs="0"
         maxOccurs="1"
       >
         <xs:complexType name="BySetPos">
           <xs:sequence>
             <xs:element name="SetPos"
               type="xsd:double"
               minOccurs="0"
               maxOccurs="unbounded"
              />
           </xs:sequence>
         </xs:complexType>
       </xs:element>
     </xs:choice>
   </xs:complexType>
 </xs:element>

Child Elements

Element

Type

Description

DtStart

xsd:string

A string that specifies the calendar start date, in date format (section 2.2.1.3).

DtEnd

xsd:string

A string that specifies the calendar end date, in date format.

Freq

xsd:string

A string that specifies the calendar frequency, expressed as a frequency option (section 2.2.2.5).

Interval

xsd:double

A floating-point value that specifies the interval of the frequency. For example, if the <Freq> value is "weekly" and the <Interval> is "2.0", the frequency is biweekly.

ByDay

ByDay

A specification of calendar occurrence by day of the week.

Day

xsd:string

A string that specifies the day of the week, expressed as a day option (section 2.2.2.4).

<Day> is used in weekly recurring calendars to specify that on a particular day of the week, a calendar event SHOULD be fired.

ByMonthDay

ByMonthDay

A specification of calendar occurrence by day of the month.

MonthDay

xsd:double

A floating-point value that specifies the day of the month, expressed as a value from 1 to 31.

<MonthDay> is used in monthly recurring calendars to specify that on a particular day of the month, a calendar event SHOULD be fired.

ByYearDay

ByYearDay

A specification of calendar occurrence by day of the year.

YearDay

xsd:double

A floating-point value that specifies the day of the year, expressed as a value from 1 to 366.

<YearDay> is used in annually recurring calendars to specify that on a particular day of the year, a calendar event SHOULD be fired.<10>

ByWeekNo

ByWeekNo

A specification of calendar occurrence by week of the year.

WeekNo

xsd:double

A floating-point value that specifies the week of the year, expressed as a value from 1 to 53.

<WeekNo> is used in annually recurring calendars to specify that in a particular week of the year, a calendar event SHOULD be fired.<11>

ByMonth

ByMonth

A specification of calendar occurrence by month of the year.

Month

xsd:double

A floating-point value that specifies the month of the year, expressed as a value from 1 to 12.

<Month> is used in annually recurring calendars to specify that in a particular month of the year, a calendar event SHOULD be fired.

BySetPos

BySetPos

A specification of calendar occurrence by monthly instance of a day of the week.

SetPos

xsd:double

A floating-point value that specifies the monthly instance of a day of the week, expressed as a day modifier (section 2.2.2.3).

<BySetPos> is used with <Day> and <Month> elements in annually recurring calendars to specify that on a particular monthly instance of a day of the week, a calendar event SHOULD be fired.

For example, the following elements specify the second Sunday in January:

  
 <ByDay><Day>Su</Day></ByDay>
 <ByMonth><Month>1</Month></ByMonth>
 <BySetPos><SetPos>2</SetPos></BySetPos>
  

For another example, the following elements specify the last Monday in March:

  
 <ByDay><Day>Mo</Day></ByDay>
 <ByMonth><Month>3</Month></ByMonth>
 <BySetPos><SetPos>-1</SetPos></BySetPos>
  

A calendar event can be triggered by a schedule, such as whenever a specified scheduled event occurs. In such cases, the policy defined by the schedule is assigned the PROFILING value from the MANAGEMENT_TYPE enumeration (section 2.2.3.5).

Additional XML data formats are specified in section 2.2.5.