Changeset 24432 in main


Ignore:
Timestamp:
01/07/22 18:14:06 (4 months ago)
Author:
GarthBraithwaite_STG
Message:

view - changed measureformatpattern to measureValueType.

Location:
trunk/ibisph-view/src/main/webapp
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/ibisph-view/src/main/webapp/xslt/_ibis-format.xslt

    r24395 r24432  
    7373                        passed in will be returned as is."
    7474                />
     75                <xsl:param name="valueIfNaN" ibis:doc="Value to return if the number is NOT a number()."/>
    7576
    7677                <xsl:choose>
     
    8081
    8182                        <xsl:when test="'NaN' = string(number($number))">
    82                                 <xsl:value-of select="$number[1]"/>
     83                                <xsl:value-of select="if($valueIfNaN) then $valueIfNaN else $number"/>
    8384                        </xsl:when>
    8485
     
    101102                        </xsl:otherwise>
    102103                </xsl:choose>
     104        </xsl:function>
     105
     106        <xsl:function name="ibis:getFormattedNumber" as="xs:string" ibis:doc="2 param version.">
     107                <xsl:param name="number"/>
     108                <xsl:param name="pattern"/>
     109
     110                <xsl:sequence select="ibis:getFormattedNumber($number, $pattern, $number)"/>
    103111        </xsl:function>
    104112
  • trunk/ibisph-view/src/main/webapp/xslt/html/community/indicator/Page.xslt

    r23487 r24432  
    237237
    238238<xsl:variable name="ancillaryValueNames" select="distinct-values($indicator/DATASETS/DATASET[NAME = $indicatorView/DATASET_NAMES/DATASET_NAME]/DATASET_ANCILLARY_VALUES/DATASET_ANCILLARY_VALUE/ANCILLARY_VALUE_NAME)"/>
    239 <xsl:variable name="measureFormatPattern" select="($Indicator.valueTypes/VALUE_TYPE[NAME = $measure/VALUE_TYPE_NAME]/XSLT_FORMAT_PATTERN)[1]"/>
     239<xsl:variable name="measureValueType" select="($Indicator.valueTypes/VALUE_TYPE[NAME = $measure/VALUE_TYPE_NAME])[1]"/>
    240240<xsl:call-template name="DataViz.leafletKendoScript">
    241241        <xsl:with-param name="scriptContainerID"     select="concat('script', position())"/>
     
    250250                        <xsl:with-param name="ancillaryValues" select="$Indicator.ancillaryValues"/>
    251251                        <xsl:with-param name="valueTypes"      select="$Indicator.valueTypes"/>
    252                         <xsl:with-param name="measureFormatPattern" select="$measureFormatPattern"/>
     252                        <xsl:with-param name="measureValueType" select="$measureValueType"/>
    253253                </xsl:call-template>
    254254        </xsl:with-param>
     
    261261
    262262        <xsl:with-param name="measure" select="$measure"/>
    263         <xsl:with-param name="measureFormatPattern" select="$measureFormatPattern"/>
     263        <xsl:with-param name="measureValueType" select="$measureValueType"/>
    264264
    265265        <xsl:with-param name="showMap"        select="$showMap"/>
  • trunk/ibisph-view/src/main/webapp/xslt/html/community/initiatives/Page.xslt

    r23428 r24432  
    110110                <xsl:param name="measure"    select="$indicator/MEASURES/MEASURE[NAME=$initiativeTopicObjective/MEASURE_NAME[1]]"/>
    111111
    112                 <xsl:variable name="measureFormatPattern" select="($indicator/VALUE_TYPES/VALUE_TYPE[NAME = $measure/VALUE_TYPE_NAME]/XSLT_FORMAT_PATTERN)[1]"/>
     112                <xsl:variable name="measureXSLTFormatPattern" select="($indicator/VALUE_TYPES/VALUE_TYPE[NAME = $measure/VALUE_TYPE_NAME])[1]/XSLT_FORMAT_PATTERN"/>
    113113                <xsl:variable name="indicatorPeriodValues" select="$indicator//DIMENSION_COMBINATION/PERIOD_DIMENSION/VALUES/VALUE"/>
    114114
     
    152152
    153153<br/>
     154
    154155                <div>Baseline Value:
    155                         <xsl:value-of select="ibis:getFormattedNumber($initiativeTopicObjective/TARGET_BASELINE_VALUE, $measureFormatPattern)"/>
     156                        <xsl:value-of select="ibis:getFormattedNumber($initiativeTopicObjective/TARGET_BASELINE_VALUE, $measureXSLTFormatPattern)"/>
    156157                        , starting: <xsl:value-of select="ibis:getFormattedNumber($initiativeTopicObjective/TARGET_BASELINE_YEAR, '####')"/>
    157158                </div>
    158159                <div>Target Goal Value (<xsl:value-of select="$initiativeTopicObjective/TARGET_LABEL"/>):
    159                         <xsl:value-of select="ibis:getFormattedNumber($initiativeTopicObjective/TARGET_GOAL_VALUE, $measureFormatPattern)"/>
     160                        <xsl:value-of select="ibis:getFormattedNumber($initiativeTopicObjective/TARGET_GOAL_VALUE, $measureXSLTFormatPattern)"/>
    160161                        , by: <xsl:value-of select="ibis:getFormattedNumber($initiativeTopicObjective/TARGET_GOAL_YEAR, '####')"/>
    161162                </div>
     
    188189<xsl:variable name="communityDimension" select="$dimensions/DIMENSION[exists(COMMUNITY_FLAG)]1]"/>
    189190-->
    190 <xsl:variable name="communityDimension" select="NULL"/>
     191<xsl:variable name="communityDimension" select="$dimensions/DIMENSION[NAME='GeoSarea']"/>
    191192                                <xsl:for-each select="if(exists($communityDimension/TITLE)) then $communityDimension else $dimensions/DIMENSION[exists(COMMUNITY_FLAG)]">
    192193                                        <xsl:sort select="SORT_ORDER" order="ascending" data-type="number"/>
     
    208209                                        <!-- the commun DSR's non community dim is the period dim name and value. -->
    209210                                        <xsl:variable name="communityPeriodDimensions" select="$communityDSRs/DIMENSIONS/DIMENSION[NAME != $communityDimension/NAME]"/>
    210                                         <xsl:variable name="maxCommunityPeriodDimensionValue" select="string(max($communityPeriodDimensions/VALUE))"/>
    211                                         <xsl:variable name="periodDimensionNames" select="distinct-values($communityPeriodDimensions[VALUE = $maxCommunityPeriodDimensionValue]/NAME)"/>
    212                                         <xsl:variable name="periodDimensionName" select="$periodDimensionNames[1]"/>
    213 
    214 
    215 <xsl:message select="concat('~~~ Community Name: ', $communityDimension/NAME, ', count Period Names: ', count($periodDimensionNames), ', period name: ', $periodDimensionName, ', Max Value: ', $maxCommunityPeriodDimensionValue, ', count community DSRs: ', count($communityDSRs))"/>
     211                                        <xsl:variable name="maxCommunityPeriodValue"   select="max($communityPeriodDimensions/VALUE)"/>
     212                                        <xsl:variable name="periodDimensionNames" select="distinct-values($communityPeriodDimensions[number(VALUE) = $maxCommunityPeriodValue]/NAME)"/>
     213                                        <xsl:variable name="periodDimensionName"  select="$periodDimensionNames[1]"/>
     214
     215
     216<xsl:message select="concat('~~~ Community Name: ', $communityDimension/NAME, ', count Period Names: ', count($periodDimensionNames), ', period name: ', $periodDimensionName, ', Max Value: ', $maxCommunityPeriodValue, ', count community DSRs: ', count($communityDSRs))"/>
    216217
    217218                                <tr scope="row">
     
    230231                                                <xsl:call-template name="Page.communityRow">
    231232                                                        <xsl:with-param name="measure"   select="$measure"/>
    232                                                         <xsl:with-param name="measureFormatPattern" select="$measureFormatPattern"/>
    233 
     233                                                        <xsl:with-param name="measureXSLTFormatPattern" select="$measureXSLTFormatPattern"/>
    234234                                                        <xsl:with-param name="initiativeTopicObjective" select="$initiativeTopicObjective"/>
    235 
    236235                                                        <xsl:with-param name="communityDatasetRecords" select="$communityDSRs"/>
    237236                                                        <xsl:with-param name="periodDimension" select="$dimensions/DIMENSION[NAME = $periodDimensionName]"/>
    238                                                         <xsl:with-param name="periodDimensionTextValue" select="$maxCommunityPeriodDimensionValue"/>
     237                                                        <xsl:with-param name="periodValue" select="$maxCommunityPeriodDimensionValue"/>
    239238                                                        <xsl:with-param name="communityDimension"   select="$communityDimension"/>
    240239                                                        <xsl:with-param name="communityDimensionValue"  select="."/>
     
    253252                </footer>
    254253
     254
    255255<xsl:message>
    256256        <xsl:call-template name="Initiative.datasetRecords">
     
    273273                <xsl:with-param name="measure"    select="$indicator/MEASURES/MEASURE[NAME=$initiativeTopicObjective/MEASURE_NAME[1]]"/>
    274274-->
     275                <xsl:with-param name="communityName"  select="'GeoSarea'"/>
     276                <xsl:with-param name="communityDimensionValue" select="NULL"/>
     277
    275278        </xsl:call-template>
    276279</xsl:message>
     
    284287        >
    285288                <xsl:param name="initiativeTopicObjective" />
    286                 <xsl:param name="baseValue"      select="number($initiativeTopicObjective/TARGET_BASELINE_VALUE)"/>
    287                 <xsl:param name="targetValue"    select="number($initiativeTopicObjective/TARGET_GOAL_VALUE)"/>
    288                 <xsl:param name="baseYear"      select="number($initiativeTopicObjective/TARGET_BASELINE_YEAR)"/>
    289                 <xsl:param name="targetYear"    select="number($initiativeTopicObjective/TARGET_GOAL_YEAR)"/>
     289                <xsl:param name="baseValue"   select="number($initiativeTopicObjective/TARGET_BASELINE_VALUE)"/>
     290                <xsl:param name="targetValue" select="number($initiativeTopicObjective/TARGET_GOAL_VALUE)"/>
     291                <xsl:param name="baseYear"    select="number($initiativeTopicObjective/TARGET_BASELINE_YEAR)"/>
     292                <xsl:param name="targetYear"  select="number($initiativeTopicObjective/TARGET_GOAL_YEAR)"/>
    290293
    291294                <xsl:param name="communityDatasetRecords"/>
    292295
    293296                <xsl:param name="measure"/>
    294                 <xsl:param name="measureFormatPattern"/>
     297                <xsl:param name="measureXSLTFormatPattern"/>
    295298                <xsl:param name="desirableValue" select="$measure/DESIRABLE_VALUE"/>
    296299
    297300                <xsl:param name="communityDimension"/>
    298                 <xsl:param name="communityDimensionName" select="$communityDimension/NAME"/>
     301                <xsl:param name="communityName" select="$communityDimension/NAME"/>
    299302                <xsl:param name="communityDimensionValue"/>
    300                 <xsl:param name="communityDimensionTextValue" select="ibis:getNormalizedText($communityDimensionValue)"/>
    301 
    302 
     303                <xsl:param name="communityValue" select="ibis:getNormalizedText($communityDimensionValue)"/>
    303304
    304305                <xsl:param name="periodDimension"/>
    305                 <xsl:param name="periodDimensionName" select="$periodDimension/NAME"/>
    306                 <xsl:param name="periodDimensionTextValue"/>
    307                 <xsl:param name="periodDimensionValue" select="$periodDimension/VALUES/VALUE[ibis:getNormalizedText(.) = $periodDimensionTextValue]"/>
    308 
    309 
     306                <xsl:param name="periodName" select="$periodDimension/NAME"/>
     307                <xsl:param name="periodValue"/>
     308                <xsl:param name="periodDimensionValue" select="$periodDimension/VALUES/VALUE[ibis:getNormalizedText(.) = $periodValue]"/>
    310309
    311310                <xsl:variable name="dsr" select="$communityDatasetRecords[
    312                                 (DIMENSIONS/DIMENSION[(NAME = $communityDimensionName) and (VALUE = $communityDimensionTextValue)])
     311                                (DIMENSIONS/DIMENSION[(NAME = $communityName) and (VALUE = $communityValue)])
    313312                                and
    314                                 (DIMENSIONS/DIMENSION[(NAME = $periodDimensionName) and (VALUE = $periodDimensionTextValue)])
     313                                (DIMENSIONS/DIMENSION[(NAME = $periodName) and (VALUE = $periodValue)])
    315314                        ]
    316315                "/>
    317316
    318 <xsl:if test="0 != string-length($dsr//MEASURE/VALUE)">
     317                <xsl:if test="0 != string-length($dsr//MEASURE/VALUE)">
    319318                        <xsl:variable name="periodRange" select="$targetYear - $baseYear"/>
    320                         <xsl:variable name="periodPecentage" select="(number($periodDimensionTextValue) - $baseYear) div $periodRange"/>
     319                        <xsl:variable name="periodPecentage" select="(number($periodValue) - $baseYear) div $periodRange"/>
    321320                        <xsl:variable name="baseTargetRange" select="$targetValue - $baseValue"/>
    322321                        <xsl:variable name="proratedTarget" select="$baseValue + ($baseTargetRange * $periodPecentage)"/>
    323322                        <xsl:variable name="valueVsTarget" select="$dsr/MEASURE/VALUE - targetValue"/>
    324                         <xsl:variable name="targetStatus" select="ibis:getFormattedNumber($proratedTarget - $dsr/MEASURE/VALUE, $measureFormatPattern)"/>
     323                        <xsl:variable name="targetStatus" select="ibis:getFormattedNumber($proratedTarget - $dsr/MEASURE/VALUE, $measureXSLTFormatPattern)"/>
    325324
    326325                        <xsl:variable name="currentStatus">
    327326                                <xsl:choose>
    328327
    329                                         <xsl:when test="('LOW' = $desirableValue) and $targetValue and ($dsr/MEASURE/VALUE &lt;= $targetValue)">
     328                                        <xsl:when test="('LOW' = $desirableValue) and $targetValue and ($dsr/MEASURE/VALUE le $targetValue)">
    330329                                                REACHED
    331330                                        </xsl:when>
    332                                         <xsl:when test="('LOW' = $desirableValue) and ($dsr/MEASURE/VALUE &lt;= $proratedTarget)">
     331                                        <xsl:when test="('LOW' = $desirableValue) and ($dsr/MEASURE/VALUE le $proratedTarget)">
    333332                                                TRACKING
    334333                                        </xsl:when>
    335                                         <xsl:when test="('LOW' = $desirableValue) and ($dsr/MEASURE/VALUE &lt;= $baseValue)">
     334                                        <xsl:when test="('LOW' = $desirableValue) and ($dsr/MEASURE/VALUE le $baseValue)">
    336335                                                PROGRESSING
    337336                                        </xsl:when>
    338337
    339                                         <xsl:when test="('HIGH' = desirableValue) and ($dsr/MEASURE/VALUE &gt;= $targetValue)">
     338                                        <xsl:when test="('HIGH' = desirableValue) and ($dsr/MEASURE/VALUE ge $targetValue)">
    340339                                                REACHED
    341340                                        </xsl:when>
    342                                         <xsl:when test="('HIGH' = $desirableValue) and ($dsr/MEASURE/VALUE &gt;= $proratedTarget)">
     341                                        <xsl:when test="('HIGH' = $desirableValue) and ($dsr/MEASURE/VALUE ge $proratedTarget)">
    343342                                                TRACKING
    344343                                        </xsl:when>
    345                                         <xsl:when test="('HIGH' = $desirableValue) and ($dsr/MEASURE/VALUE &gt;= $baseValue)">
     344                                        <xsl:when test="('HIGH' = $desirableValue) and ($dsr/MEASURE/VALUE ge $baseValue)">
    346345                                                PROGRESSING
    347346                                        </xsl:when>
     
    361360                <tr>
    362361                        <td class="Indicator">
    363                                 <a href="community/facts/{communityDimensionName}/{communityDimensionTextValue}.html"
     362                                <a href="community/facts/{communityName}/{communityValue}.html"
    364363                                        title="Click here to see a more detailed comparison of {communityIndicator/TITLE}" class="Block"
    365364                                >
     
    372371
    373372                        <td class="Valuexxx TextAlignCenter {communityIndicator/STATE/VALUE/COMPARISON/CLASS}" title="No value - can not compare">
    374                                 <xsl:value-of select="ibis:getFormattedNumber($dsr/MEASURE/VALUE, $measureFormatPattern)"/>
     373                                <xsl:value-of select="ibis:getFormattedNumber($dsr/MEASURE/VALUE, $measureXSLTFormatPattern)"/>
    375374                        </td>
    376375
     
    378377
    379378<!--
    380                                 <xsl:value-of select="$baseYear div ($targetYear - $baseYear)"/>
     379                                <xsl:sequence select="$baseYear div ($targetYear - $baseYear)"/>
    381380-->
    382381                                year range: <xsl:value-of select="$periodRange"/><br/>
    383382                                % of years: <xsl:value-of select="ibis:getFormattedNumber($periodPecentage, '##.#%')"/><br/>
    384                                 Target - Base Range: <xsl:value-of select="ibis:getFormattedNumber($baseTargetRange, $measureFormatPattern)"/>
     383                                Target - Base Range: <xsl:value-of select="ibis:getFormattedNumber($baseTargetRange, $measureXSLTFormatPattern)"/>
    385384                        </td>
    386385
    387386                        <td class="Value TextAlignCenter" title="Community value for {communityIndicator/PERIOD_DIMENSION/VALUE/TITLE}">
    388                                 current goal: <xsl:value-of select="ibis:getFormattedNumber($proratedTarget, $measureFormatPattern)"/><br/>
    389                                 How going:<xsl:value-of select="ibis:getFormattedNumber($dsr/MEASURE/VALUE - $proratedTarget, $measureFormatPattern)"/><br/>
    390                                 Overall:<xsl:value-of select="ibis:getFormattedNumber($valueVsTarget, $measureFormatPattern)"/><br/>
     387                                current goal: <xsl:value-of select="ibis:getFormattedNumber($proratedTarget, $measureXSLTFormatPattern)"/><br/>
     388                                How going:<xsl:value-of select="ibis:getFormattedNumber($dsr/MEASURE/VALUE - $proratedTarget, $measureXSLTFormatPattern)"/><br/>
     389                                Overall:<xsl:value-of select="ibis:getFormattedNumber($valueVsTarget, $measureXSLTFormatPattern)"/><br/>
    391390                                Status:<xsl:value-of select="$currentStatus"/>
    392391<!--
    393                                 <xsl:value-of select="ibis:getFormattedNumber($baseValue - $dsr/MEASURE/VALUE, $measureFormatPattern)"/>,
    394                                 <xsl:value-of select="ibis:getFormattedNumber($targetValue - $dsr/MEASURE/VALUE, $measureFormatPattern)"/>,
     392                                <xsl:value-of select="ibis:getFormattedNumber($baseValue - $dsr/MEASURE/VALUE, $measureXSLTFormatPattern)"/>,
     393                                <xsl:value-of select="ibis:getFormattedNumber($targetValue - $dsr/MEASURE/VALUE, $measureXSLTFormatPattern)"/>,
    395394
    396395                                <xsl:value-of select="$baseValue"/>,
  • trunk/ibisph-view/src/main/webapp/xslt/html/indicator/profile/ContentBlocks.xslt

    r23665 r24432  
    188188                                <xsl:with-param name="measure"          select="$Indicator.measure"/>
    189189                                <xsl:with-param name="measureTitle" select="ibis:getMeasureTitle($indicatorView/MEASURE_TITLE_OVERRIDE, $Indicator.measure)"/>
    190                                 <xsl:with-param name="measureFormatPattern" select="$Indicator.measureFormatPattern"/>
     190                                <xsl:with-param name="measureValueType" select="$Indicator.measureValueType"/>
    191191
    192192                                <xsl:with-param name="showMap"      select="$showMap"/>
  • trunk/ibisph-view/src/main/webapp/xslt/html/indicator/profile/Indicator.xslt

    r24331 r24432  
    6565        <xsl:param name="Indicator.measures"        select="if($Indicator.useExternalXML) then $Measures/MEASURES else $Indicator.indicator/MEASURES"/>
    6666        <xsl:param name="Indicator.measure"         select="$Indicator.measures/MEASURE[NAME=$Indicator.indicatorView/MEASURE_NAME]"/>
    67         <xsl:param name="Indicator.measureFormatPattern" select="($Indicator.valueTypes/VALUE_TYPE[NAME = $Indicator.measure/VALUE_TYPE_NAME]/XSLT_FORMAT_PATTERN)[1]"/>
     67        <xsl:param name="Indicator.measureValueType" select="($Indicator.valueTypes/VALUE_TYPE[NAME = $Indicator.measure/VALUE_TYPE_NAME])[1]"/>
    6868
    6969        <xsl:param name="ValueTypes"/>
     
    298298                <xsl:param name="measure"    select="$Indicator.measures/MEASURE[NAME=$initiative/INITIATIVE_TOPIC/INITIATIVE_TOPIC_OBJECTIVE/MEASURE_NAME]"/>
    299299
    300                 <xsl:variable name="measureFormatPattern" select="$Indicator.valueTypes/VALUE_TYPE[NAME = $measure/VALUE_TYPE_NAME]/XSLT_FORMAT_PATTERN[1]"/>
     300                <xsl:variable name="measureXSLTFormatPattern" select="($Indicator.valueTypes/VALUE_TYPE[NAME = $measure/VALUE_TYPE_NAME])[1]/XSLT_FORMAT_PATTERN"/>
    301301
    302302                <h3 title="{$initiative/DESCRIPTION}">
     
    340340                <div>Desirable Value: <xsl:value-of select="$measure/DESIRABLE_VALUE"/></div>
    341341                <div>Baseline Value:
    342                         <xsl:value-of select="ibis:getFormattedNumber($initiative/INITIATIVE_TOPIC/INITIATIVE_TOPIC_OBJECTIVE/TARGET_BASELINE_VALUE, $measureFormatPattern)"/>
     342                        <xsl:value-of select="ibis:getFormattedNumber($initiative/INITIATIVE_TOPIC/INITIATIVE_TOPIC_OBJECTIVE/TARGET_BASELINE_VALUE, $measureXSLTFormatPattern)"/>
    343343                        , starting: <xsl:value-of select="ibis:getFormattedNumber($initiative/INITIATIVE_TOPIC/INITIATIVE_TOPIC_OBJECTIVE/TARGET_BASELINE_YEAR, '####')"/>
    344344                </div>
    345345                <div>Target Goal Value (<xsl:value-of select="$initiative/INITIATIVE_TOPIC/INITIATIVE_TOPIC_OBJECTIVE/TARGET_LABEL"/>):
    346                         <xsl:value-of select="ibis:getFormattedNumber($initiative/INITIATIVE_TOPIC/INITIATIVE_TOPIC_OBJECTIVE/TARGET_GOAL_VALUE, $measureFormatPattern)"/>
     346                        <xsl:value-of select="ibis:getFormattedNumber($initiative/INITIATIVE_TOPIC/INITIATIVE_TOPIC_OBJECTIVE/TARGET_GOAL_VALUE, $measureXSLTFormatPattern)"/>
    347347                        , by: <xsl:value-of select="ibis:getFormattedNumber($initiative/INITIATIVE_TOPIC/INITIATIVE_TOPIC_OBJECTIVE/TARGET_GOAL_YEAR, '####')"/>
    348348                </div>
     
    856856                <xsl:param name="ancillaryValues"               select="$Indicator.ancillaryValues"/>
    857857                <xsl:param name="valueTypes"                    select="$Indicator.valueTypes"/>
    858                 <xsl:param name="measureFormatPattern"  select="$Indicator.measureFormatPattern"/>
     858                <xsl:param name="measureValueType"              select="$Indicator.measureValueType"/>
    859859
    860860                <xsl:variable name="ancillaryValueNames" select="distinct-values($indicator/DATASETS/DATASET[NAME = $indicatorView/DATASET_NAMES/DATASET_NAME]/DATASET_ANCILLARY_VALUES/DATASET_ANCILLARY_VALUE/ANCILLARY_VALUE_NAME)"/>
     
    868868                        <xsl:with-param name="ancillaryValues"                  select="$ancillaryValues"/>
    869869                        <xsl:with-param name="valueTypes"                               select="$valueTypes"/>
    870                         <xsl:with-param name="measureFormatPattern"             select="$measureFormatPattern"/>
     870                        <xsl:with-param name="measureValueType"                 select="$measureValueType"/>
    871871                </xsl:call-template>
    872872        </xsl:template>
  • trunk/ibisph-view/src/main/webapp/xslt/html/indicator/profile/complete_profile/Page.xslt

    r23665 r24432  
    9797                                <xsl:variable name="indicatorView" select="document(concat(current(), '.xml'), /)/INDICATOR_VIEW"/>
    9898                                <xsl:variable name="measure"       select="if($Indicator.useExternalXML) then $Measures/MEASURES/MEASURE[NAME=$indicatorView/MEASURE_NAME] else $indicator/MEASURES/MEASURE[NAME=$indicatorView/MEASURE_NAME]"/>
    99                                 <xsl:variable name="measureFormatPattern" select="($Indicator.valueTypes/VALUE_TYPE[NAME = $measure/VALUE_TYPE_NAME]/XSLT_FORMAT_PATTERN)[1]"/>
     99                                <xsl:variable name="measureValueType" select="($Indicator.valueTypes/VALUE_TYPE[NAME = $measure/VALUE_TYPE_NAME])[1]"/>
    100100                                <xsl:variable name="dataVizContainerIDPrefix" select="ibis:firstLetterLowerCase( replace($indicatorView/NAME, '\.', '_') )"/>
    101101                                <xsl:variable name="dataVizObjectName"        select="concat($dataVizContainerIDPrefix, 'DataViz')"/>
     
    177177                                                <xsl:with-param name="measure"          select="$measure"/>
    178178                                                <xsl:with-param name="measureTitle" select="ibis:getMeasureTitle($indicatorView/MEASURE_TITLE_OVERRIDE, $measure)"/>
    179                                                 <xsl:with-param name="measureFormatPattern" select="$measureFormatPattern"/>
     179                                                <xsl:with-param name="measureValueType" select="$measureValueType"/>
    180180
    181181                                                <xsl:with-param name="showMap"      select="$showMap"/>
  • trunk/ibisph-view/src/main/webapp/xslt/html/indicator/profile/summary/Page.xslt

    r23505 r24432  
    5555                                <xsl:variable name="indicatorView" select="document(concat(current(), '.xml'), /)/INDICATOR_VIEW"/>
    5656                                <xsl:variable name="measure"       select="if($Indicator.useExternalXML) then $Measures/MEASURES/MEASURE[NAME=$indicatorView/MEASURE_NAME] else $indicator/MEASURES/MEASURE[NAME=$indicatorView/MEASURE_NAME]"/>
    57                                 <xsl:variable name="measureFormatPattern"               select="($Indicator.valueTypes/VALUE_TYPE[NAME = $measure/VALUE_TYPE_NAME]/XSLT_FORMAT_PATTERN)[1]"/>
     57                                <xsl:variable name="measureValueType"                   select="($Indicator.valueTypes/VALUE_TYPE[NAME = $measure/VALUE_TYPE_NAME])[1]"/>
    5858                                <xsl:variable name="dataVizContainerIDPrefix"   select="ibis:firstLetterLowerCase( replace($indicatorView/NAME, '\.', '_') )"/>
    5959                                <xsl:variable name="dataVizObjectName"                  select="concat($dataVizContainerIDPrefix, 'DataViz')"/>
     
    117117                                                <xsl:with-param name="measure"          select="$measure"/>
    118118                                                <xsl:with-param name="measureTitle" select="ibis:getMeasureTitle($indicatorView/MEASURE_TITLE_OVERRIDE, $measure)"/>
    119                                                 <xsl:with-param name="measureFormatPattern" select="$measureFormatPattern"/>
     119                                                <xsl:with-param name="measureValueType" select="$measureValueType"/>
    120120
    121121                                                <xsl:with-param name="showMap"      select="$showMap"/>
  • trunk/ibisph-view/src/main/webapp/xslt/html/indicator/profile/view/Page.xslt

    r23335 r24432  
    140140                                <xsl:with-param name="containerIDPrefix" select="$dataVizContainerIDPrefix"/>
    141141
    142                                 <xsl:with-param name="dimensions"            select="$Indicator.dimensions"/>
    143                                 <xsl:with-param name="dimensionUsages"       select="$indicatorView/DIMENSION_USAGES"/>
    144                                 <xsl:with-param name="datasetRecords"        select="$indicatorViewDatasetRecords"/>
     142                                <xsl:with-param name="dimensions"               select="$Indicator.dimensions"/>
     143                                <xsl:with-param name="dimensionUsages"  select="$indicatorView/DIMENSION_USAGES"/>
     144                                <xsl:with-param name="datasetRecords"   select="$indicatorViewDatasetRecords"/>
    145145                                <xsl:with-param name="recordDimensionFields" select="$recordDimensionFields"/>
    146146                                <xsl:with-param name="recordAncillaryValueFields">
    147147                                        <xsl:call-template name="Indicator.recordAncillaryValueFields"/>
    148148                                </xsl:with-param>
    149                                 <xsl:with-param name="valueAttributes"       select="$Indicator.valueAttributes"/>
     149                                <xsl:with-param name="valueAttributes"  select="$Indicator.valueAttributes"/>
    150150
    151                                 <xsl:with-param name="measure"          select="$measure"/>
    152                                 <xsl:with-param name="measureTitle" select="ibis:getMeasureTitle($indicatorView/MEASURE_TITLE_OVERRIDE, $measure)"/>
    153                                 <xsl:with-param name="measureFormatPattern" select="$Indicator.measureFormatPattern"/>
     151                                <xsl:with-param name="measure"                  select="$measure"/>
     152                                <xsl:with-param name="measureTitle"             select="ibis:getMeasureTitle($indicatorView/MEASURE_TITLE_OVERRIDE, $measure)"/>
     153                                <xsl:with-param name="measureValueType" select="$Indicator.measureValueType"/>
    154154
    155                                 <xsl:with-param name="showMap"      select="$showMap"/>
    156                                 <xsl:with-param name="mapName"      select="$indicatorView/MAP_NAME"/>
     155                                <xsl:with-param name="showMap"                  select="$showMap"/>
     156                                <xsl:with-param name="mapName"                  select="$indicatorView/MAP_NAME"/>
    157157                                <xsl:with-param name="geoDimensionName" select="$indicatorView/MAP_DIMENSION_NAME"/>
    158158
    159                                 <xsl:with-param name="showChart"     select="$showChart"/>
    160                                 <xsl:with-param name="chartName"     select="$indicatorView/CHART_NAME"/>
    161                                 <xsl:with-param name="chartTitle"    select="ibis:getIndicatorViewChartTitle($indicatorView, $Page.completeIndicatorViewTitle)"/>
     159                                <xsl:with-param name="showChart"                select="$showChart"/>
     160                                <xsl:with-param name="chartName"                select="$indicatorView/CHART_NAME"/>
     161                                <xsl:with-param name="chartTitle"               select="ibis:getIndicatorViewChartTitle($indicatorView, $Page.completeIndicatorViewTitle)"/>
    162162
    163                                 <xsl:with-param name="showGrid"      select="$Page.showGrid"/>
     163                                <xsl:with-param name="showGrid"                 select="$Page.showGrid"/>
    164164                                <xsl:with-param name="showValueAttributeColumn" select="exists($indicatorViewDatasetRecords/RECORD[0 != string-length(VALUE_ATTRIBUTE_NAME)])"/>
    165                                 <xsl:with-param name="showLabelColumn"          select="exists($indicatorViewDatasetRecords/RECORD[0 != string-length(LABEL)])"/>
     165                                <xsl:with-param name="showLabelColumn"  select="exists($indicatorViewDatasetRecords/RECORD[0 != string-length(LABEL)])"/>
    166166                                <xsl:with-param name="baseExportFilename" select="$Page.completeIndicatorViewTitle"/>
    167167                        </xsl:call-template>
  • trunk/ibisph-view/src/main/webapp/xslt/html/query/module/result/DataViz.xslt

    r24395 r24432  
    4242
    4343                <xsl:param name="valueTypes"                    select="$QueryModule.valueTypes"/>
    44                 <xsl:param name="measureFormatPattern" select="($QueryModule.valueTypes/VALUE_TYPE[NAME = $measure/VALUE_TYPE_NAME]/XSLT_FORMAT_PATTERN)[1]"/>
     44                <xsl:param name="measureValueType"              select="$QueryModule.valueTypes/VALUE_TYPE[NAME = $measure/VALUE_TYPE_NAME][1]"/>
    4545                <xsl:param name="dimensions"                    select="$QueryModule.dimensions"/>
    4646                <xsl:param name="datasetRecords"                select="$queryModule/IBISQ_QUERY_RESULT/RECORDS"/>
     
    9797                                <xsl:with-param name="ancillaryValues"                  select="$ancillaryValues"/>
    9898                                <xsl:with-param name="valueTypes"                               select="$valueTypes"/>
    99                                 <xsl:with-param name="measureFormatPattern"             select="$measureFormatPattern"/>
     99                                <xsl:with-param name="measureValueType"                 select="$measureValueType"/>
    100100                        </xsl:call-template>
    101101                </xsl:variable>
     
    105105                                <xsl:with-param name="datasetRecords"                           select="$datasetRecords"/>
    106106                                <xsl:with-param name="recordAncillaryValueFields"       select="$recordAncillaryValueFields"/>
    107                                 <xsl:with-param name="measureFormatPattern"                     select="$measureFormatPattern"/>
     107                                <xsl:with-param name="measureValueType"                         select="$measureValueType"/>
    108108                        </xsl:call-template>
    109109                </xsl:variable>
     
    130130                        <xsl:with-param name="measure"          select="$measure"/>
    131131                        <xsl:with-param name="measureTitle"     select="$measureTitle"/>
    132                         <xsl:with-param name="measureFormatPattern" select="$measureFormatPattern"/>
     132                        <xsl:with-param name="measureValueType" select="$measureValueType"/>
    133133
    134134                        <xsl:with-param name="showMap"                  select="boolean($geoDimensionName) and ibis:DataViz.showMap($queryRequest/MAP_NAME)"/>
  • trunk/ibisph-view/src/main/webapp/xslt/json/Dataset.xslt

    r23490 r24432  
    5151                <xsl:param name="dimensions"/>
    5252                <xsl:param name="valueAttributes"/>
    53 
    54                 <xsl:param name="measureFormatPattern"/>
     53                <xsl:param name="measureValueType"/>
    5554
    5655                <!-- Loop all non total RECORDS.  Grand, overall total records only exist
     
    7372                        </xsl:for-each>
    7473        ,"MeasureValue": <xsl:value-of select="ibis:getJavaScriptValue($datasetRecord/MEASURE/VALUE)"/>
    75         ,"MeasureValueTitle":"<xsl:value-of select="ibis:getFormattedNumber($datasetRecord/MEASURE/VALUE, $measureFormatPattern)"/>"
     74        ,"MeasureValueTitle":"<xsl:value-of select="ibis:getFormattedNumber($datasetRecord/MEASURE/VALUE, $measureValueType/XSLT_FORMAT_PATTERN)"/>"
    7675        <xsl:if test="0 != string-length($datasetRecord/LABEL)">
    7776        ,"Label":"<xsl:value-of select="$datasetRecord/LABEL"/>"
     
    115114                <xsl:param name="dimensions" ibis:doc="All dimensions"/>
    116115                <xsl:param name="dimension" select="$dimensions/DIMENSION[NAME=$datasetRecordDimension/NAME]"/>
    117                 <xsl:param name="dimensionFieldName" select="$recordDimensionFields/RECORD_DIMENSION_FIELD[DIMENSION_NAMES/DIMENSION_NAME = $datasetRecordDimension/NAME]/RECORD_FIELD_NAME"/>
     116                <xsl:param name="dimensionFieldName" select="$recordDimensionFields/RECORD_DIMENSION_FIELD[DIMENSION_NAMES/DIMENSION_NAME = $datasetRecordDimension/NAME]/NAME"/>
    118117
    119118                <!-- use the matching dimension/VALUE if exists otherwise use the
     
    143142                                TITLE
    144143                                XSLT_FORMAT_PATTERN
     144                                JAVASCRIPT_FORMAT_PATTERN
    145145                                [INFO_FIELD_FLAG]
    146146                        with records of struct:
  • trunk/ibisph-view/src/main/webapp/xslt/json/IndicatorViewDataset.xslt

    r23335 r24432  
    8383        <xsl:template match="/">
    8484                <xsl:variable name="measure" select="$Indicator.measure"/>
    85                 <xsl:variable name="measureFormatPattern" select="($Indicator.valueTypes/VALUE_TYPE[NAME = $measure/VALUE_TYPE_NAME]/XSLT_FORMAT_PATTERN)[1]"/>
     85                <xsl:variable name="measureValueType" select="$Indicator.measureValueType"/>
    8686
    8787                <xsl:variable name="recordDimensionFields">
     
    112112                                <xsl:with-param name="ancillaryValues"                  select="$Indicator.ancillaryValues"/>
    113113                                <xsl:with-param name="valueTypes"                               select="$Indicator.valueTypes"/>
    114                                 <xsl:with-param name="measureFormatPattern"             select="$Indicator.measureFormatPattern"/>
     114                                <xsl:with-param name="measureValueType"                 select="$Indicator.measureValueType"/>
    115115                        </xsl:call-template>
    116116                </xsl:variable>
     
    123123                        <xsl:with-param name="recordAncillaryValueFields"       select="$recordAncillaryValueFields"/>
    124124                        <xsl:with-param name="valueAttributes"                          select="$Indicator.valueAttributes"/>
    125                         <xsl:with-param name="measureFormatPattern"                     select="$measureFormatPattern"/>
     125                        <xsl:with-param name="measureValueType"                         select="$measureValueType"/>
    126126                </xsl:call-template>
    127127                <xsl:text/>]
  • trunk/ibisph-view/src/main/webapp/xslt/xml/ComparisonValues.xslt

    r23491 r24432  
    235235
    236236                <xsl:variable name="measure"    select="$measures//MEASURE[NAME = $measureName]"/>
    237                 <xsl:variable name="formatPattern" select="$valueTypes/VALUE_TYPE[NAME = $measure/VALUE_TYPE_NAME]/XSLT_FORMAT_PATTERN"/>
     237                <xsl:variable name="measureXSLTFormatPattern" select="$valueTypes/VALUE_TYPE[NAME = $measure/VALUE_TYPE_NAME]/XSLT_FORMAT_PATTERN"/>
    238238                <xsl:variable name="communityMeasureValue" select="number($communityRecord/MEASURE/VALUE)"/>
    239239                <xsl:variable name="communityLowerLimit"   select="number($communityRecord/ANCILLARY_VALUES/ANCILLARY_VALUE[NAME = $ComparisonValues.lowerLimitAncillaryValueName]/VALUE)"/>
     
    250250                                <VALUE>
    251251                                        <xsl:value-of select="$communityMeasureValue"/>
    252                                         <TITLE><xsl:value-of select="ibis:getFormattedNumber($communityMeasureValue, $formatPattern)"/></TITLE>
     252                                        <TITLE><xsl:value-of select="ibis:getFormattedNumber($communityMeasureValue, $measureXSLTFormatPattern)"/></TITLE>
    253253                                </VALUE>
    254254                        <xsl:if test="boolean($communityLowerLimit)">
    255255                                <LOWER_LIMIT>
    256256                                        <xsl:value-of select="$communityLowerLimit"/>
    257                                         <TITLE><xsl:value-of select="ibis:getFormattedNumber($communityLowerLimit, $formatPattern)"/></TITLE>
     257                                        <TITLE><xsl:value-of select="ibis:getFormattedNumber($communityLowerLimit, $measureXSLTFormatPattern)"/></TITLE>
    258258                                </LOWER_LIMIT>
    259259                        </xsl:if>
     
    261261                                <UPPER_LIMIT>
    262262                                        <xsl:value-of select="$communityUpperLimit"/>
    263                                         <TITLE><xsl:value-of select="ibis:getFormattedNumber($communityUpperLimit, $formatPattern)"/></TITLE>
     263                                        <TITLE><xsl:value-of select="ibis:getFormattedNumber($communityUpperLimit, $measureXSLTFormatPattern)"/></TITLE>
    264264                                </UPPER_LIMIT>
    265265                        </xsl:if>
     
    277277                                <VALUE>
    278278                                        <xsl:value-of select="$stateRecord[1]/MEASURE/VALUE"/>
    279                                         <TITLE><xsl:value-of select="ibis:getFormattedNumber($stateRecord[1]/MEASURE/VALUE, $formatPattern)"/></TITLE>
     279                                        <TITLE><xsl:value-of select="ibis:getFormattedNumber($stateRecord[1]/MEASURE/VALUE, $measureXSLTFormatPattern)"/></TITLE>
    280280                                        <xsl:variable name="stateComparisonClass">
    281281                                                <xsl:call-template name="ComparisonValues.comparisonClass">
     
    302302                                <VALUE>
    303303                                        <xsl:value-of select="$usRecord[1]/MEASURE/VALUE"/>
    304                                         <TITLE><xsl:value-of select="ibis:getFormattedNumber($usRecord[1]/MEASURE/VALUE, $formatPattern)"/></TITLE>
     304                                        <TITLE><xsl:value-of select="ibis:getFormattedNumber($usRecord[1]/MEASURE/VALUE, $measureXSLTFormatPattern)"/></TITLE>
    305305                                        <xsl:variable name="usComparisonClass">
    306306                                                <xsl:call-template name="ComparisonValues.comparisonClass">
  • trunk/ibisph-view/src/main/webapp/xslt/xml/Initiative.xslt

    r23487 r24432  
    187187
    188188                <xsl:variable name="measure"    select="$indicator/MEASURES/MEASURE[NAME=$initiativeTopicObjective/MEASURE_NAME[1]]"/>
    189                 <xsl:variable name="measureFormatPattern" select="($indicator/VALUE_TYPES/VALUE_TYPE[NAME = $measure/VALUE_TYPE_NAME]/XSLT_FORMAT_PATTERN)[1]"/>
     189                <xsl:variable name="measureValueType" select="$indicator/VALUE_TYPES/VALUE_TYPE[NAME = $measure/VALUE_TYPE_NAME][1]"/>
    190190                <xsl:variable name="indicatorPeriodValues" select="$indicator//DIMENSION_COMBINATION/PERIOD_DIMENSION/VALUES/VALUE"/>
    191191
     
    249249                                <xsl:call-template name="Initiative.indicatorDatasetRecord">
    250250                                        <xsl:with-param name="initiativeTopicObjective" select="$initiativeTopicObjective"/>
    251                                         <xsl:with-param name="measure"   select="$measure"/>
    252                                         <xsl:with-param name="measureFormatPattern" select="$measureFormatPattern"/>
     251                                        <xsl:with-param name="measure"                  select="$measure"/>
     252                                        <xsl:with-param name="measureValueType" select="$measureValueType"/>
    253253
    254254                                        <xsl:with-param name="communityDatasetRecords" select="$communityDSRs"/>
     
    283283
    284284                <xsl:param name="measure"/>
    285                 <xsl:param name="measureFormatPattern"/>
     285                <xsl:param name="measureValueType"/>
    286286                <xsl:param name="desirableValue" select="$measure/DESIRABLE_VALUE"/>
    287287
     
    362362                <VALUE_RANGE><xsl:value-of select="$valueRange"/></VALUE_RANGE>
    363363                <PRORATED_VALUE><xsl:value-of select="$proratedValue"/></PRORATED_VALUE>
    364                 <PRORATED_VALUE_TITLE><xsl:value-of select="ibis:getFormattedNumber($proratedValue, $measureFormatPattern)"/></PRORATED_VALUE_TITLE>
    365                 <VALUE_TITLE><xsl:value-of select="ibis:getFormattedNumber($dsr/MEASURE/VALUE, $measureFormatPattern)"/></VALUE_TITLE>
     364                <PRORATED_VALUE_TITLE><xsl:value-of select="ibis:getFormattedNumber($proratedValue, $measureValueType/XSLT_FORMAT_PATTERN)"/></PRORATED_VALUE_TITLE>
     365                <VALUE_TITLE><xsl:value-of select="ibis:getFormattedNumber($dsr/MEASURE/VALUE, $measureValueType/XSLT_FORMAT_PATTERN)"/></VALUE_TITLE>
    366366                <REMAINING_VALUE><xsl:value-of select="$remainingValue"/></REMAINING_VALUE>
    367367                <END_HOW_DOING_GROUP><xsl:value-of select="$endHowDoingGroup"/></END_HOW_DOING_GROUP>
  • trunk/ibisph-view/src/main/webapp/xslt/xml/Interactive.xslt

    r24408 r24432  
    264264                                TITLE - either label or title or name
    265265                                XSLT_FORMAT_PATTERN
     266                                JAVASCRIPT_FORMAT_PATTERN
    266267                                [INFO_FIELD_FLAG] - flag element for label and notes?????????????
    267268                "
     
    270271                <xsl:param name="ancillaryValues"                       ibis:doc="complete AV defs"/>
    271272                <xsl:param name="valueTypes"                            ibis:doc="complete VT defs"/>
    272                 <xsl:param name="measureFormatPattern"          ibis:doc="from measure and value type."/>
     273                <xsl:param name="measureValueType"/>
    273274
    274275                <xsl:for-each select="$datasetAncillaryValues/DATASET_ANCILLARY_VALUE">
     
    288289                        </xsl:choose>
    289290
    290                         <xsl:variable name="formatPattern" select="
    291                                 if( exists( ($valueTypes//VALUE_TYPE[NAME = $ancillaryValue/VALUE_TYPE_NAME]/XSLT_FORMAT_PATTERN)[1] ))
    292                                 then ($valueTypes//VALUE_TYPE[NAME = $ancillaryValue/VALUE_TYPE_NAME]/XSLT_FORMAT_PATTERN)[1]
    293                                 else $measureFormatPattern
    294                         "/>
    295                         <xsl:copy-of select="$formatPattern"/>
     291                        <xsl:choose>
     292                                <xsl:when test="exists($valueTypes//VALUE_TYPE[NAME = $ancillaryValue/VALUE_TYPE_NAME])">
     293                                        <xsl:copy-of select="$valueTypes//VALUE_TYPE[NAME = $ancillaryValue/VALUE_TYPE_NAME]/XSLT_FORMAT_PATTERN"/>
     294                                        <xsl:copy-of select="$valueTypes//VALUE_TYPE[NAME = $ancillaryValue/VALUE_TYPE_NAME]/JAVASCRIPT_FORMAT_PATTERN"/>
     295                                </xsl:when>
     296                                <xsl:otherwise>
     297                                        <xsl:copy-of select="$measureValueType/XSLT_FORMAT_PATTERN"/>
     298                                        <xsl:copy-of select="$measureValueType/JAVASCRIPT_FORMAT_PATTERN"/>
     299                                </xsl:otherwise>
     300                        </xsl:choose>
    296301                </RECORD_ANCILLARY_VALUE_FIELD>
    297302                </xsl:for-each>
     
    312317                <xsl:param name="datasetRecords"/>
    313318                <xsl:param name="recordAncillaryValueFields"/>
    314                 <xsl:param name="measureFormatPattern"/>
     319                <xsl:param name="measureValueType"/>
    315320                <xsl:param name="totalDimensionValue" select="'.'"/>
    316321
     
    319324                        <DATASET_RECORD_TOTAL_VALUE>
    320325                                <NAME>Measure</NAME>
    321                                 <TITLE><xsl:value-of select="ibis:getFormattedNumber($totalDatasetRecord/MEASURE/VALUE, $measureFormatPattern)"/></TITLE>
     326                                <TITLE><xsl:value-of select="ibis:getFormattedNumber($totalDatasetRecord/MEASURE/VALUE, $measureValueType/XSLT_FORMAT_PATTERN)"/></TITLE>
    322327                        </DATASET_RECORD_TOTAL_VALUE>
    323328
Note: See TracChangeset for help on using the changeset viewer.