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:ibis="http://www.ibisph.org" |
---|
6 | |
---|
7 | exclude-result-prefixes="ibis" |
---|
8 | > |
---|
9 | <xsl:import href="../../../../xml/Interactive.xslt"/> |
---|
10 | <xsl:import href="../../../../json/Dataset.xslt"/> |
---|
11 | <xsl:import href="../../../../json/Kendo.xslt"/> |
---|
12 | <xsl:import href="../../../../json/LeafletMap.xslt"/> |
---|
13 | <xsl:import href="../../../Graphic.xslt"/> |
---|
14 | <xsl:import href="../Indicator.xslt"/> |
---|
15 | <xsl:import href="../Page.xslt"/> |
---|
16 | |
---|
17 | <ibis:doc> |
---|
18 | <name>html/indicator/profile/summary/Page</name> |
---|
19 | <summary>Default core code that produces the indicator profile summary/complete profile page</summary> |
---|
20 | <description> |
---|
21 | Specific XSLT used to create the indicator profile summary page. |
---|
22 | </description> |
---|
23 | </ibis:doc> |
---|
24 | |
---|
25 | |
---|
26 | <xsl:param name="Page.pageTitle" ibis:doc="Page's title text based on the 'INDICATOR/TITLE' element."> |
---|
27 | Summary Health Indicator Report - <xsl:value-of select="$indicator/TITLE"/> |
---|
28 | </xsl:param> |
---|
29 | <xsl:param name="Page.contentTitle" ibis:doc="Page's content block title text based on the 'INDICATOR/TITLE' element."> |
---|
30 | <xsl:value-of select="$indicator/TITLE"/> |
---|
31 | </xsl:param> |
---|
32 | |
---|
33 | <xsl:param name="Indicator.contentBlockType" select="'fixed'"/> |
---|
34 | |
---|
35 | <xsl:template name="Page.contentBody" |
---|
36 | ibis:doc="Main page content template which pretty much calls all |
---|
37 | of the element field templates contained within the 'indicator.xslt' |
---|
38 | profile API template file." |
---|
39 | > |
---|
40 | |
---|
41 | <xsl:call-template name="Page.options"> |
---|
42 | <xsl:with-param name="title">Summary Indicator Report Data View Options</xsl:with-param> |
---|
43 | <xsl:with-param name="pageType" select="'summary'"/> |
---|
44 | </xsl:call-template> |
---|
45 | |
---|
46 | <!-- loop for all views --> |
---|
47 | <xsl:if test="exists($indicator/INDICATOR_VIEWS/INDICATOR_VIEW/NAME)"> |
---|
48 | <xsl:call-template name="Graphic.choroplethMapJavaScript"/> |
---|
49 | |
---|
50 | <xsl:variable name="comparisonDimensionName" select="'GeoState'"/> |
---|
51 | <xsl:variable name="comparisonDimensionValue" select="'35'"/> |
---|
52 | |
---|
53 | <xsl:for-each select="$indicator/INDICATOR_VIEWS/INDICATOR_VIEW/NAME"> |
---|
54 | <xsl:variable name="indicatorView" select="document(concat(current(), '.xml'), /)/INDICATOR_VIEW"/> |
---|
55 | <xsl:variable name="measure" select="if($Indicator.useExternalXML) then $Indicator.measure else $indicator/MEASURES/MEASURE[NAME=$indicatorView/MEASURE_NAME]"/> |
---|
56 | <xsl:message select="concat('view name: ', $indicatorView/NAME, ', position: ', position(), ', count: ', count($indicator/INDICATOR_VIEWS/INDICATOR_VIEW))"/> |
---|
57 | <xsl:variable name="showMap" ibis:doc="Exposed so that SS can access." |
---|
58 | select="ibis:Graphic.showMap( |
---|
59 | $indicatorView/MAP_NAME, |
---|
60 | $indicatorView/DIMENSION_USAGES/DIMENSION_USAGE[USAGE='category']/NAME, |
---|
61 | $indicatorView/DIMENSION_USAGES/DIMENSION_USAGE[USAGE='series']/NAME, |
---|
62 | $Indicator.dimensions |
---|
63 | )" |
---|
64 | /> |
---|
65 | <xsl:variable name="showChart" select="ibis:Graphic.showChart($indicatorView/CHART_NAME) and not($showMap)"/> |
---|
66 | |
---|
67 | <xsl:variable name="recordDimensionFields"> |
---|
68 | <xsl:call-template name="Interactive.getRecordDimensionFields"> |
---|
69 | <xsl:with-param name="dimensions" select="$Indicator.dimensions"/> |
---|
70 | <xsl:with-param name="dimensionUsages" select="$indicatorView/DIMENSION_USAGES"/> |
---|
71 | </xsl:call-template> |
---|
72 | </xsl:variable> |
---|
73 | <xsl:variable name="datasetRecords" select="$indicator/DATASETS/DATASET[NAME = $indicatorView/DATASET_NAMES/DATASET_NAME]/RECORDS"/> |
---|
74 | <xsl:variable name="indicatorViewDatasetRecords"> |
---|
75 | <xsl:call-template name="Interactive.getIndicatorViewDatasetRecords"> |
---|
76 | <xsl:with-param name="datasetRecords" select="$datasetRecords"/> |
---|
77 | <xsl:with-param name="dimensionUsages" select="$indicatorView/DIMENSION_USAGES"/> |
---|
78 | <xsl:with-param name="recordDimensionFields" select="$recordDimensionFields"/> |
---|
79 | </xsl:call-template> |
---|
80 | </xsl:variable> |
---|
81 | <xsl:variable name="valueAttributeNames" select="distinct-values($indicatorViewDatasetRecords//VALUE_ATTRIBUTE_NAME)"/> |
---|
82 | |
---|
83 | |
---|
84 | <xsl:if test="$showMap"> |
---|
85 | <xsl:call-template name="Graphic.mapContainer"> |
---|
86 | <xsl:with-param name="containerID" select="concat('map', position())"/> |
---|
87 | <xsl:with-param name="title" select="ibis:getIndicatorViewMapTitle($indicator, $indicatorView, $Indicator.dimensions)"/> |
---|
88 | <xsl:with-param name="footerContent" select="$indicatorView/MAP_NARRATIVE"/> |
---|
89 | </xsl:call-template> |
---|
90 | </xsl:if> |
---|
91 | <xsl:if test="$showChart"> |
---|
92 | <xsl:call-template name="Graphic.chartContainer"> |
---|
93 | <xsl:with-param name="containerID" select="concat('chart', position())"/> |
---|
94 | <xsl:with-param name="footerContent" select="$indicatorView/CHART_NARRATIVE/text()"/> |
---|
95 | </xsl:call-template> |
---|
96 | </xsl:if> |
---|
97 | |
---|
98 | <xsl:call-template name="Indicator.externalDataViz"> |
---|
99 | <xsl:with-param name="indicatorView" select="$indicatorView"/> |
---|
100 | </xsl:call-template> |
---|
101 | |
---|
102 | <xsl:call-template name="Indicator.dataNotes"> |
---|
103 | <xsl:with-param name="title" select="''"/> |
---|
104 | <xsl:with-param name="measure" select="$measure"/> |
---|
105 | <xsl:with-param name="indicatorView" select="$indicatorView"/> |
---|
106 | </xsl:call-template> |
---|
107 | |
---|
108 | <!-- |
---|
109 | <xsl:call-template name="Indicator.dataSources"/> |
---|
110 | --> |
---|
111 | <a href="{$ibis.contextPath}indicator/view/{$indicatorView/NAME}.html"><xsl:value-of select="$indicatorView/TITLE"/> Details</a><br/><br/> |
---|
112 | |
---|
113 | |
---|
114 | <xsl:variable name="ancillaryValueNames" select="distinct-values($indicator/DATASETS/DATASET[NAME = $indicatorView/DATASET_NAMES/DATASET_NAME]/ANCILLARY_VALUE_USAGES/ANCILLARY_VALUE_USAGE/NAME)"/> |
---|
115 | <xsl:variable name="measureValueFormatPattern" select="($Indicator.valueTypes/VALUE_TYPE[NAME = $measure/VALUE_TYPE_NAME]/XSLT_FORMAT_PATTERN)[1]"/> |
---|
116 | <xsl:call-template name="Graphic.leafletKendoScript"> |
---|
117 | <xsl:with-param name="scriptContainerID" select="concat('script', position())"/> |
---|
118 | <xsl:with-param name="dimensions" select="$Indicator.dimensions"/> |
---|
119 | <xsl:with-param name="datasetRecords" select="$indicatorViewDatasetRecords"/> |
---|
120 | <xsl:with-param name="recordDimensionFields" select="$recordDimensionFields"/> |
---|
121 | <xsl:with-param name="recordAncillaryValueFields"> |
---|
122 | <xsl:call-template name="Interactive.getIndicatorRecordAncillaryValueFields"> |
---|
123 | <xsl:with-param name="indicator" select="$indicator"/> |
---|
124 | <xsl:with-param name="indicatorView" select="$indicatorView"/> |
---|
125 | <xsl:with-param name="ancillaryValueNames" select="$ancillaryValueNames"/> |
---|
126 | <xsl:with-param name="ancillaryValues" select="$Indicator.ancillaryValues"/> |
---|
127 | <xsl:with-param name="valueTypes" select="$Indicator.valueTypes"/> |
---|
128 | <xsl:with-param name="measureValueFormatPattern" select="$measureValueFormatPattern"/> |
---|
129 | </xsl:call-template> |
---|
130 | </xsl:with-param> |
---|
131 | |
---|
132 | <xsl:with-param name="recordsJavascriptVariableName" select="concat('records', position())"/> |
---|
133 | <xsl:with-param name="leafletMapJavascriptVariableName" select="concat('map', position())"/> |
---|
134 | <xsl:with-param name="kendoDataSourceJavascriptVariableName" select="concat('dataSource', position())"/> |
---|
135 | <xsl:with-param name="kendoGridJavascriptVariableName" select="concat('grid', position())"/> |
---|
136 | <xsl:with-param name="kendoChartJavascriptVariableName" select="concat('chart', position())"/> |
---|
137 | |
---|
138 | <xsl:with-param name="measure" select="$measure"/> |
---|
139 | <xsl:with-param name="measureValueFormatPattern" select="$measureValueFormatPattern"/> |
---|
140 | |
---|
141 | <xsl:with-param name="showMap" select="$showMap"/> |
---|
142 | |
---|
143 | <xsl:with-param name="mapName" select="$indicatorView/MAP_NAME"/> |
---|
144 | <xsl:with-param name="mapContainerID" select="concat('map', position())"/> |
---|
145 | <xsl:with-param name="geoJSONName" select="$indicatorView/MAP_DIMENSION_NAME"/> |
---|
146 | <xsl:with-param name="geoIDFieldName" select="$recordDimensionFields/RECORD_DIMENSION_FIELD[DIMENSION_NAMES/DIMENSION_NAME = $indicatorView/MAP_DIMENSION_NAME]/NAME"/> |
---|
147 | <xsl:with-param name="geoIDFieldValuePrefixToRemove" select="concat($indicatorView/MAP_DIMENSION_NAME, '.')"/> |
---|
148 | <xsl:with-param name="geoTypeTitle" select="ibis:getDimensionTitle($indicator//DIMENSIONS/DIMENSION[NAME = $indicatorView/MAP_DIMENSION_NAME])"/> |
---|
149 | <xsl:with-param name="mapComparisonValue" select="$indicatorViewDatasetRecords/RECORD[ DIMENSIONS[ (2 = count(DIMENSION)) and DIMENSION[(NAME = $comparisonDimensionName) and (VALUE = $comparisonDimensionValue)]]]/MEASURE/VALUE"/> |
---|
150 | |
---|
151 | <xsl:with-param name="showChart" select="$showChart"/> |
---|
152 | <xsl:with-param name="chartContainerID" select="concat('chart', position())"/> |
---|
153 | <xsl:with-param name="chartName" select="$indicatorView/CHART_NAME"/> |
---|
154 | <xsl:with-param name="chartTitle" select="ibis:getIndicatorViewChartTitle($indicator, $indicatorView, $Indicator.dimensions)"/> |
---|
155 | |
---|
156 | <xsl:with-param name="showGrid" select="false()"/> |
---|
157 | </xsl:call-template> |
---|
158 | |
---|
159 | |
---|
160 | <xsl:if test="position() != last()"><br/><br/></xsl:if> |
---|
161 | </xsl:for-each> |
---|
162 | </xsl:if> |
---|
163 | |
---|
164 | <xsl:call-template name="Indicator.whyImportant"/> |
---|
165 | <xsl:call-template name="Indicator.howCalculatedTable"/> |
---|
166 | <xsl:call-template name="Indicator.howDoing"/> |
---|
167 | <xsl:call-template name="Indicator.howCompare"/> |
---|
168 | <xsl:call-template name="Indicator.whatDoing"/> |
---|
169 | <xsl:call-template name="Indicator.evidenceBasedPractices"/> |
---|
170 | <!-- |
---|
171 | <xsl:call-template name="Indicator.initiatives"/> |
---|
172 | --> |
---|
173 | <xsl:call-template name="Indicator.otherObjectives"/> |
---|
174 | <xsl:call-template name="Indicator.availableServices"/> |
---|
175 | <xsl:call-template name="Indicator.moreResources"/> |
---|
176 | <xsl:call-template name="Indicator.otherInformation"/> |
---|
177 | <xsl:call-template name="Indicator.footnoteReferences"/> |
---|
178 | <br/> |
---|
179 | |
---|
180 | <xsl:call-template name="Indicator.allDates"/> |
---|
181 | </xsl:template> |
---|
182 | |
---|
183 | </xsl:stylesheet> |
---|
184 | <!-- ============================= End of File ============================= --> |
---|