Changeset 13238 in main


Ignore:
Timestamp:
02/27/17 15:18:36 (5 years ago)
Author:
Maria Baron
Message:

Changed "none" to "n/a" in CIs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • adopters/nj/branches/2.3/src/main/webapps/ibisph-view/xslt/html/query/module/result/interactive/SiteSpecific.xslt

    r11842 r13238  
    3636
    3737        <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ TEMPLATES ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
     38        <xsl:template name="Interactive.queryResultDataArrayJSON"
     39                ibis:doc="Produces an query result javascript data list.
     40                        NOTES:
     41                        - Missing values must be coded as 'null' - blank does not work.
     42                        - * and ** will be coded as 99999 for now???
     43                        - Loop for all geo dimension records
     44                        - If different group by's besides the one geo dim then need to grab the
     45                                total dim. 
     46                "
     47        >
     48                <xsl:param name="queryModule"/>
     49                <xsl:param name="cleanedNameAndActualNameDimensions"/>
     50                <xsl:param name="measures"/>
     51                <xsl:param name="distinctRecordDimensionValues" select="distinct-values($queryModule/IBISQ_QUERY_RESULT/RECORDS//DIMENSIONS/DIMENSION/VALUE/text())"/>
     52
     53<xsl:text>[</xsl:text>
     54                <xsl:for-each select="$queryModule/IBISQ_QUERY_RESULT/RECORDS/RECORD[not(DIMENSIONS/DIMENSION/VALUE/text() = '.')]">
     55                        <xsl:variable name="record" select="."/>
     56                        <xsl:variable name="rowID"  select="position()"/>
     57                        <xsl:if test="position() != 1">,</xsl:if>{
     58        rowID:<xsl:value-of select="$rowID"/>
     59                        <xsl:for-each select="$record/DIMENSIONS/DIMENSION[NAME = $cleanedNameAndActualNameDimensions/DIMENSION/ACTUAL_NAME]">
     60                                <xsl:variable name="dimension"      select="$cleanedNameAndActualNameDimensions/DIMENSION[ACTUAL_NAME = current()/NAME]"/>
     61                                <xsl:variable name="dimensionValue" select="$dimension/VALUES/VALUE[text() = current()/VALUE/text()]"/>
     62<!--
     63<xsl:message select="concat('record dim value: ', VALUE/text(), ', index of: ', index-of($distinctRecordDimensionValues, VALUE/text()))"/>
     64-->
     65                                <xsl:if test="(string-length($dimensionValue) = 0) and not($dimension/DYNAMIC_VALUES_FLAG)">
     66                                        <xsl:message>
     67                                                WARNING: Query result record dimension name <xsl:value-of select="current()/NAME"/> 
     68                                                with value: <xsl:value-of select="current()/VALUE/text()"/> does NOT have a matching DIMENSION//VALUE record. 
     69                                                Version 3 might not allow this and could throw an error.
     70                                                Current query config: <xsl:value-of select="$queryModule/REQUEST/CONFIGURATION_PATH"/>.
     71                                        </xsl:message>
     72                                </xsl:if>
     73
     74        ,"<xsl:value-of select="$dimension/NAME"/>":"<xsl:value-of select="current()/VALUE/text()"/>"
     75        ,"<xsl:value-of select="$dimension/NAME"/>Title":"<xsl:value-of select="if(string-length($dimensionValue/TITLE) != 0) then $dimensionValue/TITLE else current()/VALUE/text()"/>"
     76        ,"<xsl:value-of select="$dimension/NAME"/>SortOrder": <xsl:value-of select="
     77                if(string-length($dimensionValue/SORT_ORDER) != 0)
     78                then $dimensionValue/SORT_ORDER
     79                else index-of($distinctRecordDimensionValues, VALUE/text())"
     80        />
     81                        </xsl:for-each>
     82                        <xsl:for-each select="$measures/MEASURE">
     83                                <xsl:variable name="recordMeasure" select="$record/MEASURES/MEASURE[NAME = current()/NAME]"/>
     84        ,"<xsl:value-of select="NAME"/>":                 <xsl:value-of select="ibis:getJavaScriptValue($recordMeasure/VALUE)"/>
     85        ,"<xsl:value-of select="NAME"/>Title":           "<xsl:value-of select="ibis:getFormattedValue ($recordMeasure/VALUE, XSLT_FORMAT_PATTERN, '')"/>"
     86        ,"<xsl:value-of select="NAME"/>LowerLimit":       <xsl:value-of select="ibis:getJavaScriptValue($recordMeasure/LOWER_CONFIDENCE_LIMIT)"/>
     87        ,"<xsl:value-of select="NAME"/>LowerLimitTitle": "<xsl:value-of select="ibis:getFormattedValue ($recordMeasure/LOWER_CONFIDENCE_LIMIT, XSLT_FORMAT_PATTERN, 'n/a')"/>"
     88        ,"<xsl:value-of select="NAME"/>UpperLimit":       <xsl:value-of select="ibis:getJavaScriptValue($recordMeasure/UPPER_CONFIDENCE_LIMIT)"/>
     89        ,"<xsl:value-of select="NAME"/>UpperLimitTitle": "<xsl:value-of select="ibis:getFormattedValue ($recordMeasure/UPPER_CONFIDENCE_LIMIT, XSLT_FORMAT_PATTERN, 'n/a')"/>"
     90        ,"<xsl:value-of select="NAME"/>Numerator":        <xsl:value-of select="ibis:getJavaScriptValue($recordMeasure/NUMERATOR)"/>
     91        ,"<xsl:value-of select="NAME"/>NumeratorTitle":  "<xsl:value-of select="ibis:getFormattedValue ($recordMeasure/NUMERATOR, NUMERATOR/XSLT_FORMAT_PATTERN, 'n/a')"/>"
     92        ,"<xsl:value-of select="NAME"/>Denominator":      <xsl:value-of select="ibis:getJavaScriptValue($recordMeasure/DENOMINATOR)"/>
     93        ,"<xsl:value-of select="NAME"/>DenominatorTitle":"<xsl:value-of select="ibis:getFormattedValue ($recordMeasure/DENOMINATOR, DENOMINATOR/XSLT_FORMAT_PATTERN, 'n/a')"/>"
     94                        </xsl:for-each>
     95}
     96                </xsl:for-each>
     97<xsl:text>]</xsl:text>
     98        </xsl:template>
    3899
    39100</xsl:stylesheet>
Note: See TracChangeset for help on using the changeset viewer.