From 703e769545a429c4950a90a33e47919469d41564 Mon Sep 17 00:00:00 2001
From: skyanth
Date: Thu, 20 Jun 2019 14:57:55 +0200
Subject: [PATCH] basing everything on variable nodeset
---
xml/dtd/offerte.xsd | 51 ++-
xml/dtd/pentestreport.xsd | 4 +-
xml/source/quickscope.xml | 12 +-
xml/source/servicebreakdown.xml | 80 +++--
.../offerte/en/planningandpayment.xml | 6 +-
xml/xslt/auto.xslt | 258 ++++++++++----
xml/xslt/functions_params_vars.xslt | 327 ++++++++++++++----
xml/xslt/placeholders.xslt | 42 ++-
xml/xslt/styles.xslt | 3 +
xml/xslt/styles_off.xslt | 9 +
10 files changed, 577 insertions(+), 215 deletions(-)
diff --git a/xml/dtd/offerte.xsd b/xml/dtd/offerte.xsd
index 033bf81..da72953 100644
--- a/xml/dtd/offerte.xsd
+++ b/xml/dtd/offerte.xsd
@@ -6,6 +6,7 @@
schemaLocation="http://www.w3.org/2001/xml.xsd"/>
+
@@ -46,7 +47,7 @@
-
+
@@ -59,10 +60,11 @@
-
+
+
-
+
@@ -71,7 +73,7 @@
-
+
@@ -79,7 +81,7 @@
-
+
@@ -88,34 +90,17 @@
-
+
-
+
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -203,6 +188,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/xml/dtd/pentestreport.xsd b/xml/dtd/pentestreport.xsd
index 51fcdba..9965557 100644
--- a/xml/dtd/pentestreport.xsd
+++ b/xml/dtd/pentestreport.xsd
@@ -114,6 +114,7 @@
+
@@ -289,8 +290,8 @@
+
-
@@ -311,7 +312,6 @@
-
diff --git a/xml/source/quickscope.xml b/xml/source/quickscope.xml
index 17e9a70..909d890 100644
--- a/xml/source/quickscope.xml
+++ b/xml/source/quickscope.xml
@@ -38,28 +38,30 @@
0
-
+
0
+
time-boxed
crystal-box
-
+
YYYY-MM-DDTBD
-
+
TBD
-
+
-
+
0
+
diff --git a/xml/source/servicebreakdown.xml b/xml/source/servicebreakdown.xml
index 9b706c0..b96cd2d 100644
--- a/xml/source/servicebreakdown.xml
+++ b/xml/source/servicebreakdown.xml
@@ -1,39 +1,75 @@
-
+
- Determine and set up attack vectors
- 2
- 1
-
+ Example Service 1: set duration in days and with hourly rate.
+ 2
+ 10
+
- Set up infrastructure and support
- 20
- 2
-
+ Example Service 2: variable duration with min/max parameters and with hourly
+ rate.
+
+ 3
+ 4
+
+ 10
+
- Attacking and reporting
- 5
- 3
-
-
+ Example Service 3: set duration in days with CUSTOM (non-computed) set
+ fee.
+ 5
+ 500
+
+
+ Example Service 4: set duration in hours with CUSTOM (non-computed) variable fee
+ (min/max).
+ 4
+
+ 100
+ 200
- Travel and hotel
- 50
+ Example Service 5: set duration in days with CUSTOM (non-computed) estimated
+ fee.
+ 4
+ 1000
-
- Optional: presentation of findings
- 02
- 100
-
+
+ Example Service 6: optional service
+
+ 1
+ 2
+
+ 50
+
-
+
+ Example Extra Cost 1: set fee
+ 1000
+
+
+ Example Extra Cost 2: variable min/max fee
+
+ 1000
+ 1200
+
+
+
+ Example Extra Cost 3: estimated fee
+ 600
+
+
+ Example Extra Cost 4: with duration
+ 6
+ 600
+
+
diff --git a/xml/source/snippets/offerte/en/planningandpayment.xml b/xml/source/snippets/offerte/en/planningandpayment.xml
index 20fa0ac..63e9027 100644
--- a/xml/source/snippets/offerte/en/planningandpayment.xml
+++ b/xml/source/snippets/offerte/en/planningandpayment.xml
@@ -6,10 +6,12 @@
- performs a -day starting .
- - delivers the final report on .
+ - delivers the final report on
+ .
- Our fixed-fee price quote for the above described is .-
+ Our fixed-fee price quote for the above described is
+
excl. VAT and out-of-pocket expenses.
will send an invoice after the completion of this assignment.
will pay the agreed amount within 14 days of the invoice date.
diff --git a/xml/xslt/auto.xslt b/xml/xslt/auto.xslt
index d7985b4..a15124b 100644
--- a/xml/xslt/auto.xslt
+++ b/xml/xslt/auto.xslt
@@ -461,8 +461,8 @@
-
-
+
+
@@ -473,31 +473,26 @@
-
+
:
-
-
-
+
-
- TODO: total!
-
-
-
-
-
@@ -505,7 +500,7 @@
Description
- Duration
+ Effort
Hourly rate
@@ -514,84 +509,107 @@
Fee
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 2
- (flat rate)
-
-
-
-
-
-
-
-
-
-
-
-
+
+ #ededed
+
+ 3
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+ select="."/>
-
-
-
+
+
+
+ excl. VAT
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ excl. VAT
+ *
+
+
+
+
+ Total
+
+ (estimate)
+ :
+
+
+ excl. VAT
+
+
+
-
- TODO total
-
+
+
+
+ * Estimate
+
+
@@ -602,4 +620,94 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Cannot print denomination: not all fees in
+ service_breakdown have an equal denomination (tip: if most services are in
+ eur but one is in usd, add the usd fee to the description for that service
+ and use an estimated eur for the hourly rate or fee).
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+ .-
+
+
+
diff --git a/xml/xslt/functions_params_vars.xslt b/xml/xslt/functions_params_vars.xslt
index f451710..8d9db6f 100644
--- a/xml/xslt/functions_params_vars.xslt
+++ b/xml/xslt/functions_params_vars.xslt
@@ -2,15 +2,17 @@
-
+
#e2632a
#ededed
- #e4e4e4
- #999999
+ #e4e4e4
+
+ #999999
+
#444444
white
-
+
#444444
@@ -32,7 +34,7 @@
-
+
@@ -75,7 +77,194 @@
mediumturquoise
navy
black
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (Optional)
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ERROR: cannot compute fee for
+ "" - effort and/or hourly rate
+ missing
+
+
+
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -239,57 +428,11 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
@@ -298,29 +441,75 @@
-
+
-
-
- summaryTableThreatLevel
-
-
+
-
+
-
+
+
+
+
+
+
+
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ summaryTableThreatLevel
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -402,7 +591,7 @@
-
+
diff --git a/xml/xslt/placeholders.xslt b/xml/xslt/placeholders.xslt
index 9b89a26..9d87bcb 100644
--- a/xml/xslt/placeholders.xslt
+++ b/xml/xslt/placeholders.xslt
@@ -189,9 +189,17 @@
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -201,13 +209,21 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -496,17 +512,17 @@
+ test="(self::contract_end_date or self::contract_start_date or self::generate_raterevisiondate or self::p_startdate or self::p_enddate or self::p_reportdue) and string($placeholderElement) castable as xs:date">
+ test="(self::contract_end_date or self::contract_start_date or self::generate_raterevisiondate or self::p_startdate or self::p_enddate or self::p_reportdue) and normalize-space(.) = 'TBD'">
TBD
+ test="(self::contract_end_date or self::contract_start_date or self::generate_raterevisiondate or self::p_startdate or self::p_enddate or self::p_reportdue) and not(string($placeholderElement) castable as xs:date)">
TBD
diff --git a/xml/xslt/styles.xslt b/xml/xslt/styles.xslt
index 4834bcc..dd84529 100644
--- a/xml/xslt/styles.xslt
+++ b/xml/xslt/styles.xslt
@@ -442,4 +442,7 @@
0
0
+
+
+
diff --git a/xml/xslt/styles_off.xslt b/xml/xslt/styles_off.xslt
index 8359804..561541c 100644
--- a/xml/xslt/styles_off.xslt
+++ b/xml/xslt/styles_off.xslt
@@ -26,4 +26,13 @@
+
+
+ justify
+ bold
+
+
+ 1px solid black
+
+