Oracle Analytics Publisher

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

Custom Report error out due to in put string ending with "."

Question
12
Views
0
Comments

Hi -

We have a custom report which uses XSL Stylesheet which errors out due to input string ending with "." which is a valid value. I would like to ask how we can modify the script below to be able to parse the input string.

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<xsl:template match="/">
<DATA_DS>
<xsl:variable name="var_size" select="63000"/>
<xsl:for-each select="/DATA_DS/G_1">
<xsl:variable name="var_pos" select="position()"/>
<xsl:variable name="var_mod" select="$var_pos mod($var_size)"/>
<xsl:if test="$var_mod = 1">
<xsl:variable name="var_groupNum" select="($var_pos - $var_mod) div number($var_size) + 1"/>
<xsl:element name="CountGroup">
<xsl:attribute name="name">
<xsl:value-of select="concat('Journal', $var_groupNum)"/>
</xsl:attribute>
<xsl:for-each select="/DATA_DS/G_1[position() > ($var_pos -1) and position() < ($var_pos + $var_size)]">
<xsl:copy-of select="."/>
</xsl:for-each>
<xsl:for-each select="/DATA_DS/G_2">
<xsl:copy-of select="."/>
</xsl:for-each>
</xsl:element>
</xsl:if>
</xsl:for-each>
</DATA_DS>
</xsl:template>
</xsl:stylesheet>