better gitlab integration (numbering, status)
This commit is contained in:
@@ -312,6 +312,7 @@
|
||||
<xs:enumeration value="Low"/>
|
||||
<xs:enumeration value="Unknown"/>
|
||||
<xs:enumeration value="NA"/>
|
||||
<xs:enumeration value="all"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:attribute>
|
||||
@@ -322,10 +323,12 @@
|
||||
<xs:enumeration value="resolved"/>
|
||||
<xs:enumeration value="unresolved"/>
|
||||
<xs:enumeration value="not_retested"/>
|
||||
<xs:enumeration value="none"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="type" use="required"/>
|
||||
<xs:attribute name="number" use="required" type="xs:integer"/>
|
||||
<xs:attribute name="break" use="optional">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<xsl:apply-templates select="." mode="number"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<xsl:if test="@status">
|
||||
<xsl:if test="@status = 'new' or @status = 'resolved' or @status = 'unresolved' or @status = 'not_retested'">
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
<fo:block xsl:use-attribute-sets="finding-meta">
|
||||
<fo:inline xsl:use-attribute-sets="bold">Retest status: </fo:inline>
|
||||
|
||||
+4
-15
@@ -6,27 +6,16 @@
|
||||
|
||||
<xsl:template match="finding" mode="number">
|
||||
<!-- Output finding display number (context is finding) -->
|
||||
<xsl:variable name="sectionNumber">
|
||||
<xsl:if test="/pentest_report/@findingNumberingBase = 'Section'">
|
||||
<xsl:value-of
|
||||
select="count(ancestor::section[last()]/preceding-sibling::section) + 1"/>
|
||||
</xsl:if>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="findingNumber" select="count(preceding::finding) + 1"/>
|
||||
<xsl:variable name="numFormat">
|
||||
<xsl:choose>
|
||||
<xsl:when test="/pentest_report/@findingNumberingBase = 'Section'">00</xsl:when>
|
||||
<xsl:otherwise>000</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="findingNumber" select="./@number"/>
|
||||
<xsl:variable name="numFormat" select="'000'"/>
|
||||
<xsl:value-of
|
||||
select="concat(ancestor::*[@findingCode][1]/@findingCode, '-', $sectionNumber, string(format-number($findingNumber, $numFormat)))"
|
||||
select="concat(ancestor::*[@findingCode][1]/@findingCode, '-', string(format-number($findingNumber, $numFormat)))"
|
||||
/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="non-finding" mode="number">
|
||||
<!-- Output finding display number (context is finding) -->
|
||||
<xsl:variable name="nonFindingNumber" select="count(preceding::non-finding) + 1"/>
|
||||
<xsl:variable name="nonFindingNumber" select="./@number" as="xs:integer"/>
|
||||
<xsl:variable name="numFormat" select="'000'"/>
|
||||
<xsl:value-of
|
||||
select="concat('NF-', string(format-number($nonFindingNumber, $numFormat)))"
|
||||
|
||||
Reference in New Issue
Block a user