my$sscripts=locale_entry($loc,"sscripts",$script)||xml_query($suppl,"/supplementalData/languageData/language[\@type='$language' and not(\@alt)]/\@scripts");
my$serastring=loc_query($loc,"/ldml/dates/calendars/calendar[\@type='gregorian']/eras/eraAbbr/era[\@type='1' and not(\@alt)]");
my(@sdayname,@sabbrevdayname,@sshortestdayname);
foreachmy$d(sort{$days{$a}<=>$days{$b}}keys%days)
{
my$n=$days{$d};
my%name;
foreachmy$type(qw(wide abbreviated short))
{
$name{$type}=loc_query($loc,"/ldml/dates/calendars/calendar[\@type='gregorian']/days/dayContext[\@type='format']/dayWidth[\@type='$type']/day[\@type='$d' and not(\@alt)]");
$scalnames[$caltypes{$c}-1]=loc_query($loc,"/ldml/localeDisplayNames/types/type[\@key='calendar' and \@type='$c']");
}
# date/time formats
my$s1159=loc_query($loc,"/ldml/dates/calendars/calendar[\@type='gregorian']/dayPeriods/dayPeriodContext[\@type='format']/dayPeriodWidth[\@type='abbreviated']/dayPeriod[\@type='am' and not(\@alt)]");
my$s2359=loc_query($loc,"/ldml/dates/calendars/calendar[\@type='gregorian']/dayPeriods/dayPeriodContext[\@type='format']/dayPeriodWidth[\@type='abbreviated']/dayPeriod[\@type='pm' and not (\@alt)]");
my$sshortestam=loc_query($loc,"/ldml/dates/calendars/calendar[\@type='gregorian']/dayPeriods/dayPeriodContext[\@type='format']/dayPeriodWidth[\@type='narrow']/dayPeriod[\@type='am' and not(\@alt)]");
my$sshortestpm=loc_query($loc,"/ldml/dates/calendars/calendar[\@type='gregorian']/dayPeriods/dayPeriodContext[\@type='format']/dayPeriodWidth[\@type='narrow']/dayPeriod[\@type='pm' and not (\@alt)]");
push@stimeformat,loc_query($loc,"/ldml/dates/calendars/calendar[\@type='gregorian']/dateTimeFormats/availableFormats/dateFormatItem[\@id='Hms' and not(\@alt)]");
push@sshorttime,loc_query($loc,"/ldml/dates/calendars/calendar[\@type='gregorian']/dateTimeFormats/availableFormats/dateFormatItem[\@id='Hm' and not(\@alt)]");
my@sshortdate=loc_query($loc,"/ldml/dates/calendars/calendar[\@type='gregorian']/dateTimeFormats/availableFormats/dateFormatItem[\@id='yMd' and not(\@alt)]");
push@sshortdate,loc_query($loc,"/ldml/dates/calendars/calendar[\@type='gregorian']/dateTimeFormats/availableFormats/dateFormatItem[\@id='yMMMd' and not(\@alt)]");
my@smonthday=(loc_query($loc,"/ldml/dates/calendars/calendar[\@type='gregorian']/dateTimeFormats/availableFormats/dateFormatItem[\@id='MMMMd' and not(\@alt)]"));
push@smonthday,loc_query($loc,"/ldml/dates/calendars/calendar[\@type='gregorian']/dateTimeFormats/availableFormats/dateFormatItem[\@id='Md' and not(\@alt)]");
push@smonthday,loc_query($loc,"/ldml/dates/calendars/calendar[\@type='gregorian']/dateTimeFormats/availableFormats/dateFormatItem[\@id='MMMd' and not(\@alt)]");
@smonthday=mapconvert_date_format($_),@smonthday;
my@syearmonth=mapconvert_date_format($_),loc_query($loc,"/ldml/dates/calendars/calendar[\@type='gregorian']/dateTimeFormats/availableFormats/dateFormatItem[\@id='yMMMM' and not(\@alt)]");
my@sduration=mapconvert_time_format(lc$_),loc_query($loc,"/ldml/dates/calendars/calendar[\@type='gregorian']/dateTimeFormats/availableFormats/dateFormatItem[\@id='Hms' and not(\@alt)]");
my$srelativelongdate=loc_query($loc,"/ldml/dates/calendars/calendar[\@type='gregorian']/dateTimeFormats/availableFormats/dateFormatItem[\@id='MMMMEd' and not(\@alt)]")||
loc_query($loc,"/ldml/dates/calendars/calendar[\@type='gregorian']/dateTimeFormats/availableFormats/dateFormatItem[\@id='MMMEd' and not(\@alt)]");