Changeset 25341 in main


Ignore:
Timestamp:
06/09/22 21:02:29 (3 weeks ago)
Author:
GarthBraithwaite_STG
Message:

view - upgraded saxon. xslt document to doc and assoc notes where applic.

Location:
trunk/ibisph-view/src/main/webapp
Files:
1 added
1 deleted
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/ibisph-view/src/main/webapp/js/KendoLeafletDataViz.js

    r24395 r25341  
    248248
    249249
    250 
    251 // ***************************** FUNCS THAT ARE CURRENTLY NOT USED...
    252 KendoLeafletDataViz.getChartImage = function()
    253 {
    254 // doesn't              var svg = $kendoChart.kendoChart.svg();
    255 //      works           var svg = $kendoChart.data("kendoChart").svg();
    256         var svg = $kendoChart.getKendoChart().svg();
    257         KendoLeafletDataViz.getImage(svg);
    258 }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~ End of Function ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    259 
    260 
    261 KendoLeafletDataViz.getMapImage = function()
    262 {
    263         console.debug("KendoLeafletDataViz.getMapImage - chart data: " + $kendoChart.data("kendoChart"));
    264         console.debug("KendoLeafletDataViz.getMapImage - leaflet data: " + $leafletMap.data("leaflet"));
    265         // xml declaration is NOT needed...
    266         var svg = "START_MARKER" + $(".leaflet-overlay-pane").html();
    267         svg = svg.replace("START_MARKER<svg", "<svg xmlns='http://www.w3.org/2000/svg' version='1.1' ");
    268         KendoLeafletDataViz.getImage(svg);
    269 }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~ End of Function ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    270 
    271 
    272 KendoLeafletDataViz.getImage = function(svg)
    273 {
    274 //svg = $(svg).replaceAll("stroke=''", "");
    275 //alert("SVG: " +svg);
    276 
    277         this.xhr = $.ajax({
    278                 type: "POST"
    279 //                              ,url: "<xsl:value-of select="$ibis.contextPath"/>svgtoimage/download.png"
    280                 ,crossDomain: true
    281                 ,headers: {
    282                         "accept": "image/png"
    283                         ,"content-Type": "image/svg+xml"
    284                 }
    285                 ,data: svg
    286                 ,success: function(data, textStatus, jqXHR)
    287                 {
    288                         console.debug("KendoLeafletDataViz.getImage - Converting SVG to Image - success status: "+ textStatus);
    289                         this.insertImageData(data);
    290                 }
    291                 ,error: function(jqXHR, textStatus, errorThrown)
    292                 {
    293                         console.debug("KendoLeafletDataViz.getImage - Converting SVG to Image - ERROR: "+ errorThrown+", Status: ", textStatus);
    294                 }
    295 // breaks things...                                     ,dataType: "xml"
    296         });
    297 }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~ End of Function ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    298 
    299 
    300 KendoLeafletDataViz.insertImageData = function(imageData)
    301 {
    302         var imgSrc  = "data:image/png;base64," + imageData;
    303         var imgHTML = "<img src=\"" + imgSrc + "\"/>";
    304         $("#rasterImage").html(imgHTML);
    305 }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~ End of Function ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    306 
    307 
    308250// Called for title type value sorting.  If error converting simply return equal (0).
    309251KendoLeafletDataViz.valueTitleSortComparision = function(a, b)
  • trunk/ibisph-view/src/main/webapp/xslt/_ibis-include.xslt

    r24331 r25341  
    211211                        standard call-template xslt processing needs to include a file. 
    212212
    213                         IMPORTANT NOTE:
     213                        IMPORTANT NOTES:
    214214                        Prior to 7/7/2020 had various include attribute matching templates
    215215                        that handled more specialized processing.  However, as things evolved
     
    220220                        duplicate handling rules.  See that code for some of the attempts to
    221221                        allow for module matches.
    222                 "
    223         >
    224                 <xsl:param name="url"/>
     222
     223                        The more complex XSLT only docment() fn vs doc() is used so that
     224                        the file can be referenced relative to the main XML supplied in the
     225                        xform operation.  Otherwise the single file doc() fn should be used.
     226
     227                        No try catch file error handling is done as want it to blow up so
     228                        the issue is front and center and gets fixed.
     229
     230                        Params are not typed i.e. as=xs:string because some use cases involve
     231                        element attribute values.
     232                "
     233        >
     234                <xsl:param name="url"
     235                        ibis:doc="Required value used to locate the XML file to be included
     236                                and processed. 
     237
     238                                NOTE: the use of document() vs doc().  If the URL is relative
     239                                the document() call uses the main xform XML file URI as it's
     240                                base path.  If doc() is used the URL must be a complete file
     241                                path URL otherwise it will be relative to the XSLT file.  In
     242                                either case fully qualified URLs work. 
     243                        "
     244                />
    225245                <xsl:param name="basePathType"
    226246                        ibis:doc="Optional value that specifies where to look for the file
     
    238258                        "
    239259                />
    240                 <xsl:param name="childNameList"
     260                <xsl:param name="childNameList" 
    241261                        ibis:doc="Optional blank or csv list of child NAME element values to limit
    242262                                included elements (like DIMENSION) and any other includes that
     
    253273                        "
    254274                />
     275
    255276                <xsl:variable name="url"
    256                         select="if(not($basePathType)) then $url
     277                        select="if(0 = string-length($basePathType)) then $url
    257278                                else if('publishedxml' = lower-case($basePathType)) then ibis:getPublishedXMLPath($url)
    258279                                else ibis:getContentPath($url)
    259280                        "
    260281                />
    261 
    262282                <xsl:choose>
    263283                        <xsl:when test="$childNameList">
     
    266286                        </xsl:when>
    267287                        <xsl:when test="$includeChildrenOnly">
    268                                 <xsl:apply-templates select="document($url, /)/(*/text() | */*)" mode="ibis.copy"/>
     288                                <xsl:apply-templates select="document($url)/(*/text() | */*)" mode="ibis.copy"/>
    269289                        </xsl:when>
    270290                        <xsl:otherwise>
    271                                 <xsl:apply-templates select="document($url, /)/*" mode="ibis.copy"/>
     291                                <xsl:apply-templates select="document($url)/*" mode="ibis.copy"/>
    272292                        </xsl:otherwise>
    273293                </xsl:choose>
  • trunk/ibisph-view/src/main/webapp/xslt/html/SiteSpecific.xslt

    r23543 r25341  
    4242                        solution."
    4343        >
    44                 <xsl:apply-templates select="document(ibis:getContentPath('xml/selections/navigation/SiteNavigationSelections.xml'))/SELECTIONS/*" mode="ibis.copy"/>
     44                <xsl:apply-templates select="doc(ibis:getContentPath('xml/selections/navigation/SiteNavigationSelections.xml'))/SELECTIONS/*" mode="ibis.copy"/>
    4545        </xsl:param>
    4646        <xsl:param name="SiteSpecific.siteAuthenticatedUserSelections">
    47                 <xsl:apply-templates select="document(ibis:getContentPath('xml/selections/navigation/AuthenticatedUserSelection.xml'))/SELECTION/SELECTIONS" mode="ibis.copy"/>
     47                <xsl:apply-templates select="doc(ibis:getContentPath('xml/selections/navigation/AuthenticatedUserSelection.xml'))/SELECTION/SELECTIONS" mode="ibis.copy"/>
    4848        </xsl:param>
    4949        <xsl:param name="SiteSpecific.siteNonAuthenticatedUserSelections">
    50                 <xsl:apply-templates select="document(ibis:getContentPath('xml/selections/navigation/UserSelection.xml'))/SELECTION/SELECTIONS" mode="ibis.copy"/>
     50                <xsl:apply-templates select="doc(ibis:getContentPath('xml/selections/navigation/UserSelection.xml'))/SELECTION/SELECTIONS" mode="ibis.copy"/>
    5151        </xsl:param>
    5252
  • trunk/ibisph-view/src/main/webapp/xslt/html/community/facts/Page.xslt

    r25315 r25341  
    1616                <name>html/community/facts/Page</name>
    1717                <summary>
     18                        THIS IS NOT A WORKING PAGE.  MUCH NEEDS TO BE DEFINED and IMPLEMENTED.
     19                        THIS IS SIMPLY LEFT HERE AS A STUBB FOR POSSIBLE FUTURE WORK.
     20
    1821                        Provides the Special Introduction Overrides to be able to process
    1922                        both the community dimension file and the 'HTML_CONTENT' file to
  • trunk/ibisph-view/src/main/webapp/xslt/html/community/indicator/Page.xslt

    r24432 r25341  
    77        exclude-result-prefixes="ibis"
    88>
    9 <!-- GARTH TODO: remove this entire XSLT page???  If not remove then decide what
     9<!-- TODO: remove this entire XSLT page???  If not remove then decide what
    1010        it should be...
     11
     12        THIS IS NOT A WORKING PAGE.  MUCH NEEDS TO BE DEFINED and IMPLEMENTED.
     13        THIS IS SIMPLY LEFT HERE AS A STUBB FOR POSSIBLE FUTURE WORK.
    1114
    1215example it could simply be an trend IP report page for a specific community -
     
    3033                <summary>Default core code that produces the  Community Indicator Profile view</summary>
    3134                <description>
     35                        THIS IS NOT A WORKING PAGE.  MUCH NEEDS TO BE DEFINED and IMPLEMENTED.
     36                        THIS IS SIMPLY LEFT HERE AS A STUBB FOR POSSIBLE FUTURE WORK.
     37
    3238                        Provides overridden Page API templates for the community profile Indicator report.
    3339                </description>
  • trunk/ibisph-view/src/main/webapp/xslt/html/community/initiatives/Page.xslt

    r24432 r25341  
    1616                <summary>Default core code that produces the Community Initiatives</summary>
    1717                <description>
     18                        THIS IS NOT A WORKING PAGE.  MUCH NEEDS TO BE DEFINED and IMPLEMENTED.
     19                        THIS IS SIMPLY LEFT HERE AS A STUBB FOR POSSIBLE FUTURE WORK.
     20
    1821                        Main page templates for the community profile initiatives list Report.
    1922
  • trunk/ibisph-view/src/main/webapp/xslt/html/indicator/profile/Indicator.xslt

    r24942 r25341  
    2121
    2222        <!-- ==================== VARIABLES and PARAMETERS ===================== -->
     23        <!-- NOTE: no file exists or try catch as want this to fail as it should never happen -->
    2324        <xsl:param name="Indicator.indicator" select="
    2425                        if(exists(/INDICATOR_VIEW))then
    25                                 document(concat(/INDICATOR_VIEW/INDICATOR_NAME, '.xml'), /)/INDICATOR
     26                                document(/INDICATOR_VIEW/INDICATOR_NAME || '.xml', /)/INDICATOR
    2627                        else
    2728                                /INDICATOR
     
    3435        <xsl:param name="Indicator.indicatorView" select="
    3536                        if(exists(/INDICATOR))then
    36                                 document(concat(/INDICATOR/DEFAULT_INDICATOR_VIEW_NAME, '.xml'), /)/INDICATOR_VIEW
     37                                document(/INDICATOR/DEFAULT_INDICATOR_VIEW_NAME || '.xml', /)/INDICATOR_VIEW
    3738                        else
    3839                                /INDICATOR_VIEW
     
    691692                        </xsl:call-template>
    692693                </xsl:variable>
     694                <!--
    693695                <xsl:copy-of select="$reourcesAndLinksHTMLContent/HTML_CONTENT/CONTENT/*"/>
     696-->
    694697        </xsl:template>
    695698
  • trunk/ibisph-view/src/main/webapp/xslt/html/indicator/profile/complete_profile/Page.xslt

    r24942 r25341  
    8484
    8585                        <xsl:for-each select="$indicator/INDICATOR_VIEWS/INDICATOR_VIEW/NAME">
    86                                 <xsl:variable name="indicatorView" select="document(concat(current(), '.xml'), /)/INDICATOR_VIEW"/>
     86                                <!-- NOTE: no try catch for missing file - want this to fail as it should never happen -->
     87                                <xsl:variable name="indicatorView" select="document(current() || '.xml', /)/INDICATOR_VIEW"/>
     88
    8789                                <xsl:variable name="measure"       select="if($Indicator.useExternalXML) then $Measures/MEASURES/MEASURE[NAME=$indicatorView/MEASURE_NAME] else $indicator/MEASURES/MEASURE[NAME=$indicatorView/MEASURE_NAME]"/>
    8890                                <xsl:variable name="measureValueType" select="($Indicator.valueTypes/VALUE_TYPE[NAME = $measure/VALUE_TYPE_NAME])[1]"/>
  • trunk/ibisph-view/src/main/webapp/xslt/html/indicator/profile/summary/Page.xslt

    r25315 r25341  
    4646
    4747                        <xsl:for-each select="$indicator/INDICATOR_VIEWS/INDICATOR_VIEW/NAME">
    48                                 <xsl:variable name="indicatorView" select="document(concat(current(), '.xml'), /)/INDICATOR_VIEW"/>
     48                                <!-- NOTE: no try catch for missing file - want this to fail as it should never happen -->
     49                                <xsl:variable name="indicatorView" select="document(current() || '.xml', /)/INDICATOR_VIEW"/>
     50
    4951                                <xsl:variable name="measure"       select="if($Indicator.useExternalXML) then $Measures/MEASURES/MEASURE[NAME=$indicatorView/MEASURE_NAME] else $indicator/MEASURES/MEASURE[NAME=$indicatorView/MEASURE_NAME]"/>
    5052                                <xsl:variable name="measureValueType"                   select="($Indicator.valueTypes/VALUE_TYPE[NAME = $measure/VALUE_TYPE_NAME])[1]"/>
  • trunk/ibisph-view/src/main/webapp/xslt/html/query/module/report/configurations_by_file.xslt

    r23472 r25341  
    9999        <xsl:template name="processFile">
    100100                <xsl:param name="filename"/>
    101                 <xsl:param name="file"        select="document(concat($SiteSpecific.filePath, $filename), /)"/>
     101                <xsl:param name="file"        select="document($SiteSpecific.filePath || $filename, /)"/>
    102102                <xsl:param name="configCount" select="count($file/QUERY_MODULE/CONFIGURATIONS/CONFIGURATION)"/>
    103103
  • trunk/ibisph-view/src/main/webapp/xslt/ibis.xslt

    r24395 r25341  
    5959                        See: https://stackoverflow.com/questions/3854345/xpath-test-if-node-value-is-number
    6060                        for number() = NaN which is unique and is not the same as another NaN.
     61
     62                        castable does NOT work as blank values return TRUE.
     63                        <xsl:sequence select="$value castable as xs:double"/>
    6164                -->
    6265                <xsl:param name="value" ibis:doc="Source value to be tested"/>
     66
    6367                <xsl:sequence select="number($value) = number($value)"/>
    6468        </xsl:function>
  • trunk/ibisph-view/src/main/webapp/xslt/json/IndicatorViewDataset.xslt

    r24432 r25341  
    3232        <xsl:param name="indicator" select="
    3333                        if(exists(/INDICATOR_VIEW))then
    34                                 document(concat(/INDICATOR_VIEW/INDICATOR_NAME, '.xml'), /)/INDICATOR
     34                                document(/INDICATOR_VIEW/INDICATOR_NAME || '.xml', /)/INDICATOR
    3535                        else
    3636                                /INDICATOR
     
    5353        <xsl:param name="indicatorView" select="
    5454                        if(exists(/INDICATOR))then
    55                                 document(concat(/INDICATOR/DEFAULT_INDICATOR_VIEW_NAME, '.xml'), /)/INDICATOR_VIEW
     55                                document(/INDICATOR/DEFAULT_INDICATOR_VIEW_NAME || '.xml', /)/INDICATOR_VIEW
    5656                        else
    5757                                /INDICATOR_VIEW
  • trunk/ibisph-view/src/main/webapp/xslt/xml/Initiative.xslt

    r24432 r25341  
    1313                <description>
    1414                        Main page templates for the community profile initiatives list Report.
     15
     16THIS IS NOT A WORKING XSLT.  MUCH NEEDS TO BE DEFINED and IMPLEMENTED.
     17THIS IS SIMPLY LEFT HERE AS A STUBB FOR POSSIBLE FUTURE WORK.
    1518
    1619                        BY COMMUNITY - PICK COMMUNITY THEN LOOP ALL INITATIVES
Note: See TracChangeset for help on using the changeset viewer.