0
Hello I need help to add two columns in a report. The below follows what I have already done: XML
-<MaterialCrossSects>
<MaterialCrossSect name="ATERRO - PISTA" cumVolume="0" volume="0" area="0"/>
-<MaterialCrossSect name="ATERRO - CALÇADA ESQUERDA" cumVolume="0" volume="0" area="0.022566610288095">
-<MaterialCrossSectEnvelop area="1.64352610684091E-02">
<CrossSectPnt OE=" -4.249904, 892.028701"/>
<CrossSectPnt OE=" -4.249800, 892.096449"/>
<CrossSectPnt OE=" -4.000200, 892.091457"/>
<CrossSectPnt OE=" -4.000178, 892.027546"/>
<CrossSectPnt OE=" -4.249904, 892.028701"/>
</MaterialCrossSectEnvelop>
-<MaterialCrossSectEnvelop area="6.13134921968594E-03">
<CrossSectPnt OE=" -5.885287, 892.036261"/>
<CrossSectPnt OE=" -5.750200, 892.126319"/>
<CrossSectPnt OE=" -5.750060, 892.035636"/>
<CrossSectPnt OE=" -5.885287, 892.036261"/>
</MaterialCrossSectEnvelop>
</MaterialCrossSect>
-<MaterialCrossSect name="ATERRO - CALÇADA DIREITA" cumVolume="0" volume="0" area="5.41631406135821E-02">
-<MaterialCrossSectEnvelop area="0.028201527166857">
<CrossSectPnt OE=" 5.232389, 891.986101"/>
<CrossSectPnt OE=" 5.750000, 891.996453"/>
<CrossSectPnt OE=" 5.750200, 892.126319"/>
<CrossSectPnt OE=" 6.014144, 891.950347"/>
<CrossSectPnt OE=" 5.356544, 891.986190"/>
<CrossSectPnt OE=" 5.232389, 891.986101"/>
</MaterialCrossSectEnvelop>
-<MaterialCrossSectEnvelop area="2.59616134467251E-02">
<CrossSectPnt OE=" 4.000165, 891.990559"/>
<CrossSectPnt OE=" 4.000200, 892.091457"/>
<CrossSectPnt OE=" 4.249800, 892.096449"/>
<CrossSectPnt OE=" 4.249965, 891.989404"/>
<CrossSectPnt OE=" 4.000165, 891.990559"/>
</MaterialCrossSectEnvelop>
</MaterialCrossSect>
</MaterialCrossSects>
</CrossSect>
I have already managed to separate the values of Landfill in Lane|Left Sidewalk| Right Sidewalk, But for some reason I can not add the sidewalks, I would like to present in the table only track landfill and sidewalk landfill. Today it’s like this:
My code is like this:
<xsl:for-each select="./MaterialCrossSects/MaterialCrossSect">
<xsl:variable name="Area" select="@area" />
<xsl:if test="@name='ATERRO - PISTA'">
<td align="left">
<xsl:value-of select="landUtils:FormatNumber(string($Area), string($SourceAreaUnit), string($Surface.2D_Area.unit), string($Surface.2D_Area.precision), string($Surface.2D_Area.rounding))" />
</td>
</xsl:if>
<xsl:if test="@name='ATERRO - CALÇADA ESQUERDA'">
<xsl:variable name="Teste1" select="@area" />
<td align="left">
<xsl:value-of select="landUtils:FormatNumber(string($Teste1), string($SourceAreaUnit), string($Surface.2D_Area.unit), string($Surface.2D_Area.precision), string($Surface.2D_Area.rounding))" />
</td>
</xsl:if>
<xsl:if test="@name='ATERRO - CALÇADA DIREITA'">
<xsl:variable name="Teste2" select="@area" />
<td align="left">
<xsl:value-of select="landUtils:FormatNumber(string($Teste2), string($SourceAreaUnit), string($Surface.2D_Area.unit), string($Surface.2D_Area.precision), string($Surface.2D_Area.rounding))" />
</td>
</xsl:if>
<xsl:value-of select="$Teste1+$Teste2" /> <!-- ERRO -->
</xsl:for-each>
When I create variables within ifs they only work within ifs they don’t work outside of them, I don’t understand why