Revert "Exec summary switch now generates report as well as executive summary (and not just the summary)"

This reverts commit ef1ff0542c8dc73752ff3da70f110b4f08196b74.
This commit is contained in:
skyanth 2017-07-03 15:11:20 +02:00
parent ef1ff0542c
commit b29bcf81e4
6 changed files with 20 additions and 30 deletions

View File

@ -58,28 +58,26 @@
<!-- ROOT --> <!-- ROOT -->
<xsl:template match="/"> <xsl:template match="/">
<xsl:if test="$EXEC_SUMMARY = true()"> <xsl:choose>
<xsl:when test="$EXEC_SUMMARY = true()">
<xsl:result-document href="../target/execsummary.fo"> <xsl:result-document href="../target/execsummary.fo">
<fo:root xsl:use-attribute-sets="root-common"> <fo:root xsl:use-attribute-sets="root-common">
<xsl:call-template name="layout-master-set"/> <xsl:call-template name="layout-master-set"/>
<xsl:call-template name="Content"> <xsl:call-template name="Content"/>
<xsl:with-param name="execsummary" select="true()" tunnel="yes"/>
</xsl:call-template>
</fo:root> </fo:root>
</xsl:result-document> </xsl:result-document>
</xsl:if> </xsl:when>
<xsl:otherwise>
<fo:root xsl:use-attribute-sets="root-common"> <fo:root xsl:use-attribute-sets="root-common">
<xsl:call-template name="layout-master-set"/> <xsl:call-template name="layout-master-set"/>
<xsl:call-template name="Content"> <xsl:call-template name="Content"/>
<xsl:with-param name="execsummary" select="false()" tunnel="yes"/>
</xsl:call-template>
</fo:root> </fo:root>
</xsl:otherwise>
</xsl:choose>
</xsl:template> </xsl:template>

View File

@ -4,7 +4,6 @@
xmlns:fo="http://www.w3.org/1999/XSL/Format" version="2.0"> xmlns:fo="http://www.w3.org/1999/XSL/Format" version="2.0">
<xsl:template match="a"> <xsl:template match="a">
<xsl:param name="execsummary" tunnel="yes"/>
<xsl:variable name="destination"> <xsl:variable name="destination">
<xsl:choose> <xsl:choose>
<xsl:when test="starts-with(@href, '#')"> <xsl:when test="starts-with(@href, '#')">
@ -21,7 +20,7 @@
DOCUMENT</fo:inline> DOCUMENT</fo:inline>
</xsl:when> </xsl:when>
<xsl:when <xsl:when
test="(starts-with(@href, '#') and //*[@id = $destination][ancestor-or-self::*[@visibility = 'hidden']]) or (starts-with(@href, '#') and $execsummary=true() and //*[@id = $destination][ancestor-or-self::*[not(@inexecsummary='yes')]])"> test="(starts-with(@href, '#') and //*[@id = $destination][ancestor-or-self::*[@visibility = 'hidden']]) or (starts-with(@href, '#') and $EXEC_SUMMARY=true() and //*[@id = $destination][ancestor-or-self::*[not(@inexecsummary='yes')]])">
<fo:inline xsl:use-attribute-sets="errortext">WARNING: LINK TARGET IS <fo:inline xsl:use-attribute-sets="errortext">WARNING: LINK TARGET IS
HIDDEN</fo:inline> HIDDEN</fo:inline>
</xsl:when> </xsl:when>

View File

@ -5,7 +5,6 @@
version="2.0"> version="2.0">
<xsl:template match="meta"> <xsl:template match="meta">
<xsl:param name="execsummary" tunnel="yes"/>
<xsl:variable name="latestVersionNumber"> <xsl:variable name="latestVersionNumber">
<xsl:for-each select="version_history/version"> <xsl:for-each select="version_history/version">
<xsl:sort select="xs:dateTime(@date)" order="descending"/> <xsl:sort select="xs:dateTime(@date)" order="descending"/>
@ -21,7 +20,7 @@
</fo:block> </fo:block>
<fo:block xsl:use-attribute-sets="title-0"> <fo:block xsl:use-attribute-sets="title-0">
<xsl:choose> <xsl:choose>
<xsl:when test="$execsummary=true()"> <xsl:when test="$EXEC_SUMMARY=true()">
<xsl:text>PENETRATION TEST MANAGEMENT SUMMARY</xsl:text> <xsl:text>PENETRATION TEST MANAGEMENT SUMMARY</xsl:text>
</xsl:when> </xsl:when>
<xsl:otherwise><xsl:value-of select="upper-case(title)"/></xsl:otherwise> <xsl:otherwise><xsl:value-of select="upper-case(title)"/></xsl:otherwise>
@ -62,7 +61,6 @@
</xsl:template> </xsl:template>
<xsl:template name="DocProperties"> <xsl:template name="DocProperties">
<xsl:param name="execsummary" tunnel="yes"/>
<xsl:variable name="latestVersionNumber"> <xsl:variable name="latestVersionNumber">
<xsl:for-each select="version_history/version"> <xsl:for-each select="version_history/version">
<xsl:sort select="xs:dateTime(@date)" order="descending"/> <xsl:sort select="xs:dateTime(@date)" order="descending"/>
@ -98,7 +96,7 @@
<fo:table-cell xsl:use-attribute-sets="td"> <fo:table-cell xsl:use-attribute-sets="td">
<fo:block> <fo:block>
<xsl:choose> <xsl:choose>
<xsl:when test="$execsummary=true()"> <xsl:when test="$EXEC_SUMMARY=true()">
<xsl:text>PENETRATION TEST MANAGEMENT SUMMARY</xsl:text> <xsl:text>PENETRATION TEST MANAGEMENT SUMMARY</xsl:text>
</xsl:when> </xsl:when>
<xsl:otherwise><xsl:value-of select="upper-case(title)"/></xsl:otherwise> <xsl:otherwise><xsl:value-of select="upper-case(title)"/></xsl:otherwise>

View File

@ -36,9 +36,8 @@
<xsl:template <xsl:template
match="section[not(@visibility = 'hidden')] | appendix[not(@visibility = 'hidden')]" match="section[not(@visibility = 'hidden')] | appendix[not(@visibility = 'hidden')]"
mode="number"> mode="number">
<xsl:param name="execsummary" tunnel="yes"/>
<xsl:choose> <xsl:choose>
<xsl:when test="$execsummary = true()"> <xsl:when test="$EXEC_SUMMARY = true()">
<xsl:choose> <xsl:choose>
<xsl:when test="self::appendix"> <xsl:when test="self::appendix">
<fo:inline> Appendix&#160;<xsl:number <fo:inline> Appendix&#160;<xsl:number

View File

@ -4,10 +4,9 @@
xmlns:fo="http://www.w3.org/1999/XSL/Format" version="2.0"> xmlns:fo="http://www.w3.org/1999/XSL/Format" version="2.0">
<xsl:template match="section | appendix | finding | non-finding | annex"> <xsl:template match="section | appendix | finding | non-finding | annex">
<xsl:param name="execsummary" tunnel="yes"/>
<xsl:if test="not(@visibility = 'hidden')"> <xsl:if test="not(@visibility = 'hidden')">
<xsl:choose> <xsl:choose>
<xsl:when test="$execsummary = true()"> <xsl:when test="$EXEC_SUMMARY = true()">
<xsl:if test="ancestor-or-self::*/@inexecsummary = 'yes'"> <xsl:if test="ancestor-or-self::*/@inexecsummary = 'yes'">
<fo:block xsl:use-attribute-sets="section"> <fo:block xsl:use-attribute-sets="section">
<xsl:if test="self::appendix or self::annex"> <xsl:if test="self::appendix or self::annex">
@ -30,7 +29,6 @@
</xsl:template> </xsl:template>
<xsl:template match="title[not(parent::biblioentry)]"> <xsl:template match="title[not(parent::biblioentry)]">
<xsl:param name="execsummary" tunnel="yes"/>
<xsl:variable name="LEVEL" select="count(ancestor::*) - 1"/> <xsl:variable name="LEVEL" select="count(ancestor::*) - 1"/>
<xsl:variable name="CLASS"> <xsl:variable name="CLASS">
<!-- use title-x for all levels --> <!-- use title-x for all levels -->
@ -43,7 +41,7 @@
<xsl:with-param name="CLASS" select="$CLASS"/> <xsl:with-param name="CLASS" select="$CLASS"/>
</xsl:call-template> </xsl:call-template>
<xsl:choose> <xsl:choose>
<xsl:when test="$execsummary = true()"> <xsl:when test="$EXEC_SUMMARY = true()">
<xsl:choose> <xsl:choose>
<xsl:when test="self::title[parent::appendix]"> <xsl:when test="self::title[parent::appendix]">
<fo:inline> Appendix&#160;<xsl:number <fo:inline> Appendix&#160;<xsl:number

View File

@ -25,9 +25,9 @@
<xsl:template <xsl:template
match="section[not(@visibility = 'hidden')] | finding | appendix[not(@visibility = 'hidden')] | non-finding" match="section[not(@visibility = 'hidden')] | finding | appendix[not(@visibility = 'hidden')] | non-finding"
mode="toc"> mode="toc">
<xsl:param name="execsummary" tunnel="yes"/>
<xsl:choose> <xsl:choose>
<xsl:when test="$execsummary = true()"> <xsl:when test="$EXEC_SUMMARY = true()">
<xsl:if test="ancestor-or-self::*/@inexecsummary = 'yes'"> <xsl:if test="ancestor-or-self::*/@inexecsummary = 'yes'">
<xsl:call-template name="ToC"/> <xsl:call-template name="ToC"/>
</xsl:if> </xsl:if>
@ -40,7 +40,6 @@
</xsl:template> </xsl:template>
<xsl:template name="ToC"> <xsl:template name="ToC">
<xsl:param name="execsummary" tunnel="yes"/>
<fo:table-row> <fo:table-row>
<fo:table-cell text-align-last="justify"> <fo:table-cell text-align-last="justify">
<fo:block> <fo:block>
@ -67,7 +66,7 @@
</fo:table-cell> </fo:table-cell>
</fo:table-row> </fo:table-row>
<xsl:choose> <xsl:choose>
<xsl:when test="$execsummary = true()"> <xsl:when test="$EXEC_SUMMARY = true()">
<xsl:apply-templates <xsl:apply-templates
select="section[not(@visibility = 'hidden')][not(../@visibility = 'hidden')][ancestor-or-self::*/@inexecsummary = 'yes']" select="section[not(@visibility = 'hidden')][not(../@visibility = 'hidden')][ancestor-or-self::*/@inexecsummary = 'yes']"
mode="toc"/> mode="toc"/>
@ -96,11 +95,10 @@
</xsl:template> </xsl:template>
<xsl:template name="tocContent_Numbering"> <xsl:template name="tocContent_Numbering">
<xsl:param name="execsummary" tunnel="yes"/>
<xsl:choose> <xsl:choose>
<xsl:when test="self::appendix[not(@visibility = 'hidden')]"> <xsl:when test="self::appendix[not(@visibility = 'hidden')]">
<xsl:choose> <xsl:choose>
<xsl:when test="$execsummary = true()"> <xsl:when test="$EXEC_SUMMARY = true()">
<fo:inline> Appendix&#160;<xsl:number <fo:inline> Appendix&#160;<xsl:number
count="appendix[not(@visibility = 'hidden')][@inexecsummary = 'yes']" count="appendix[not(@visibility = 'hidden')][@inexecsummary = 'yes']"
level="multiple" format="{$AUTO_NUMBERING_FORMAT}"/></fo:inline> level="multiple" format="{$AUTO_NUMBERING_FORMAT}"/></fo:inline>
@ -114,7 +112,7 @@
</xsl:when> </xsl:when>
<xsl:when test="ancestor::appendix[not(@visibility = 'hidden')]"> <xsl:when test="ancestor::appendix[not(@visibility = 'hidden')]">
<xsl:choose> <xsl:choose>
<xsl:when test="$execsummary = true()"> <xsl:when test="$EXEC_SUMMARY = true()">
<xsl:if test="ancestor::appendix[@inexecsummary = 'yes']"> <xsl:if test="ancestor::appendix[@inexecsummary = 'yes']">
<fo:inline> App&#160;<xsl:number <fo:inline> App&#160;<xsl:number
count="appendix[not(@visibility = 'hidden')][@inexecsummary = 'yes']" count="appendix[not(@visibility = 'hidden')][@inexecsummary = 'yes']"
@ -136,7 +134,7 @@
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<xsl:choose> <xsl:choose>
<xsl:when test="$execsummary = true()"> <xsl:when test="$EXEC_SUMMARY = true()">
<xsl:number <xsl:number
count="section[not(@visibility = 'hidden')][ancestor-or-self::*/@inexecsummary = 'yes']" count="section[not(@visibility = 'hidden')][ancestor-or-self::*/@inexecsummary = 'yes']"
level="multiple" format="{$AUTO_NUMBERING_FORMAT}"/> level="multiple" format="{$AUTO_NUMBERING_FORMAT}"/>