# Date for generating Section/Page/Header/Code in Survey Tool and elsewhere.
# IMPORTANT: 
# Be careful, order matters. It is used to determine the order on the page and in menus. Also, be sure to put longer matches first, unless terminated with $. 
# The quoting of \[ is handled automatically, as is alt=X
# If you add new paths, change @type="..." => @type="%A"
# The syntax &function(data) means that a function generates both the string and the ordering. The functions MUST be supported in PathHeader.java
# The only function that can be in Page right now are &metazone and &calendar, and NO functions can be in Section
# A * at the front (like *$1) means to not change the sorting group.

# VARIABLES
%A = ([^"]*+)
%B = ([^"/]*+)
%E = ([-a-zA-Z_]*)
%H = ([hH])
%L = (long|short|narrow)
%P = (future|past)
%S = ([^/]*+)
%T = (millisecond|second|minute|hour|day|week|month|year)
%W = (temperature|pressure)

#RULES
//ldml/identity/%E[@type="%A"]    ; Special ; Identity ; $1 ; $2 ; HIDE
//ldml/identity/version                 ; Special ; Version ; null ; version ; HIDE
//ldml/identity/generation                 ; Special ; Version ; null ; generation ; HIDE

# default items need to be deprecated but haven't been yet.
//ldml/(.*)/default$         ; Special ; Suppress ; Default ; $1 ; HIDE
//ldml/(.*)/alias$           ; Special ; Suppress ; Alias ; $1 ; HIDE

### Core Data
//ldml/characters/exemplarCharacters$                       ; Core Data ; Alphabetic Information ; Characters in Use ; Main Letters; READ_ONLY
//ldml/characters/exemplarCharacters[@type="%A"]            ; Core Data ; Alphabetic Information ; Characters in Use ; Others: $1; READ_ONLY

//ldml/numbers/(default)NumberingSystem                     ; Core Data ; Numbering Systems ; Numbering System ; $1 ; READ_ONLY
//ldml/numbers/otherNumberingSystems/(%E)                   ; Core Data ; Numbering Systems ; Numbering System ; $1 ; READ_ONLY

### Locale Display Names
//ldml/localeDisplayNames/localeDisplayPattern/%E              ; Locale Display Names ; Locale Name Patterns ; Locale Formatting ; &localePattern($1)
//ldml/localeDisplayNames/codePatterns/codePattern[@type="%A"] ; Locale Display Names ; Locale Name Patterns ; Locale Field Fallbacks ; $1
//ldml/localeDisplayNames/languages/language[@type="%A"]       ; Locale Display Names ; Languages ; &scriptFromLanguage($1) ; $1
//ldml/localeDisplayNames/scripts/script[@type="%A"]           ; Locale Display Names ; Scripts ; &categoryFromScript($1) ; $1
//ldml/localeDisplayNames/territories/territory[@type="%A"]    ; Locale Display Names ; Territories ; &categoryFromTerritory($1) ; $1
//ldml/localeDisplayNames/variants/variant[@type="%A"]         ; Locale Display Names ; Locale Variants ; null ; $1
//ldml/localeDisplayNames/keys/key[@type="%A"]                 ; Locale Display Names ; Keys ; $1 ; $1
//ldml/localeDisplayNames/types/type[@type="%A"][@key="%A"]    ; Locale Display Names ; Keys ; *$2 ; $2-$1

### Date & Time Formatting
//ldml/dates/fields/field[@type="%A"]/displayName                           ; DateTime ; Fields ; Date Fields ; &datefield($1)
//ldml/dates/fields/field[@type="%A"]/relative[@type="%A"]                  ; DateTime ; Fields ; &relativeDate($1) ; &numericSort($2)
//ldml/dates/fields/field[@type="%T"]/relativeTime[@type="%P"]/relativeTimePattern[@count="%A"] ; DateTime ; Fields ; &relativeDate($1) ; &count($2-$3)

//ldml/dates/calendars/calendar[@type="%A"]/eras/eraAbbr/era[@type="%A"]                                                        ; DateTime ; &calendar($1) ; &calField(Eras:abbreviated:none) ; $2
//ldml/dates/calendars/calendar[@type="%A"]/eras/eraNames/era[@type="%A"]                                                       ; DateTime ; &calendar($1) ; &calField(Eras:wide:none) ; $2
//ldml/dates/calendars/calendar[@type="%A"]/eras/eraNarrow/era[@type="%A"]                                                      ; DateTime ; &calendar($1) ; &calField(Eras:narrow:none) ; $2
//ldml/dates/calendars/calendar[@type="%A"]/quarters/quarterContext[@type="%A"]/quarterWidth[@type="%A"]/quarter[@type="%A"]    ; DateTime ; &calendar($1) ; &calField(Quarters:$3:$2) ; $4
//ldml/dates/calendars/calendar[@type="%A"]/months/monthContext[@type="%A"]/monthWidth[@type="%A"]/month[@type="%A"][@yeartype="%A"]  ; DateTime ; &calendar($1) ; &calField(Months:$3:$2) ; &month($4) (leap)
//ldml/dates/calendars/calendar[@type="%A"]/months/monthContext[@type="%A"]/monthWidth[@type="%A"]/month[@type="%A"]            ; DateTime ; &calendar($1) ; &calField(Months:$3:$2) ; &month($4)
//ldml/dates/calendars/calendar[@type="%A"]/days/dayContext[@type="%A"]/dayWidth[@type="%A"]/day[@type="%A"]                    ; DateTime ; &calendar($1) ; &calField(Days:$3:$2) ; &day($4)
//ldml/dates/calendars/calendar[@type="%A"]/dayPeriods/dayPeriodContext[@type="%A"]/dayPeriodWidth[@type="%A"]/dayPeriod[@type="%A"]  ; DateTime ; &calendar($1) ; &calField(DayPeriods:$3:$2) ; &day($4)

//ldml/dates/calendars/calendar[@type="%A"]/dateTimeFormats/availableFormats/dateFormatItem[@id="(?![^"]*[hHms])%A"]            ; DateTime ; &calendar($1); &calField(Formats:Flexible:date) ; $2
//ldml/dates/calendars/calendar[@type="%A"]/%EFormats/%EFormatLength[@type="%A"]/%EFormat[@type="%A"]/pattern[@type="%A"]       ; DateTime ; &calendar($1) ; &calField(Formats:Standard:$2) ; $4
//ldml/dates/calendars/calendar[@type="%A"]/dateTimeFormats/availableFormats/dateFormatItem[@id="%A"]                           ; DateTime ; &calendar($1); &calField(Formats:Flexible:time) ; $2
//ldml/dates/calendars/calendar[@type="%A"]/dateTimeFormats/appendItems/appendItem[@request="(Timezone)"]    ; DateTime ; &calendar($1) ; &calField(Formats:Flexible:Append) ; $2 
//ldml/dates/calendars/calendar[@type="%A"]/dateTimeFormats/intervalFormats/intervalFormatFallback                              ; DateTime ; &calendar($1) ; &calField(Formats:Intervals:Fallback) ; Fallback
//ldml/dates/calendars/calendar[@type="%A"]/dateTimeFormats/intervalFormats/intervalFormatItem[@id="%H%A"]/greatestDifference[@id="%A"] ; DateTime ; &calendar($1) ; &calField(Formats:Intervals:time) ; $2$3/$4
//ldml/dates/calendars/calendar[@type="%A"]/dateTimeFormats/intervalFormats/intervalFormatItem[@id="%A"]/greatestDifference[@id="%A"] ; DateTime ; &calendar($1) ; &calField(Formats:Intervals:date) ; $2/$3

//ldml/dates/calendars/calendar[@type="%A"]/cyclicNameSets/cyclicNameSet[@type="%A"]/cyclicNameContext[@type="%A"]/cyclicNameWidth[@type="%A"]/cyclicName[@type="%A"]   ; DateTime ; &calendar($1) ; $2 ; cyclic-$3-$4-$5
//ldml/dates/calendars/calendar[@type="%A"]/monthPatterns/monthPatternContext[@type="%A"]/monthPatternWidth[@type="%A"]/monthPattern[@type="%A"]    ; DateTime ; &calendar($1) ; $2 ; $3-$4

### Timezones

# Hide Etc/GMT[+-]...
//ldml/dates/timeZoneNames/zone[@type="Etc/GMT.*"]/exemplarCity ; Special  ; Suppress ; GMT ; GMT ; HIDE
//ldml/dates/timeZoneNames/zone[@type="%B/%A"]/exemplarCity     ; Timezones ; Timezone Cities ; &categoryFromTimezone($1/$2) ; $2

//ldml/dates/timeZoneNames/metazone[@type="%A"]/%E/%E       ; Timezones ; &metazone($1) ; $1 ; &timezoneSorting($3-$2)
//ldml/dates/timeZoneNames/zone[@type="%A"]/%E/%E           ; Timezones ; Overrides ; $1 ; &timezoneSorting($3-$2)

//ldml/dates/timeZoneNames/%E[@type="%A"]                   ; Timezones ; Timezone Display Patterns ; null ; &tzdpField($1-$2)
//ldml/dates/timeZoneNames/%E                               ; Timezones ; Timezone Display Patterns ; null ; &tzdpField($1)


### Numbers

//ldml/numbers/symbols[@numberSystem="%A"]/%E                                                           ; Numbers ; Symbols ; Symbols when using &numberingSystem($1) ; &number($2)
//ldml/numbers/%EFormats[@numberSystem="%A"]/%EFormatLength/%EFormat[@type="%A"]/pattern[@type="%A"]    ; Numbers ; Number Formatting Patterns ; Standard Patterns when using &numberingSystem($2) ; &numberFormat($5-$1)
//ldml/numbers/currencyFormats[@numberSystem="%A"]/unitPattern[@count="%A"]                             ; Numbers ; Number Formatting Patterns ; Currency Unit Patterns when using &numberingSystem($1) ; &count(currencies-$2)
//ldml/numbers/miscPatterns[@numberSystem="%A"]/pattern[@type=\"%A\"]                                   ; Numbers ; Number Formatting Patterns ; Miscellaneous Patterns when using &numberingSystem($1) ; $2

//ldml/numbers/%EFormats[@numberSystem="%A"]/%EFormatLength[@type="(long)"]/%EFormat[@type="%A"]/pattern[@type="%A"][@count="%A"]  ; Numbers ; Compact Decimal Formatting ; Long Formats when using &numberingSystem($2) ; &count2($7-digits-$4-$8)
//ldml/numbers/%EFormats[@numberSystem="%A"]/%EFormatLength[@type="(short)"]/%EFormat[@type="%A"]/pattern[@type="%A"][@count="%A"] ; Numbers ; Compact Decimal Formatting ; Short Formats when using &numberingSystem($2) ; &count2($7-digits-$4-$8)

### Currencies

//ldml/numbers/currencies/currency[@type="%A"]/displayName$                 ; Currencies ; &continentFromCurrency($1) ; &categoryFromCurrency($1) ; &count($1-name)
//ldml/numbers/currencies/currency[@type="%A"]/displayName[@count="%A"]     ; Currencies ; &continentFromCurrency($1) ; &categoryFromCurrency($1) ; &count($1-name-$2)
//ldml/numbers/currencies/currency[@type="%A"]/symbol[@alt="narrow"]        ; Currencies ; &continentFromCurrency($1) ; &categoryFromCurrency($1) ; &count($1-symbol)-narrow; READ_ONLY
//ldml/numbers/currencies/currency[@type="%A"]/symbol                       ; Currencies ; &continentFromCurrency($1) ; &categoryFromCurrency($1) ; &count($1-symbol)

### Units

//ldml/localeDisplayNames/measurementSystemNames/measurementSystemName[@type="%A"] ; Units ; Measurement Systems ; null ; $1
//ldml/units/unitLength[@type="%L"]/unit[@type="duration-%T%A"]/unitPattern[@count="%A"]                  ; Units ; Duration ; &datefield($2$3) ; &unitCount($1-$4) 
//ldml/units/unitLength[@type="%L"]/unit[@type="length-%A"]/unitPattern[@count="%A"]                      ; Units ; Length ; $2 ; &unitCount($1-$3) 
//ldml/units/unitLength[@type="%L"]/unit[@type="mass-%A"]/unitPattern[@count="%A"]                        ; Units ; Mass and Weight ; $2 ; &unitCount($1-$3) 
//ldml/units/unitLength[@type="%L"]/unit[@type="%W-%A"]/unitPattern[@count="%A"]                          ; Units ; Weather ; $2-$3 ; &unitCount($1-$4) 
//ldml/units/unitLength[@type="%L"]/unit[@type="%A"]/unitPattern[@count="%A"]                             ; Units ; Other Units ; $2 ; &unitCount($1-$3) 
//ldml/units/unitLength[@type="%L"]/compoundUnit[@type="%A"]/compoundUnitPattern                          ; Units ; Compound Units ; $2 ; $1 
//ldml/units/durationUnit[@type="(hms|hm|ms)"]                                    						  ; Units ; Duration ; Duration Patterns ; $1

### Miscellaneous
//ldml/listPatterns/listPattern/listPatternPart[@type="%A"] ; Misc ; Displaying Lists ; Regular Lists ; &listOrder($1)
//ldml/listPatterns/listPattern[@type="unit"]/listPatternPart[@type="%A"] ; Misc ; Displaying Lists ; Duration Lists ; &listOrder($1)
//ldml/listPatterns/listPattern[@type="unit-short"]/listPatternPart[@type="%A"] ; Misc ; Displaying Lists ; Short Duration Lists ; &listOrder($1)
//ldml/listPatterns/listPattern[@type="unit-narrow"]/listPatternPart[@type="%A"] ; Misc ; Displaying Lists ; Narrow Duration Lists ; &listOrder($1)

//ldml/characters/ellipsis[@type="%A"]                      ; Misc ; Linguistic Elements ; Ellipsis ; $1
//ldml/delimiters/quotation%E                               ; Misc ; Linguistic Elements ; Quotation Marks ; $1
//ldml/delimiters/alternateQuotation%E                      ; Misc ; Linguistic Elements ; Quotation Marks ; embedded-$1
//ldml/characters/moreInformation                           ; Misc ; Linguistic Elements ; Symbols ; More Information
//ldml/posix/messages/%Estr                                 ; Misc ; Linguistic Elements ; Yes and No ; posix-$1
//ldml/localeDisplayNames/transformNames/transformName[@type="%A"]          ; Misc ; Transforms ; null ; $1





# HIDE OTHERS
//ldml/layout/orientation/(%E)                              ; Special ; Alphabetic Information ; Layout ; $1 ; HIDE

//ldml/dates/calendars/calendar[@type="%A"]/dateTimeFormats/appendItems/appendItem[@request="%A"]    ; Special ; Suppress ; Append-Fallback-$1 ; $2 ; HIDE

//ldml/contextTransforms/contextTransformUsage[@type="%E"]/contextTransform[@type="%E"]              ; Special ; Suppress ; Usage-$1 ; $2 ; HIDE


//ldml/fallback                             ; Special ; Deprecated ; null ; fallback ; DEPRECATED
//ldml/layout/inList                        ; Special ; Deprecated ; null ; inList ; DEPRECATED
//ldml/layout/inText[@type="%A"]            ; Special ; Deprecated ; inText ; $1 ; DEPRECATED

//ldml/numbers/currencyFormats[@numberSystem="%A"]/currencySpacing/%E/%E        ; Special ; Number Formatting Patterns ; Currency Spacing when using &numberingSystem($1) ; $2-$3 ; HIDE

# Suppress the numbers without numbering system.
//ldml/numbers/currencyFormats/unitPattern[@count="%A"]                     ; Special ; Deprecated ; latn ; currencies-count=$1 ; HIDE
//ldml/numbers/currencyFormats/currencySpacing/%E/%E                                                    ; Special ; Deprecated ; Numbers ; currencySpacing-$1-$2 ; HIDE
//ldml/numbers/symbols/%E                                                                               ; Special ; Deprecated ; Numbers ; symbols-$1 ; HIDE
//ldml/numbers/%EFormats/%EFormatLength/%EFormat[@type="%A"]/pattern[@type="%A"]                        ; Special ; Deprecated ; $1 ; pattern-$5-$4 ; HIDE
//ldml/numbers/%EFormats/%EFormatLength[@type="%A"]/%EFormat[@type="%A"]/pattern[@type="%A"]            ; Special ; Deprecated ; $1 ; pattern-$3-$6 ; HIDE

//ldml/dates/calendars/calendar[@type="%A"]/fields/field[@type="%A"]/%E[@type="%A"]                     ; Special ; Deprecated ; $1 ; $1-$2-$3-$4 ; HIDE
//ldml/dates/calendars/calendar[@type="%A"]/fields/field[@type="%A"]                                    ; Special ; Deprecated ; $1 ; $1-$2 ; HIDE

# Ultimate fallback (Error)
//ldml/%S/(.*)                                                                              ; Special ; Unknown ; $1 ; $2 ; DEPRECATED
//ldml/(.*)                                                                                 ; Special ; Unknown ; Unknown ; $2 ; DEPRECATED
