Changeset 24432 in main
- Timestamp:
- 01/07/22 18:14:06 (4 months ago)
- 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 73 73 passed in will be returned as is." 74 74 /> 75 <xsl:param name="valueIfNaN" ibis:doc="Value to return if the number is NOT a number()."/> 75 76 76 77 <xsl:choose> … … 80 81 81 82 <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"/> 83 84 </xsl:when> 84 85 … … 101 102 </xsl:otherwise> 102 103 </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)"/> 103 111 </xsl:function> 104 112 -
trunk/ibisph-view/src/main/webapp/xslt/html/community/indicator/Page.xslt
r23487 r24432 237 237 238 238 <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="measure FormatPattern" 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]"/> 240 240 <xsl:call-template name="DataViz.leafletKendoScript"> 241 241 <xsl:with-param name="scriptContainerID" select="concat('script', position())"/> … … 250 250 <xsl:with-param name="ancillaryValues" select="$Indicator.ancillaryValues"/> 251 251 <xsl:with-param name="valueTypes" select="$Indicator.valueTypes"/> 252 <xsl:with-param name="measure FormatPattern" select="$measureFormatPattern"/>252 <xsl:with-param name="measureValueType" select="$measureValueType"/> 253 253 </xsl:call-template> 254 254 </xsl:with-param> … … 261 261 262 262 <xsl:with-param name="measure" select="$measure"/> 263 <xsl:with-param name="measure FormatPattern" select="$measureFormatPattern"/>263 <xsl:with-param name="measureValueType" select="$measureValueType"/> 264 264 265 265 <xsl:with-param name="showMap" select="$showMap"/> -
trunk/ibisph-view/src/main/webapp/xslt/html/community/initiatives/Page.xslt
r23428 r24432 110 110 <xsl:param name="measure" select="$indicator/MEASURES/MEASURE[NAME=$initiativeTopicObjective/MEASURE_NAME[1]]"/> 111 111 112 <xsl:variable name="measure FormatPattern" 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"/> 113 113 <xsl:variable name="indicatorPeriodValues" select="$indicator//DIMENSION_COMBINATION/PERIOD_DIMENSION/VALUES/VALUE"/> 114 114 … … 152 152 153 153 <br/> 154 154 155 <div>Baseline Value: 155 <xsl:value-of select="ibis:getFormattedNumber($initiativeTopicObjective/TARGET_BASELINE_VALUE, $measure FormatPattern)"/>156 <xsl:value-of select="ibis:getFormattedNumber($initiativeTopicObjective/TARGET_BASELINE_VALUE, $measureXSLTFormatPattern)"/> 156 157 , starting: <xsl:value-of select="ibis:getFormattedNumber($initiativeTopicObjective/TARGET_BASELINE_YEAR, '####')"/> 157 158 </div> 158 159 <div>Target Goal Value (<xsl:value-of select="$initiativeTopicObjective/TARGET_LABEL"/>): 159 <xsl:value-of select="ibis:getFormattedNumber($initiativeTopicObjective/TARGET_GOAL_VALUE, $measure FormatPattern)"/>160 <xsl:value-of select="ibis:getFormattedNumber($initiativeTopicObjective/TARGET_GOAL_VALUE, $measureXSLTFormatPattern)"/> 160 161 , by: <xsl:value-of select="ibis:getFormattedNumber($initiativeTopicObjective/TARGET_GOAL_YEAR, '####')"/> 161 162 </div> … … 188 189 <xsl:variable name="communityDimension" select="$dimensions/DIMENSION[exists(COMMUNITY_FLAG)]1]"/> 189 190 --> 190 <xsl:variable name="communityDimension" select=" NULL"/>191 <xsl:variable name="communityDimension" select="$dimensions/DIMENSION[NAME='GeoSarea']"/> 191 192 <xsl:for-each select="if(exists($communityDimension/TITLE)) then $communityDimension else $dimensions/DIMENSION[exists(COMMUNITY_FLAG)]"> 192 193 <xsl:sort select="SORT_ORDER" order="ascending" data-type="number"/> … … 208 209 <!-- the commun DSR's non community dim is the period dim name and value. --> 209 210 <xsl:variable name="communityPeriodDimensions" select="$communityDSRs/DIMENSIONS/DIMENSION[NAME != $communityDimension/NAME]"/> 210 <xsl:variable name="maxCommunityPeriod DimensionValue" 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: ', $maxCommunityPeriod DimensionValue, ', 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))"/> 216 217 217 218 <tr scope="row"> … … 230 231 <xsl:call-template name="Page.communityRow"> 231 232 <xsl:with-param name="measure" select="$measure"/> 232 <xsl:with-param name="measureFormatPattern" select="$measureFormatPattern"/> 233 233 <xsl:with-param name="measureXSLTFormatPattern" select="$measureXSLTFormatPattern"/> 234 234 <xsl:with-param name="initiativeTopicObjective" select="$initiativeTopicObjective"/> 235 236 235 <xsl:with-param name="communityDatasetRecords" select="$communityDSRs"/> 237 236 <xsl:with-param name="periodDimension" select="$dimensions/DIMENSION[NAME = $periodDimensionName]"/> 238 <xsl:with-param name="period DimensionTextValue" select="$maxCommunityPeriodDimensionValue"/>237 <xsl:with-param name="periodValue" select="$maxCommunityPeriodDimensionValue"/> 239 238 <xsl:with-param name="communityDimension" select="$communityDimension"/> 240 239 <xsl:with-param name="communityDimensionValue" select="."/> … … 253 252 </footer> 254 253 254 255 255 <xsl:message> 256 256 <xsl:call-template name="Initiative.datasetRecords"> … … 273 273 <xsl:with-param name="measure" select="$indicator/MEASURES/MEASURE[NAME=$initiativeTopicObjective/MEASURE_NAME[1]]"/> 274 274 --> 275 <xsl:with-param name="communityName" select="'GeoSarea'"/> 276 <xsl:with-param name="communityDimensionValue" select="NULL"/> 277 275 278 </xsl:call-template> 276 279 </xsl:message> … … 284 287 > 285 288 <xsl:param name="initiativeTopicObjective" /> 286 <xsl:param name="baseValue" 287 <xsl:param name="targetValue" 288 <xsl:param name="baseYear" 289 <xsl:param name="targetYear" 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)"/> 290 293 291 294 <xsl:param name="communityDatasetRecords"/> 292 295 293 296 <xsl:param name="measure"/> 294 <xsl:param name="measure FormatPattern"/>297 <xsl:param name="measureXSLTFormatPattern"/> 295 298 <xsl:param name="desirableValue" select="$measure/DESIRABLE_VALUE"/> 296 299 297 300 <xsl:param name="communityDimension"/> 298 <xsl:param name="community DimensionName" select="$communityDimension/NAME"/>301 <xsl:param name="communityName" select="$communityDimension/NAME"/> 299 302 <xsl:param name="communityDimensionValue"/> 300 <xsl:param name="communityDimensionTextValue" select="ibis:getNormalizedText($communityDimensionValue)"/> 301 302 303 <xsl:param name="communityValue" select="ibis:getNormalizedText($communityDimensionValue)"/> 303 304 304 305 <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]"/> 310 309 311 310 <xsl:variable name="dsr" select="$communityDatasetRecords[ 312 (DIMENSIONS/DIMENSION[(NAME = $community DimensionName) and (VALUE = $communityDimensionTextValue)])311 (DIMENSIONS/DIMENSION[(NAME = $communityName) and (VALUE = $communityValue)]) 313 312 and 314 (DIMENSIONS/DIMENSION[(NAME = $period DimensionName) and (VALUE = $periodDimensionTextValue)])313 (DIMENSIONS/DIMENSION[(NAME = $periodName) and (VALUE = $periodValue)]) 315 314 ] 316 315 "/> 317 316 318 <xsl:if test="0 != string-length($dsr//MEASURE/VALUE)">317 <xsl:if test="0 != string-length($dsr//MEASURE/VALUE)"> 319 318 <xsl:variable name="periodRange" select="$targetYear - $baseYear"/> 320 <xsl:variable name="periodPecentage" select="(number($period DimensionTextValue) - $baseYear) div $periodRange"/>319 <xsl:variable name="periodPecentage" select="(number($periodValue) - $baseYear) div $periodRange"/> 321 320 <xsl:variable name="baseTargetRange" select="$targetValue - $baseValue"/> 322 321 <xsl:variable name="proratedTarget" select="$baseValue + ($baseTargetRange * $periodPecentage)"/> 323 322 <xsl:variable name="valueVsTarget" select="$dsr/MEASURE/VALUE - targetValue"/> 324 <xsl:variable name="targetStatus" select="ibis:getFormattedNumber($proratedTarget - $dsr/MEASURE/VALUE, $measure FormatPattern)"/>323 <xsl:variable name="targetStatus" select="ibis:getFormattedNumber($proratedTarget - $dsr/MEASURE/VALUE, $measureXSLTFormatPattern)"/> 325 324 326 325 <xsl:variable name="currentStatus"> 327 326 <xsl:choose> 328 327 329 <xsl:when test="('LOW' = $desirableValue) and $targetValue and ($dsr/MEASURE/VALUE <=$targetValue)">328 <xsl:when test="('LOW' = $desirableValue) and $targetValue and ($dsr/MEASURE/VALUE le $targetValue)"> 330 329 REACHED 331 330 </xsl:when> 332 <xsl:when test="('LOW' = $desirableValue) and ($dsr/MEASURE/VALUE <=$proratedTarget)">331 <xsl:when test="('LOW' = $desirableValue) and ($dsr/MEASURE/VALUE le $proratedTarget)"> 333 332 TRACKING 334 333 </xsl:when> 335 <xsl:when test="('LOW' = $desirableValue) and ($dsr/MEASURE/VALUE <=$baseValue)">334 <xsl:when test="('LOW' = $desirableValue) and ($dsr/MEASURE/VALUE le $baseValue)"> 336 335 PROGRESSING 337 336 </xsl:when> 338 337 339 <xsl:when test="('HIGH' = desirableValue) and ($dsr/MEASURE/VALUE >=$targetValue)">338 <xsl:when test="('HIGH' = desirableValue) and ($dsr/MEASURE/VALUE ge $targetValue)"> 340 339 REACHED 341 340 </xsl:when> 342 <xsl:when test="('HIGH' = $desirableValue) and ($dsr/MEASURE/VALUE >=$proratedTarget)">341 <xsl:when test="('HIGH' = $desirableValue) and ($dsr/MEASURE/VALUE ge $proratedTarget)"> 343 342 TRACKING 344 343 </xsl:when> 345 <xsl:when test="('HIGH' = $desirableValue) and ($dsr/MEASURE/VALUE >=$baseValue)">344 <xsl:when test="('HIGH' = $desirableValue) and ($dsr/MEASURE/VALUE ge $baseValue)"> 346 345 PROGRESSING 347 346 </xsl:when> … … 361 360 <tr> 362 361 <td class="Indicator"> 363 <a href="community/facts/{community DimensionName}/{communityDimensionTextValue}.html"362 <a href="community/facts/{communityName}/{communityValue}.html" 364 363 title="Click here to see a more detailed comparison of {communityIndicator/TITLE}" class="Block" 365 364 > … … 372 371 373 372 <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, $measure FormatPattern)"/>373 <xsl:value-of select="ibis:getFormattedNumber($dsr/MEASURE/VALUE, $measureXSLTFormatPattern)"/> 375 374 </td> 376 375 … … 378 377 379 378 <!-- 380 <xsl: value-ofselect="$baseYear div ($targetYear - $baseYear)"/>379 <xsl:sequence select="$baseYear div ($targetYear - $baseYear)"/> 381 380 --> 382 381 year range: <xsl:value-of select="$periodRange"/><br/> 383 382 % of years: <xsl:value-of select="ibis:getFormattedNumber($periodPecentage, '##.#%')"/><br/> 384 Target - Base Range: <xsl:value-of select="ibis:getFormattedNumber($baseTargetRange, $measure FormatPattern)"/>383 Target - Base Range: <xsl:value-of select="ibis:getFormattedNumber($baseTargetRange, $measureXSLTFormatPattern)"/> 385 384 </td> 386 385 387 386 <td class="Value TextAlignCenter" title="Community value for {communityIndicator/PERIOD_DIMENSION/VALUE/TITLE}"> 388 current goal: <xsl:value-of select="ibis:getFormattedNumber($proratedTarget, $measure FormatPattern)"/><br/>389 How going:<xsl:value-of select="ibis:getFormattedNumber($dsr/MEASURE/VALUE - $proratedTarget, $measure FormatPattern)"/><br/>390 Overall:<xsl:value-of select="ibis:getFormattedNumber($valueVsTarget, $measure FormatPattern)"/><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/> 391 390 Status:<xsl:value-of select="$currentStatus"/> 392 391 <!-- 393 <xsl:value-of select="ibis:getFormattedNumber($baseValue - $dsr/MEASURE/VALUE, $measure FormatPattern)"/>,394 <xsl:value-of select="ibis:getFormattedNumber($targetValue - $dsr/MEASURE/VALUE, $measure FormatPattern)"/>,392 <xsl:value-of select="ibis:getFormattedNumber($baseValue - $dsr/MEASURE/VALUE, $measureXSLTFormatPattern)"/>, 393 <xsl:value-of select="ibis:getFormattedNumber($targetValue - $dsr/MEASURE/VALUE, $measureXSLTFormatPattern)"/>, 395 394 396 395 <xsl:value-of select="$baseValue"/>, -
trunk/ibisph-view/src/main/webapp/xslt/html/indicator/profile/ContentBlocks.xslt
r23665 r24432 188 188 <xsl:with-param name="measure" select="$Indicator.measure"/> 189 189 <xsl:with-param name="measureTitle" select="ibis:getMeasureTitle($indicatorView/MEASURE_TITLE_OVERRIDE, $Indicator.measure)"/> 190 <xsl:with-param name="measure FormatPattern" select="$Indicator.measureFormatPattern"/>190 <xsl:with-param name="measureValueType" select="$Indicator.measureValueType"/> 191 191 192 192 <xsl:with-param name="showMap" select="$showMap"/> -
trunk/ibisph-view/src/main/webapp/xslt/html/indicator/profile/Indicator.xslt
r24331 r24432 65 65 <xsl:param name="Indicator.measures" select="if($Indicator.useExternalXML) then $Measures/MEASURES else $Indicator.indicator/MEASURES"/> 66 66 <xsl:param name="Indicator.measure" select="$Indicator.measures/MEASURE[NAME=$Indicator.indicatorView/MEASURE_NAME]"/> 67 <xsl:param name="Indicator.measure FormatPattern" 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]"/> 68 68 69 69 <xsl:param name="ValueTypes"/> … … 298 298 <xsl:param name="measure" select="$Indicator.measures/MEASURE[NAME=$initiative/INITIATIVE_TOPIC/INITIATIVE_TOPIC_OBJECTIVE/MEASURE_NAME]"/> 299 299 300 <xsl:variable name="measure FormatPattern" 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"/> 301 301 302 302 <h3 title="{$initiative/DESCRIPTION}"> … … 340 340 <div>Desirable Value: <xsl:value-of select="$measure/DESIRABLE_VALUE"/></div> 341 341 <div>Baseline Value: 342 <xsl:value-of select="ibis:getFormattedNumber($initiative/INITIATIVE_TOPIC/INITIATIVE_TOPIC_OBJECTIVE/TARGET_BASELINE_VALUE, $measure FormatPattern)"/>342 <xsl:value-of select="ibis:getFormattedNumber($initiative/INITIATIVE_TOPIC/INITIATIVE_TOPIC_OBJECTIVE/TARGET_BASELINE_VALUE, $measureXSLTFormatPattern)"/> 343 343 , starting: <xsl:value-of select="ibis:getFormattedNumber($initiative/INITIATIVE_TOPIC/INITIATIVE_TOPIC_OBJECTIVE/TARGET_BASELINE_YEAR, '####')"/> 344 344 </div> 345 345 <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, $measure FormatPattern)"/>346 <xsl:value-of select="ibis:getFormattedNumber($initiative/INITIATIVE_TOPIC/INITIATIVE_TOPIC_OBJECTIVE/TARGET_GOAL_VALUE, $measureXSLTFormatPattern)"/> 347 347 , by: <xsl:value-of select="ibis:getFormattedNumber($initiative/INITIATIVE_TOPIC/INITIATIVE_TOPIC_OBJECTIVE/TARGET_GOAL_YEAR, '####')"/> 348 348 </div> … … 856 856 <xsl:param name="ancillaryValues" select="$Indicator.ancillaryValues"/> 857 857 <xsl:param name="valueTypes" select="$Indicator.valueTypes"/> 858 <xsl:param name="measure FormatPattern" select="$Indicator.measureFormatPattern"/>858 <xsl:param name="measureValueType" select="$Indicator.measureValueType"/> 859 859 860 860 <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)"/> … … 868 868 <xsl:with-param name="ancillaryValues" select="$ancillaryValues"/> 869 869 <xsl:with-param name="valueTypes" select="$valueTypes"/> 870 <xsl:with-param name="measure FormatPattern" select="$measureFormatPattern"/>870 <xsl:with-param name="measureValueType" select="$measureValueType"/> 871 871 </xsl:call-template> 872 872 </xsl:template> -
trunk/ibisph-view/src/main/webapp/xslt/html/indicator/profile/complete_profile/Page.xslt
r23665 r24432 97 97 <xsl:variable name="indicatorView" select="document(concat(current(), '.xml'), /)/INDICATOR_VIEW"/> 98 98 <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="measure FormatPattern" 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]"/> 100 100 <xsl:variable name="dataVizContainerIDPrefix" select="ibis:firstLetterLowerCase( replace($indicatorView/NAME, '\.', '_') )"/> 101 101 <xsl:variable name="dataVizObjectName" select="concat($dataVizContainerIDPrefix, 'DataViz')"/> … … 177 177 <xsl:with-param name="measure" select="$measure"/> 178 178 <xsl:with-param name="measureTitle" select="ibis:getMeasureTitle($indicatorView/MEASURE_TITLE_OVERRIDE, $measure)"/> 179 <xsl:with-param name="measure FormatPattern" select="$measureFormatPattern"/>179 <xsl:with-param name="measureValueType" select="$measureValueType"/> 180 180 181 181 <xsl:with-param name="showMap" select="$showMap"/> -
trunk/ibisph-view/src/main/webapp/xslt/html/indicator/profile/summary/Page.xslt
r23505 r24432 55 55 <xsl:variable name="indicatorView" select="document(concat(current(), '.xml'), /)/INDICATOR_VIEW"/> 56 56 <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="measure FormatPattern" 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]"/> 58 58 <xsl:variable name="dataVizContainerIDPrefix" select="ibis:firstLetterLowerCase( replace($indicatorView/NAME, '\.', '_') )"/> 59 59 <xsl:variable name="dataVizObjectName" select="concat($dataVizContainerIDPrefix, 'DataViz')"/> … … 117 117 <xsl:with-param name="measure" select="$measure"/> 118 118 <xsl:with-param name="measureTitle" select="ibis:getMeasureTitle($indicatorView/MEASURE_TITLE_OVERRIDE, $measure)"/> 119 <xsl:with-param name="measure FormatPattern" select="$measureFormatPattern"/>119 <xsl:with-param name="measureValueType" select="$measureValueType"/> 120 120 121 121 <xsl:with-param name="showMap" select="$showMap"/> -
trunk/ibisph-view/src/main/webapp/xslt/html/indicator/profile/view/Page.xslt
r23335 r24432 140 140 <xsl:with-param name="containerIDPrefix" select="$dataVizContainerIDPrefix"/> 141 141 142 <xsl:with-param name="dimensions" 143 <xsl:with-param name="dimensionUsages" 144 <xsl:with-param name="datasetRecords" 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"/> 145 145 <xsl:with-param name="recordDimensionFields" select="$recordDimensionFields"/> 146 146 <xsl:with-param name="recordAncillaryValueFields"> 147 147 <xsl:call-template name="Indicator.recordAncillaryValueFields"/> 148 148 </xsl:with-param> 149 <xsl:with-param name="valueAttributes" 149 <xsl:with-param name="valueAttributes" select="$Indicator.valueAttributes"/> 150 150 151 <xsl:with-param name="measure" 152 <xsl:with-param name="measureTitle" 153 <xsl:with-param name="measure FormatPattern" 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"/> 154 154 155 <xsl:with-param name="showMap" 156 <xsl:with-param name="mapName" 155 <xsl:with-param name="showMap" select="$showMap"/> 156 <xsl:with-param name="mapName" select="$indicatorView/MAP_NAME"/> 157 157 <xsl:with-param name="geoDimensionName" select="$indicatorView/MAP_DIMENSION_NAME"/> 158 158 159 <xsl:with-param name="showChart" 160 <xsl:with-param name="chartName" 161 <xsl:with-param name="chartTitle" 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)"/> 162 162 163 <xsl:with-param name="showGrid" 163 <xsl:with-param name="showGrid" select="$Page.showGrid"/> 164 164 <xsl:with-param name="showValueAttributeColumn" select="exists($indicatorViewDatasetRecords/RECORD[0 != string-length(VALUE_ATTRIBUTE_NAME)])"/> 165 <xsl:with-param name="showLabelColumn" 165 <xsl:with-param name="showLabelColumn" select="exists($indicatorViewDatasetRecords/RECORD[0 != string-length(LABEL)])"/> 166 166 <xsl:with-param name="baseExportFilename" select="$Page.completeIndicatorViewTitle"/> 167 167 </xsl:call-template> -
trunk/ibisph-view/src/main/webapp/xslt/html/query/module/result/DataViz.xslt
r24395 r24432 42 42 43 43 <xsl:param name="valueTypes" select="$QueryModule.valueTypes"/> 44 <xsl:param name="measure FormatPattern" 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]"/> 45 45 <xsl:param name="dimensions" select="$QueryModule.dimensions"/> 46 46 <xsl:param name="datasetRecords" select="$queryModule/IBISQ_QUERY_RESULT/RECORDS"/> … … 97 97 <xsl:with-param name="ancillaryValues" select="$ancillaryValues"/> 98 98 <xsl:with-param name="valueTypes" select="$valueTypes"/> 99 <xsl:with-param name="measure FormatPattern" select="$measureFormatPattern"/>99 <xsl:with-param name="measureValueType" select="$measureValueType"/> 100 100 </xsl:call-template> 101 101 </xsl:variable> … … 105 105 <xsl:with-param name="datasetRecords" select="$datasetRecords"/> 106 106 <xsl:with-param name="recordAncillaryValueFields" select="$recordAncillaryValueFields"/> 107 <xsl:with-param name="measure FormatPattern" select="$measureFormatPattern"/>107 <xsl:with-param name="measureValueType" select="$measureValueType"/> 108 108 </xsl:call-template> 109 109 </xsl:variable> … … 130 130 <xsl:with-param name="measure" select="$measure"/> 131 131 <xsl:with-param name="measureTitle" select="$measureTitle"/> 132 <xsl:with-param name="measure FormatPattern" select="$measureFormatPattern"/>132 <xsl:with-param name="measureValueType" select="$measureValueType"/> 133 133 134 134 <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 51 51 <xsl:param name="dimensions"/> 52 52 <xsl:param name="valueAttributes"/> 53 54 <xsl:param name="measureFormatPattern"/> 53 <xsl:param name="measureValueType"/> 55 54 56 55 <!-- Loop all non total RECORDS. Grand, overall total records only exist … … 73 72 </xsl:for-each> 74 73 ,"MeasureValue": <xsl:value-of select="ibis:getJavaScriptValue($datasetRecord/MEASURE/VALUE)"/> 75 ,"MeasureValueTitle":"<xsl:value-of select="ibis:getFormattedNumber($datasetRecord/MEASURE/VALUE, $measure FormatPattern)"/>"74 ,"MeasureValueTitle":"<xsl:value-of select="ibis:getFormattedNumber($datasetRecord/MEASURE/VALUE, $measureValueType/XSLT_FORMAT_PATTERN)"/>" 76 75 <xsl:if test="0 != string-length($datasetRecord/LABEL)"> 77 76 ,"Label":"<xsl:value-of select="$datasetRecord/LABEL"/>" … … 115 114 <xsl:param name="dimensions" ibis:doc="All dimensions"/> 116 115 <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"/> 118 117 119 118 <!-- use the matching dimension/VALUE if exists otherwise use the … … 143 142 TITLE 144 143 XSLT_FORMAT_PATTERN 144 JAVASCRIPT_FORMAT_PATTERN 145 145 [INFO_FIELD_FLAG] 146 146 with records of struct: -
trunk/ibisph-view/src/main/webapp/xslt/json/IndicatorViewDataset.xslt
r23335 r24432 83 83 <xsl:template match="/"> 84 84 <xsl:variable name="measure" select="$Indicator.measure"/> 85 <xsl:variable name="measure FormatPattern" select="($Indicator.valueTypes/VALUE_TYPE[NAME = $measure/VALUE_TYPE_NAME]/XSLT_FORMAT_PATTERN)[1]"/>85 <xsl:variable name="measureValueType" select="$Indicator.measureValueType"/> 86 86 87 87 <xsl:variable name="recordDimensionFields"> … … 112 112 <xsl:with-param name="ancillaryValues" select="$Indicator.ancillaryValues"/> 113 113 <xsl:with-param name="valueTypes" select="$Indicator.valueTypes"/> 114 <xsl:with-param name="measure FormatPattern" select="$Indicator.measureFormatPattern"/>114 <xsl:with-param name="measureValueType" select="$Indicator.measureValueType"/> 115 115 </xsl:call-template> 116 116 </xsl:variable> … … 123 123 <xsl:with-param name="recordAncillaryValueFields" select="$recordAncillaryValueFields"/> 124 124 <xsl:with-param name="valueAttributes" select="$Indicator.valueAttributes"/> 125 <xsl:with-param name="measure FormatPattern" select="$measureFormatPattern"/>125 <xsl:with-param name="measureValueType" select="$measureValueType"/> 126 126 </xsl:call-template> 127 127 <xsl:text/>] -
trunk/ibisph-view/src/main/webapp/xslt/xml/ComparisonValues.xslt
r23491 r24432 235 235 236 236 <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"/> 238 238 <xsl:variable name="communityMeasureValue" select="number($communityRecord/MEASURE/VALUE)"/> 239 239 <xsl:variable name="communityLowerLimit" select="number($communityRecord/ANCILLARY_VALUES/ANCILLARY_VALUE[NAME = $ComparisonValues.lowerLimitAncillaryValueName]/VALUE)"/> … … 250 250 <VALUE> 251 251 <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> 253 253 </VALUE> 254 254 <xsl:if test="boolean($communityLowerLimit)"> 255 255 <LOWER_LIMIT> 256 256 <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> 258 258 </LOWER_LIMIT> 259 259 </xsl:if> … … 261 261 <UPPER_LIMIT> 262 262 <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> 264 264 </UPPER_LIMIT> 265 265 </xsl:if> … … 277 277 <VALUE> 278 278 <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> 280 280 <xsl:variable name="stateComparisonClass"> 281 281 <xsl:call-template name="ComparisonValues.comparisonClass"> … … 302 302 <VALUE> 303 303 <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> 305 305 <xsl:variable name="usComparisonClass"> 306 306 <xsl:call-template name="ComparisonValues.comparisonClass"> -
trunk/ibisph-view/src/main/webapp/xslt/xml/Initiative.xslt
r23487 r24432 187 187 188 188 <xsl:variable name="measure" select="$indicator/MEASURES/MEASURE[NAME=$initiativeTopicObjective/MEASURE_NAME[1]]"/> 189 <xsl:variable name="measure FormatPattern" 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]"/> 190 190 <xsl:variable name="indicatorPeriodValues" select="$indicator//DIMENSION_COMBINATION/PERIOD_DIMENSION/VALUES/VALUE"/> 191 191 … … 249 249 <xsl:call-template name="Initiative.indicatorDatasetRecord"> 250 250 <xsl:with-param name="initiativeTopicObjective" select="$initiativeTopicObjective"/> 251 <xsl:with-param name="measure" select="$measure"/>252 <xsl:with-param name="measure FormatPattern" select="$measureFormatPattern"/>251 <xsl:with-param name="measure" select="$measure"/> 252 <xsl:with-param name="measureValueType" select="$measureValueType"/> 253 253 254 254 <xsl:with-param name="communityDatasetRecords" select="$communityDSRs"/> … … 283 283 284 284 <xsl:param name="measure"/> 285 <xsl:param name="measure FormatPattern"/>285 <xsl:param name="measureValueType"/> 286 286 <xsl:param name="desirableValue" select="$measure/DESIRABLE_VALUE"/> 287 287 … … 362 362 <VALUE_RANGE><xsl:value-of select="$valueRange"/></VALUE_RANGE> 363 363 <PRORATED_VALUE><xsl:value-of select="$proratedValue"/></PRORATED_VALUE> 364 <PRORATED_VALUE_TITLE><xsl:value-of select="ibis:getFormattedNumber($proratedValue, $measure FormatPattern)"/></PRORATED_VALUE_TITLE>365 <VALUE_TITLE><xsl:value-of select="ibis:getFormattedNumber($dsr/MEASURE/VALUE, $measure FormatPattern)"/></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> 366 366 <REMAINING_VALUE><xsl:value-of select="$remainingValue"/></REMAINING_VALUE> 367 367 <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 264 264 TITLE - either label or title or name 265 265 XSLT_FORMAT_PATTERN 266 JAVASCRIPT_FORMAT_PATTERN 266 267 [INFO_FIELD_FLAG] - flag element for label and notes????????????? 267 268 " … … 270 271 <xsl:param name="ancillaryValues" ibis:doc="complete AV defs"/> 271 272 <xsl:param name="valueTypes" ibis:doc="complete VT defs"/> 272 <xsl:param name="measure FormatPattern" ibis:doc="from measure and value type."/>273 <xsl:param name="measureValueType"/> 273 274 274 275 <xsl:for-each select="$datasetAncillaryValues/DATASET_ANCILLARY_VALUE"> … … 288 289 </xsl:choose> 289 290 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> 296 301 </RECORD_ANCILLARY_VALUE_FIELD> 297 302 </xsl:for-each> … … 312 317 <xsl:param name="datasetRecords"/> 313 318 <xsl:param name="recordAncillaryValueFields"/> 314 <xsl:param name="measure FormatPattern"/>319 <xsl:param name="measureValueType"/> 315 320 <xsl:param name="totalDimensionValue" select="'.'"/> 316 321 … … 319 324 <DATASET_RECORD_TOTAL_VALUE> 320 325 <NAME>Measure</NAME> 321 <TITLE><xsl:value-of select="ibis:getFormattedNumber($totalDatasetRecord/MEASURE/VALUE, $measure FormatPattern)"/></TITLE>326 <TITLE><xsl:value-of select="ibis:getFormattedNumber($totalDatasetRecord/MEASURE/VALUE, $measureValueType/XSLT_FORMAT_PATTERN)"/></TITLE> 322 327 </DATASET_RECORD_TOTAL_VALUE> 323 328
Note: See TracChangeset
for help on using the changeset viewer.