Subject: Re: [xsl] Global Variables in streaming xslts From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Mon, 15 Aug 2016 16:39:11 -0000 |
1. How do we get the global Xpaths.. That can be used else where.
example: I want to know somewhere in some template the value of some other element : for example In Amphibian template definition, I want to know if WaterSpeciesDisplayIndicator is set to true :
Code:
<xsl:transform version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:saxon="http://saxon.sf.net/" xmlns:multiclass="http://www.csp.com/Securitization/csp-multiclass" xmlns:mismo="http://www.mismo.org/residential/2009/schemas">
<xsl:mode name="stream" streamable="yes" on-no-match="shallow-copy"/>
<xsl:output method="xml" indent="yes"/>
<xsl:variable name="WaterSpeciesDisplayIndicator" select="/*:UniverseKingdom/*:DisplayIndicators/*:WaterSpeciesDisplayIndicator = 'true'"/>
<xsl:template match="/">
<xsl:stream href="UniverseKingdom.xml">
<xsl:apply-templates mode="stream"/> </xsl:stream> </xsl:template>
<xsl:template match="*:Amphibian">
<xsl:if test = "$WaterSpeciesDisplayIndicator"> <xsl:copy-of select = "."/> </xsl:if>
</xsl:template>
I know that GLobal parameters will not work because the variables probably doesnt know the XML we are streaming at the time of declaration. I also know that from the template match for Amphibian, I can not get to the xpath of /*:UniverseKingdom/*:DisplayIndicators/*:WaterSpeciesDisplayIndicator.
I am not sure how else I should be getting the WaterSpeciesDisplayIndicator Value
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Global Variables in streaming, Mailing Lists Mail d | Thread | Re: [xsl] Global Variables in strea, Michael Kay mike@xxx |
Re: [xsl] XSLT3 - Streaming + Recur, Mailing Lists Mail d | Date | Re: [xsl] Global Variables in strea, Michael Kay mike@xxx |
Month |