source: main/trunk/ibisph-view/src/main/webapp/xslt/html/indicator/profile/view/Page.xslt @ 17255

Last change on this file since 17255 was 17255, checked in by Garth Braithwaite, 5 years ago

view - temp commit of ip and qm integration. Dataset and grid working for some. Removed the query interactive view and made it the default. Cleaned out newer but now unused java dataset related xml service code.

File size: 23.0 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2
3<xsl:stylesheet version="3.0" 
4        xmlns:xsl ="http://www.w3.org/1999/XSL/Transform" 
5        xmlns:xs  ="http://www.w3.org/2001/XMLSchema"
6        xmlns:ibis="http://www.ibisph.org"
7
8        exclude-result-prefixes="ibis xs xsl"
9>
10        <xsl:import href="../Page.xslt"/>
11        <xsl:import href="../../../../xml/Interactive.xslt"/>
12        <xsl:import href="../../../../json/indicator/profile/InteractiveJSON.xslt"/>
13        <xsl:import href="../../../Kendo.xslt"/>
14        <xsl:import href="../../../LeafletMap.xslt"/>
15        <xsl:import href="../Indicator.xslt"/>
16
17
18        <ibis:doc>
19                <name>html/indicator/profile/view/Page</name>
20                <summary>Interactive indicator profile view page</summary>
21                <description>
22                        Specific XSLT used to create the indicator profile view page.
23                </description>
24        </ibis:doc>
25
26
27
28        <xsl:param name="Page.pageTitle" ibis:doc="Page's title text based on the 'INDICATOR/TITLE' element.">
29                Health Indicator Report - <xsl:value-of select="ibis:getIndicatorTitle($indicator)"/>
30        </xsl:param>
31        <xsl:param name="Page.sectionsTitle" ibis:doc="Page's content block title text based on the 'INDICATOR/TITLE' element.">
32                Health Indicator Report of <xsl:value-of select="ibis:getIndicatorTitle($indicator)"/>
33        </xsl:param>
34
35
36        <xsl:param name="Page.comparisonDimensionName"  select="'GeoState'"/>
37        <xsl:param name="Page.comparisonDimensionValue" select="'35'"/>
38
39
40        <xsl:param name="Indicator.contentBlockType" select="'fixed'"/>
41        <xsl:param name="Indicator.contentBlockTitleLevel" select="3"/>
42
43
44
45
46        <xsl:template name="xxxxxxxxxxxPage.specificScript" ibis:doc="Provides Kendo and Leaflet script code.">
47                <xsl:if test="0 = string-length($indicatorView/SURROGATE_VIEW_URL)">
48                        <xsl:call-template name="Page.interativeContent">
49                                <xsl:with-param name="indicatorView" select="$indicatorView"/>
50                        </xsl:call-template>
51                </xsl:if>
52        </xsl:template>
53
54
55
56        <xsl:template name="Page.sectionsContent" ibis:doc="Main page content template that determines if IP or Surrogate.">
57                <xsl:choose>
58                        <xsl:when test="0 = string-length($indicatorView/SURROGATE_VIEW_URL)">
59                                <xsl:call-template name="Page.interativeContent">
60                                        <xsl:with-param name="indicatorView" select="$indicatorView"/>
61                                </xsl:call-template>
62                        </xsl:when>
63                        <xsl:otherwise>
64                                <xsl:call-template name="Page.insertAJAXContent">
65                                        <xsl:with-param name="sourceContentURL" select="$indicatorView/SURROGATE_VIEW_URL"/>
66                                </xsl:call-template>
67                        </xsl:otherwise>
68                </xsl:choose>
69        </xsl:template>
70
71
72
73        <xsl:template name="Page.interativeContent"
74                ibis:doc="Main interactive sections content template."
75        >
76                <xsl:param name="indicatorView"/>
77
78                <xsl:variable name="measureName" select="$indicatorView/MEASURE_NAME"/>
79                <xsl:variable name="measure"     select="($indicator//MEASURE[NAME = $measureName])[1]"/>
80
81
82                <xsl:call-template name="ContentContainer.expandable">
83                        <xsl:with-param name="title"   select="'Why Is This Important?'"/>
84                        <xsl:with-param name="content" select="$indicator/WHY_IMPORTANT"/>
85                        <xsl:with-param name="description" select="'Text that describes why this indicator is important to the populations overall health'"/>
86                        <xsl:with-param name="show"    select="true()"/>
87                        <xsl:with-param name="additionalClasses" select="'Text'"/>
88                        <xsl:with-param name="addWikiAttribute"  select="true()"/>
89                </xsl:call-template>
90
91                <xsl:variable name="showMap" select="ibis:LeafletMap.showMap()"/>  <!-- $indicatorView/MAP_NAME -->
92                <xsl:if test="$showMap">
93                        <xsl:call-template name="ContentContainer.expandable">
94                                <xsl:with-param name="title" select="'Map'"/>
95                                <xsl:with-param name="content">
96                                        <xsl:call-template name="LeafletMap.mapContainer">
97                                                <xsl:with-param name="containerID" select="'map'"/>
98                                                <xsl:with-param name="title" select="ibis:getMapTitle($indicator, $indicatorView, $Indicator.dimensions)"/>
99                                        </xsl:call-template>
100                                        <xsl:call-template name="Indicator.contentBlock">
101                                                <xsl:with-param name="content" select="$indicatorView/MAP_NARRATIVE"/>
102                                                <xsl:with-param name="contentBlockType" select="'fixed'" tunnel="yes"/>
103                                        </xsl:call-template>
104                                </xsl:with-param>
105                                <xsl:with-param name="show" select="true()"/>
106                                <xsl:with-param name="addWikiAttribute" select="false()"/>
107                                <xsl:with-param name="description" select="'Choropleth/thematic map.'"/>
108                        </xsl:call-template>
109                </xsl:if>
110
111                <xsl:if test="ibis:Kendo.showChart($indicatorView/CHART_NAME)">
112                        <xsl:call-template name="ContentContainer.expandable">
113                                <xsl:with-param name="title" select="if('Line'=$indicatorView/CHART_NAME) then 'Trend' else 'Chart'"/>
114                                <xsl:with-param name="content">
115                                        <xsl:call-template name="Kendo.chartContainer">
116                                                <xsl:with-param name="containerID" select="'chart'"/>
117                                                <xsl:with-param name="title" select="ibis:getChartTitle($indicator, $indicatorView, $Indicator.dimensions)"/>
118                                        </xsl:call-template>
119                                        <xsl:call-template name="Indicator.contentBlock">
120                                                <xsl:with-param name="content" select="$indicatorView/CHART_NARRATIVE"/>
121                                                <xsl:with-param name="contentBlockType" select="'fixed'" tunnel="yes"/>
122                                        </xsl:call-template>
123                                </xsl:with-param>
124                                <xsl:with-param name="show" select="not($showMap)"/>
125                                <xsl:with-param name="addWikiAttribute" select="false()"/>
126                        </xsl:call-template>
127                </xsl:if>
128
129                <xsl:call-template name="ContentContainer.expandable">
130                        <xsl:with-param name="title" select="'Supplemental Graphic'"/>
131                        <xsl:with-param name="content">
132                                <xsl:call-template name="Indicator.supplementalImage">
133                                        <xsl:with-param name="indicatorView" select="$indicatorView"/>
134                                </xsl:call-template>
135                        </xsl:with-param>
136                        <xsl:with-param name="show" select="true()"/>
137                        <xsl:with-param name="addWikiAttribute" select="false()"/>
138                </xsl:call-template>
139
140                <xsl:call-template name="ContentContainer.expandable">
141                        <xsl:with-param name="title" select="'Data Notes'"/>
142                        <xsl:with-param name="content">
143                                <xsl:call-template name="Indicator.dataNotes">
144                                        <xsl:with-param name="title"         select="''"/>
145                                        <xsl:with-param name="measure"       select="$Indicator.measure"/>
146                                        <xsl:with-param name="indicatorView" select="$indicatorView"/>
147                                </xsl:call-template>
148                        </xsl:with-param>
149                        <xsl:with-param name="show" select="true()"/>
150                </xsl:call-template>
151
152                <xsl:call-template name="ContentContainer.expandable">
153                        <xsl:with-param name="title" select="'Data Table'"/>
154                        <xsl:with-param name="content">
155                                <div class="Graphic Grid ScrollableContainer">
156                                        <div id="grid"></div>
157<br/><br/>
158GARTH TODO: Data table footnote needs to include the VALUE ATTRIBUTE codes and titles.
159<br/><br/>
160                                </div>
161                        </xsl:with-param>
162                        <xsl:with-param name="show" select="false()"/>
163                        <xsl:with-param name="addWikiAttribute" select="false()"/>
164                </xsl:call-template>
165
166
167                <xsl:call-template name="ContentContainer.expandable">
168                        <xsl:with-param name="title" select="'Data Definitions &amp; Sources'"/>
169                        <xsl:with-param name="content">
170                                <xsl:call-template name="Indicator.definition"/>
171                                <xsl:call-template name="Indicator.howCalculated"/>
172                                <xsl:call-template name="Indicator.dataSources"/>
173                        </xsl:with-param>
174                        <xsl:with-param name="show"        select="false()"/>
175                        <xsl:with-param name="description" select="'Metadata for this health indicator.'"/>
176                </xsl:call-template>
177
178
179                <xsl:call-template name="ContentContainer.expandable">
180                        <xsl:with-param name="title" select="'Health Objectives and Targets'"/>
181                        <xsl:with-param name="content">
182                                <xsl:call-template name="Indicator.initiatives"/>
183                                <xsl:call-template name="Indicator.otherObjectives"/>
184                        </xsl:with-param>
185                        <xsl:with-param name="description" select="'Goals and objectives for this health indicator.'"/>
186                </xsl:call-template>
187
188                <xsl:call-template name="ContentContainer.expandable">
189                        <xsl:with-param name="title" select="'Current Outlook'"/>
190                        <xsl:with-param name="content">
191                                <xsl:call-template name="Indicator.howDoing"/>
192                                <xsl:call-template name="Indicator.howCompare"/>
193                        </xsl:with-param>
194                        <xsl:with-param name="description" select="'How are we doing, how do we compare.'"/>
195                </xsl:call-template>
196
197                <xsl:call-template name="ContentContainer.expandable">
198                        <xsl:with-param name="title" select="'Health Improvement Resources'"/>
199                        <xsl:with-param name="content">
200                                <xsl:call-template name="Indicator.whatDoing"/>
201                                <xsl:call-template name="Indicator.evidenceBasedPractices"/>
202                                <xsl:call-template name="Indicator.availableServices"/>
203                                <xsl:call-template name="Indicator.moreResources"/>
204                                <xsl:call-template name="Indicator.otherInformation"/>
205                        </xsl:with-param>
206                        <xsl:with-param name="description" select="'Other related information and resources.'"/>
207                </xsl:call-template>
208
209                <xsl:call-template name="ContentContainer.expandable">
210                        <xsl:with-param name="title" select="'References'"/>
211                        <xsl:with-param name="content">
212                                <xsl:call-template name="Indicator.footnoteReferences"/>
213                        </xsl:with-param>
214                        <xsl:with-param name="description" select="'References that may / might not be cited on this page.'"/>
215                </xsl:call-template>
216
217                <xsl:call-template name="Indicator.allDates"/>
218
219                <xsl:call-template name="Page.leafletKendoScript">
220                        <xsl:with-param name="indicatorView" select="$indicatorView"/>
221                        <xsl:with-param name="measure"       select="$Indicator.measure"/>
222                </xsl:call-template>
223        </xsl:template>
224
225
226
227        <xsl:template name="Page.leafletKendoScript" 
228                ibis:doc="Provides the kendo and leaflet javascript."
229        >
230                <xsl:param name="indicatorView"/>
231                <xsl:param name="measure"/>
232
233                <xsl:if test="ibis:LeafletMap.showMap($indicatorView/MAP_NAME)">
234                        <xsl:call-template name="LeafletMap.choroplethJavaScript"/>
235                </xsl:if>
236                <xsl:variable name="measureValueFormatPattern" select="($Indicator.valueTypes/VALUE_TYPE[NAME = $measure/VALUE_TYPE_NAME]/XSLT_FORMAT_PATTERN)[1]"/>
237
238                <xsl:variable name="recordDimensionFields">
239                        <xsl:call-template name="Interactive.getRecordDimensionFields">
240                                <xsl:with-param name="dimensions"      select="$Indicator.dimensions"/>
241                                <xsl:with-param name="dimensionUsages" select="$indicatorView/DIMENSION_USAGES"/>
242                        </xsl:call-template>
243                </xsl:variable>
244
245                <xsl:variable name="ancillaryValueNames" select="distinct-values($indicator/DATASETS/DATASET[NAME = $indicatorView/DATASET_NAMES/DATASET_NAME]/ANCILLARY_VALUE_USAGES/ANCILLARY_VALUE_USAGE/NAME)"/>
246                <xsl:variable name="recordAncillaryValueFields">
247                        <xsl:call-template name="Interactive.getIndicatorRecordAncillaryValueFields">
248                                <xsl:with-param name="indicator"     select="$indicator"/>
249                                <xsl:with-param name="indicatorView" select="$indicatorView"/>
250                                <xsl:with-param name="ancillaryValues" select="$Indicator.ancillaryValues"/>
251                                <xsl:with-param name="ancillaryValueNames" select="$ancillaryValueNames"/>
252                                <xsl:with-param name="measureValueFormatPattern" select="$measureValueFormatPattern"/>
253                        </xsl:call-template>
254                </xsl:variable>
255
256                <xsl:variable name="datasetRecords" select="$indicator/DATASETS/DATASET[NAME = $indicatorView/DATASET_NAMES/DATASET_NAME]/RECORDS"/>
257                <xsl:variable name="indicatorViewDatasetRecords">
258                        <xsl:call-template name="Interactive.getIndicatorViewDatasetRecords">
259                                <xsl:with-param name="datasetRecords"  select="$datasetRecords"/>
260                                <xsl:with-param name="dimensionUsages" select="$indicatorView/DIMENSION_USAGES"/>
261                                <xsl:with-param name="recordDimensionFields" select="$recordDimensionFields"/>
262                        </xsl:call-template>
263                </xsl:variable>
264
265<!--
266<xsl:message select="'************** GARTH'"/>
267<xsl:message select="$indicatorViewDatasetRecords"/>
268
269<xsl:message select="concat('Page.leafletKendoScript - Records count: ', count($indicatorViewDatasetRecords/*), ', recordDimensionFields: ', count($recordDimensionFields/NAME))"/>
270<xsl:message select="'============= start of IV datasetRecords'"/>
271<xsl:message select="$recordDimensionFields"/>
272<xsl:message select="'============= end of IV datasetRecords'"/>
273-->
274
275                <!-- tried doing jsonp tech but callback func must be defined before doing the script jsonp
276                        so you'd have the variable = null, call back, end of script, include jsonp, then contructor
277                        script.  Very messy - decided just to do simple var and include it.
278                -->
279                <script type="text/javascript">
280                        var records =
281                        [<xsl:text>&#10;</xsl:text>
282                                <xsl:call-template name="InteractiveJSON.getDatasetRecords">
283                                        <xsl:with-param name="dimensions"                 select="$Indicator.dimensions"/>
284                                        <xsl:with-param name="datasetRecords"             select="$indicatorViewDatasetRecords"/>
285                                        <xsl:with-param name="recordDimensionFields"      select="$recordDimensionFields"/>
286                                        <xsl:with-param name="recordAncillaryValueFields" select="$recordAncillaryValueFields"/>
287                                        <xsl:with-param name="measureValueFormatPattern"  select="$measureValueFormatPattern"/>
288                                </xsl:call-template>
289                        ];
290
291                        var kendoDataSource = new kendo.data.DataSource(
292                                <xsl:call-template name="Kendo.dataSourceConstructorJSON">
293                                        <xsl:with-param name="javascriptRecordArrayVariableName" select="'records'"/>
294                                        <xsl:with-param name="recordDimensionFields"      select="$recordDimensionFields"/>
295                                        <xsl:with-param name="recordAncillaryValueFields" select="$recordAncillaryValueFields"/>
296                                </xsl:call-template>
297                        );
298
299                        var kendoGridConstructorJSON = $.extend
300                        (true, {}
301                                ,<xsl:call-template name="Kendo.baseGridJSON"/>
302                                ,<xsl:call-template name="Kendo.namedConfigurationJSON">
303                                        <xsl:with-param name="configurationName" select="'IndicatorProfileGrid'"/>
304                                </xsl:call-template>
305                                ,<xsl:call-template name="Kendo.requestGridJSON">
306                                        <xsl:with-param name="kendoDataSourceJavascriptVariableName" select="'kendoDataSource'"/>
307                                        <xsl:with-param name="measure" select="$measure"/>
308                                        <xsl:with-param name="recordDimensionFields"      select="$recordDimensionFields"/>
309                                        <xsl:with-param name="recordAncillaryValueFields" select="$recordAncillaryValueFields"/>
310<xsl:with-param name="showFooterRow"   select="false()"/>
311<xsl:with-param name="showNoteColumn"  select="false()"/>
312<xsl:with-param name="showLabelColumn" select="false()"/>
313                                </xsl:call-template>
314                        );
315
316
317                        var kendoChartConstructorJSON = $.extend
318                        (true, {}
319                                ,<xsl:call-template name="Kendo.baseChartJSON"/>
320                                ,<xsl:call-template name="Kendo.namedConfigurationJSON">
321                                        <xsl:with-param name="configurationName" select="$indicatorView/CHART_NAME"/>
322                                </xsl:call-template>
323                                ,<xsl:call-template name="Kendo.requestChartJSON">
324                                        <xsl:with-param name="kendoDataSourceJavascriptVariableName" select="'kendoDataSource'"/>
325                                        <xsl:with-param name="title"         select="ibis:getChartTitle($indicator, $indicatorView, $Indicator.dimensions)"/>
326                                        <xsl:with-param name="seriesTitle"   select="$recordDimensionFields/RECORD_DIMENSION_FIELD[USAGE='series']/TITLE"/>
327                                        <xsl:with-param name="categoryTitle" select="$recordDimensionFields/RECORD_DIMENSION_FIELD[USAGE='category']/TITLE"/>
328                                        <xsl:with-param name="valueTitle"    select="$measure/TITLE"/>
329
330                                        <xsl:with-param name="seriesFieldName"    select="$recordDimensionFields/RECORD_DIMENSION_FIELD[USAGE='series']/NAME"/>
331                                        <xsl:with-param name="categoryFieldName"  select="$recordDimensionFields/RECORD_DIMENSION_FIELD[USAGE='category']/NAME"/>
332
333                                        <xsl:with-param name="includeDatasetSeries" select="1 &lt; $recordDimensionFields/RECORD_DIMENSION_FIELD[USAGE='series']/VALUE_COUNT"/>
334                                        <xsl:with-param name="ancillaryValueNames"  select="$ancillaryValueNames"/>
335                                </xsl:call-template>
336                        );
337//console.debug("%o", kendoChartConstructorJSON);
338//console.log(JSON.stringify(kendoChartConstructorJSON,null,2)); 
339
340                        var $kendoGrid;
341                        var $kendoChart;
342                        var $leafletMap;
343                        $(document).ready(function()
344                        {
345                                $kendoGrid  = $("#grid").kendoGrid (kendoGridConstructorJSON);
346                                $kendoChart = $("#chart").kendoChart(kendoChartConstructorJSON);
347                                kendoDataSource.read();         // have to have after grid and chart because .autoBind = false.
348
349
350
351<!-- =====================================================
352// var firstSlot = $kendoChart.getKendoChart()._plotArea.axes[0].getSlot(0);
353// alert("first slot width" + firstSlot.width());
354
355<xsl:variable name="geoDimensionName" select="
356        if(0 != string-length($indicatorView/DEFAULT_GEOGRAPHY_DIM_NAME))
357        then $indicatorView/DEFAULT_GEOGRAPHY_DIM_NAME
358        else ($Indicator.dimensions/DIMENSION[
359                        exists(GEOGRAPHY_FLAG)
360                        and
361                        NAME = $indicatorView//DIMENSION_USAGE/NAME
362                ])[1]/NAME"
363/>
364
365<xsl:message select="$Indicator.dimensions/DIMENSION[exists(GEOGRAPHY_FLAG)]/NAME"/>
366<xsl:message select="exists($indicatorView/DIMENSION_USAGES/DIMENSION_USAGE[DIMENSION_NAME = $Indicator.dimensions/DIMENSION[exists(GEOGRAPHY_FLAG)]/NAME])"/>
367<xsl:message select="exists($indicatorView/DIMENSION_USAGES/DIMENSION_USAGE[DIMENSION_NAME = $Indicator.dimensions/DIMENSION[exists(GEOGRAPHY_FLAG)]/NAME])"/>
368<xsl:message select="exists($indicatorView/DIMENSION_USAGES/DIMENSION_USAGE[DIMENSION_NAME = $Indicator.dimensions/DIMENSION[exists(GEOGRAPHY_FLAG)]])"/>
369<xsl:message select="$Indicator.dimensions/DIMENSION[exists(GEOGRAPHY_FLAG)]/NAME"/>
370<xsl:message select="concat('Interactive - Show Map: ', $Interactive.showMap, ', geoDimensionName:', $geoDimensionName)"/>
371
372<xsl:message select="'XXXXXXXXXXXXXXXXXXXXXXXXXXXXX interact.xslt'"/>
373<xsl:message select="$Page.comparisonDimensionName"/>
374<xsl:message select="$Page.comparisonDimensionValue"/>
375<xsl:with-param name="comparisonValue" select="$indicatorViewDatasetRecords/RECORD[ DIMENSIONS[ (2 = count(DIMENSION)) and DIMENSION[(NAME = $Page.comparisonDimensionName)     and (VALUE = $Page.comparisonDimensionValue)]]]/MEASURE/VALUE"/>
376
377Stuff to try when doing dashboard
378function dataSource_change(e) {
379  console.log(e);
380}
381kendoDataSource.bind("change", dataSource_change);
382select="$indicatorViewDatasetRecords/RECORD[ DIMENSIONS[ (2 = count(DIMENSION)) and DIMENSION[(NAME = $Page.comparisonDimensionName)     and (VALUE = $Page.comparisonDimensionValue)]]]/MEASURE/VALUE"/>
383
384**********************************************
385
386PROBLEM: "CATEGORY":"GeoCnty.4"
387                                                <xsl:with-param name="geoJSONName"      select="$indicatorView/MAP_DIMENSION_NAME"/>
388                                               
389******************
390probably need to geojson to have the geodim name + . + geodim value to uniquely ID the area.
391
392************ PROBLEM is that the QM only returns 1..31 and not GeoCnty.1
393
394The IP and QM dimension files are all 1..31
395
396So, need the field name then use the geotype and parse the .XXX from the end.
397Then in the QM will need to build the JSON fields the same way as we do with
398the IP - which is the right way to do it anyway so fields can be combined???
399
400*** also have issues with if 2d and 3d...
401        if mult series then drop down for that.
402        if mult constants then drop down for that as well.
403        when changed regen map.
404        Need to specify the category field name and value
405        Need to specify the series field name and value
406        Need to specify the constant field name and value
407       
408        GeoJSON GeoID Prefix to add when doing comparison???
409
410        <xsl:variable name="communityDatasets" select="$indicator/DATASETS/DATASET[DIMENSION_COMBINATIONS/DIMENSION_COMBINATION[not(DIMENSION_2/NAME) and DIMENSION_1/NAME = $communityDimensionName]]"/>
411        <xsl:variable name="communityDataset"  select="$communityDatasets[(MEASURE_NAME = $measureName) and DIMENSION_COMBINATIONS/DIMENSION_COMBINATION[PERIOD_DIMENSION/NAME = $periodName]]"/>
412        <xsl:variable name="stateRecord"       select="$communityDataset/RECORDS/RECORD[ DIMENSIONS[ (2 = count(DIMENSION)) and DIMENSION[(NAME = $stateDimensionName)     and (VALUE = $stateDimensionValue)]     and DIMENSION[(NAME = $periodName) and (VALUE = $periodValue)]]]"/>
413
414
415GARTH TODO:
416        <xsl:message select="'XXXXXXXXXXXXXXXXXXXXXXXXXXXXX'"/>
417<xsl:message select="$indicatorViewDatasetRecords[1]"/>
418
419
420
421<xsl:with-param name="dimensionFieldInclusionCriteria">
422records have the field names to filter.
423to include need field name and value.
424
425specifies the records held constant - This is to filter out not matching constant records
426
427for mouse overs, the title needs specifics - dimension title and dimension value title.
428        <DIMENSION><NAME>CONSTANT</NAME><VALUE>YearAll.2014</VALUE><TITLE>Year</TITLE><VALUE_TITLE>2014</VALUE_TITLE></DIMENSION>
429        <DIMENSION><NAME>SERIES</NAME><VALUE>Sex.1</VALUE><TITLE>Sex</TITLE><VALUE_TITLE>Male</VALUE_TITLE></DIMENSION>
430</xsl:with-param>
431
432==========================================================================
433<xsl:message select="$indicatorViewDatasetRecords/RECORD"/>
434-->
435
436
437
438
439<xsl:message select="'XXXXXXXXXXXXXXXXXXXXXXXXXXXXX interact.xslt'"/>
440<xsl:message select="$indicatorView/MAP_DIMENSION_NAME"/>
441<xsl:message select="$recordDimensionFields/RECORD_DIMENSION_FIELD[DIMENSION_NAMES/DIMENSION_NAME = $indicatorView/MAP_DIMENSION_NAME]/NAME"/> 
442
443
444                        <xsl:if test="ibis:LeafletMap.showMap($indicatorView/MAP_NAME)">
445                                var leafletMapConstructorJSON = $.extend
446                                (true, {}
447,<xsl:call-template name="LeafletMap.baseJSON"/>
448,<xsl:call-template name="LeafletMap.namedConfigurationJSON">
449        <xsl:with-param name="configurationName" select="$indicatorView/MAP_NAME"/>
450</xsl:call-template>
451,<xsl:call-template name="LeafletMap.requestJSON"> 
452<!--    <xsl:with-param name="mapTitle"      select="'Choropleth'"/> -->
453        <xsl:with-param name="mapType"       select="'choropleth'"/>
454</xsl:call-template>
455,<xsl:call-template name="LeafletMap.choroplethJSON">
456        <xsl:with-param name="javascriptRecordArrayVariableName" select="'records'"/>
457        <xsl:with-param name="geoJSONName"      select="$indicatorView/MAP_DIMENSION_NAME"/>
458        <xsl:with-param name="geoIDFieldName"   select="$recordDimensionFields/RECORD_DIMENSION_FIELD[DIMENSION_NAMES/DIMENSION_NAME = $indicatorView/MAP_DIMENSION_NAME]/NAME"/> 
459        <xsl:with-param name="geoIDFieldValuePrefixToRemove"   select="concat($indicatorView/MAP_DIMENSION_NAME, '.')"/>
460        <xsl:with-param name="measureValueFieldName" select="'MeasureValue'"/>
461        <xsl:with-param name="legendTitle"   select="$measure/TITLE"/>
462        <xsl:with-param name="geoTypeTitle"  select="ibis:getDimensionTitle($indicator//DIMENSIONS/DIMENSION[NAME = $indicatorView/MAP_DIMENSION_NAME])"/>
463        <xsl:with-param name="reverseColors" select="$measure/DESIRABLE_VALUE = 1"/>
464        <xsl:with-param name="desirableIndexValue" select="$measure/DESIRABLE_VALUE"/>
465
466<xsl:with-param name="comparisonValue" select="$indicatorViewDatasetRecords/RECORD[ DIMENSIONS[ (2 = count(DIMENSION)) and DIMENSION[(NAME = $Page.comparisonDimensionName)     and (VALUE = $Page.comparisonDimensionValue)]]]/MEASURE/VALUE"/>
467
468</xsl:call-template>
469                                );
470                                $leafletMap = $("#map").leaflet(leafletMapConstructorJSON);
471<!--
472                                <xsl:call-template name="LeafletMap.mapsJavaScript"/>
473                                <xsl:call-template name="LeafletMap.namedMapJavaScript"/>
474-->
475                        </xsl:if>
476
477                        }); //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ End of Function ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
478<!--
479                        <xsl:call-template name="Kendo.chartsJavaScript"/>
480                        <xsl:call-template name="Kendo.namedChartJavaScript"/>
481                        <xsl:call-template name="Kendo.gridsJavaScript"/>
482                        <xsl:call-template name="Kendo.namedGridJavaScript"/>
483-->
484                </script>
485        </xsl:template>
486
487</xsl:stylesheet>
488<!-- ============================= End of File ============================= -->
Note: See TracBrowser for help on using the repository browser.