Project

Profile

Help

ValidationException: String to double conversion: no digi... » Rules.xsl

Sample XSLT - Maya Mathews, 2017-08-04 09:17

 
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:Error="Errors.uri" exclude-result-prefixes="Error">
<xsl:output method="xml" indent="yes"/>

<xsl:template match="WorkMembers">
<xsl:call-template name="Generic"/>
</xsl:template>

<xsl:template name="Generic">
<xsl:for-each select="/Message/WorkMembers/WorkMember/ServiceGroup">
<xsl:variable name="TotalRatio" select="format-number(
sum(Service[Type and not(Type= '')
and contains(' PRM FXT TMP ', concat(' ', Type, ' '))
]/Roles/Role/RoleLevelDetails/Hours/Ratio) +
sum(Service[Type and not(Type= '')
and contains(' PRM FXT TMP ', concat(' ', Type, ' '))
]/LevelDetails/Hours/Ratio)
, '##.########') "/>
<xsl:if test="$TotalRatio &gt;1.5">
<xsl:call-template name="Error">
</xsl:call-template>
</xsl:if>
</xsl:for-each>
</xsl:template>

<xsl:template name="Error">
</xsl:template>
</xsl:stylesheet>
(2-2/2)