About Users Developers |
PropertySpecificationsProperty TableThe <propertyTable> element encloses a list of properties. Each <property> can be specified in a single tag, or can enclose a list of <value>s, as shown below. <propertyTable> <property name = "..."/> <value>...</value> </property> . . <property name = "..." value = "..."/> . . </propertyTable> LocaleThe locale property identifies the location of user (useful for timezone conversions). An example is given below. <property name = "locale" value = "Tucson"/> Instant Input FormatThe Instant Input Format property is used in the parsing of instant temporal literals. Below are listed some examples of temporal literals. September 2000 September 23, 2000 <day>23</day> <other month="September" year="2000"/> <date> <month value = "Jan"/> <day value = "1"/> <year> 1970 </year> </date> The <format> element specifies the general structure of the literal, and idenfities "variable" parts of the literal. The variables are denoted with a $ prefixed, as in XQuery or Perl. The part of the literal matching the variable will be extracted into the variable and then further checked to ensure that it is a proper value by looking it up in a field value tables. Inputs can vary a lot. An attribute in the format stipulates whether an arbitrary amount of whitespace is accepted. Below is an example of a complete format property. <property name="instant input format"> <value> <format>$month $year</format> <format whitespace="no">$month $day, $year</format> <format> <day>$day</day> <other month="$month" year="$year"/> </format> <fieldInfo variable="month" name="month of year" using = "englishMonthNames"/> <fieldInfo variable="day" name="day of month" using="arabicNumeral"/> <fieldInfo variable="year" name="year" using="arabicNumeral"/> </value> </property> The "whitespace" attribute in <format> is set to "no", so the format is not white-space friendly. A temporal literal will be parsed using the structure in the <format>. If the structure matches, then the value of the variables (called a <field> will extracted and compared to the value in the corresponding field value table. A more complete discussion on the parsing and handling of format properties is given elsewhere. Instant Output FormatThis property has a similar format to the Instant Input Format. The one difference is there is no need to include a whitespace attribute. This is same with all other output format properties. Interval Input FormatAn interval is a duration of time. Example of interval literals are given below. <other> <month> 5 </month> </other> <other> <month value ="5" /> </other> 2 years <property name = "interval input format"> <value> <!-- this is the default format for inputs like last example above --> <format> $year </format> <format> $month months </format> <format whitespace = "no">$month months</format> <format> <other month = "$monthName"/> </format> <fieldInfo variable="monthName" name="month" using="englishMonthNames"/> <fieldInfo variable="month" name="month" using="arabicNumeral"/> <fieldInfo variable="year" name="year" using="arabicNumeral"/> </value> </property> Interval Output FormatThe interval output format is similar to the interval input format (see above). Now-Relative Instant Input Format<property name = "now relative instant input format"> <value> <format> $now $direction $interval </format> <!-- refers to property now, name is the name of the property --> <fieldInfo parseValue = "now" name = "now" url = "*.xml"/> <!-- refers to property interval input format --> <importFormat parseValue = "interval" name = "interval input format" url = "*.xml"/> <!-- direction might be either addition "+" or subtraction "-" --> <fieldInfo variable = "direction" name = "directions" using = "directionList"/> </value> </property> Now-Relative Instant Output FormatSimilar to the input format. Period Input FormatExamples period temporal literals are listed below. [ 1776 ] [ July, 1776 ) [ Noon July 3, 1776, Noon July 4, 1970 ) <period> [ <other day = "1" month = "Jan" year = "1970"/> , <other> <day value ="2"/> <month value = "Jan"/> <year value= "1970"/> </other> ] </period> A period format often consists of two instant formats. <property name = "period input format"> <value> <format whitespace = "no"> $leftClosed $instantStart, $instantEnd $rightClosed </format> <format> <period> $leftOpen $instantStart, $instantEnd $rightClosed </period> </format> <importFormat parseValue = "instantStart" name = "instant input format" url = "*.xml"/> <importFormat parseValue = "instantEnd" name = "instant input format" url = "*.xml"/> <fieldInfo variable = "leftClosed" name = "instant period delimiter" using = "periodDelimiterList"/> <fieldInfo variable = "leftOpen" name = "instant period delimiter" using = "periodDelimiterList"/> <fieldInfo variable = "rightClosed" name = "instant period delimiter" using = "periodDelimiterList"/> </value> </property> By using <importFormat> we can specify the instant input format to parse the instants in a period. If the parsing includes indeterminate instants, then indeterminate periods are also handled. Period Output FormatSimilar to input. Indeterminate Instant Input FormatAn indeterminate format can include a "distribution". Examples of indeterminate literals are given below. Jan, 1, 1970 ~ Jan, 2, 1970 <date> <month value = "Jan"/> <day value = "1"/> <year> 1970 </year> </date> ~ Jan, 2, 1970 Jan, 1, 1970 ~ Jan, 2, 1970 with uniform distribution <property name = "indeterminate instant input format"> <value> <format> $lower ~ $upper </format> <format> $lower ~ $upper with $distribution distribution </format> <importFormat parseValue = "lower" name = "instant input format" url = "*.xml"/> <importFormat parseValue = "upper" name = "instant input format" url = "*.xml"/> <!-- Distribution might be optional --> <fieldInfo variable = "distribution" name = "distribution" using = "distributionNames"/> </value> </property> #IndeterminateInstantOutputFormat Indeterminate Instant Output FormatSimilar to input. Override Input EpochThis property sets the input epoch. <property name = "override input epoch" value = "gregorian"/> |