implemented finding count placeholder (cont.)

This commit is contained in:
skyanth
2017-03-29 11:40:42 +02:00
parent 964b655c84
commit 2c73209516
2 changed files with 9 additions and 2 deletions

View File

@@ -384,7 +384,7 @@
<xs:element name="p_reportdue"/>
<xs:element name="finding_count">
<xs:complexType>
<xs:attribute ref="threatLevel" use="required"/>
<xs:attribute ref="threatLevel" use="optional"/>
</xs:complexType>
</xs:element>
</xs:choice>

View File

@@ -349,7 +349,14 @@
<xsl:template match="finding_count">
<xsl:param name="threatLevel" select="@threatLevel"/>
<xsl:value-of select="count(//finding[@threatLevel=$threatLevel])" />
<xsl:choose>
<xsl:when test="@threatLevel">
<xsl:value-of select="count(//finding[@threatLevel = $threatLevel])"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="count(//finding)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="checkPlaceholder">