Squashed commit of the following:
commit a9c029ad92602b9bbc72573ed7e3b786b4fd80c1 Author: skyanth <skyanth@gmail.com> Date: Thu Sep 13 10:27:59 2018 +0200 Some Quote front page improvements commit 20c2557148f1d701ba15d354701321ec19e3cd55 Author: skyanth <skyanth@gmail.com> Date: Wed Sep 12 17:31:24 2018 +0200 put rogue pie chart percentage in its place commit e1507a28142bc2b4d07ddb50b768f219b00638c3 Author: skyanth <skyanth@gmail.com> Date: Wed Sep 12 17:27:05 2018 +0200 Updated invoice design commit 366df3a7872f1d5f63b60b7811fd754bfb44d050 Author: skyanth <skyanth@gmail.com> Date: Wed Sep 12 17:26:56 2018 +0200 better color customizability commit 6490e90e47d1da5a4c1da16a1a7669e98d806a9e Author: skyanth <skyanth@gmail.com> Date: Tue Sep 11 11:50:27 2018 +0200 More outspoken threatlevel colours commit 27f00f5786db1fa9100cb5c66bed20892910e8fa Author: skyanth <skyanth@gmail.com> Date: Mon Sep 10 15:25:48 2018 +0200 waiver snippet custom annex number addition commit a8ea948011756a8e67ad7317ac2cb3dd0735ba32 Author: skyanth <skyanth@gmail.com> Date: Mon Sep 10 13:20:15 2018 +0200 Less corporate front page graphics commit 8e0abaec9bdbf086f66248d10b413179b04f8891 Author: skyanth <skyanth@gmail.com> Date: Mon Sep 10 13:19:58 2018 +0200 Moved Finding and Non-finding sections up one level commit 6cf510ef5daf8cca6f8252afc5fccbddaa436fa4 Author: skyanth <skyanth@gmail.com> Date: Mon Sep 10 10:25:08 2018 +0200 Sorted out email element commit d968daf431ab07b6537c7b37fd8a56b7ce4f548b Author: skyanth <skyanth@gmail.com> Date: Mon Sep 10 10:24:36 2018 +0200 Configurable annex number for waivers commit dae15c01571a036c55ce29755d67f531340b5894 Author: skyanth <skyanth@gmail.com> Date: Mon Sep 10 10:04:45 2018 +0200 More colors available for generic pie chart commit 5f3fb9fa6241b56e527e2581cae656f6ac256f21 Author: skyanth <skyanth@gmail.com> Date: Fri Sep 7 09:52:50 2018 +0200 Placeholder documentation commit bc4d702076c4ca14d46728f299ecd6fff9c0f3e4 Author: skyanth <skyanth@gmail.com> Date: Fri Sep 7 09:52:40 2018 +0200 Added client reference number and rep/quo subtitles commit cadbd468dd15111e6e1f603c071fdf39b0447808 Author: skyanth <skyanth@gmail.com> Date: Wed Sep 5 14:47:29 2018 +0200 Keep finding metaboxes together & connected with title commit 293b9b45ed12c4938ada404efda0d2e5e04cb0f4 Author: skyanth <skyanth@gmail.com> Date: Wed Sep 5 14:47:04 2018 +0200 Place document classification on frontpage and in header commit 289e17ee7991f2e13c0570eb3ba221aa613eea16 Author: skyanth <skyanth@gmail.com> Date: Tue Aug 28 11:43:50 2018 +0200 better link processing for summaries commit 2f0b27311c0a378891b1ffab3c91661615f92e4b Author: skyanth <skyanth@gmail.com> Date: Tue Aug 28 11:29:49 2018 +0200 still better pie chart percentage placement commit c1027f859881e419f96c2f05134df0cea3afd373 Author: skyanth <skyanth@gmail.com> Date: Tue Aug 28 11:05:46 2018 +0200 proper link color for summary table links commit 781f8a22bf4b17abd03016ad31c0feb01d9ea590 Author: skyanth <skyanth@gmail.com> Date: Tue Aug 28 11:02:24 2018 +0200 I can do xml, really… commit 2c0ee3d55a789d58fb6a3fbeae4117163217c96d Author: skyanth <skyanth@gmail.com> Date: Tue Aug 28 11:01:11 2018 +0200 proper link now :D commit bc763607c8518c9cb4af54e23aee3be59221078f Author: skyanth <skyanth@gmail.com> Date: Tue Aug 28 10:55:49 2018 +0200 added link commit d6098c012d15ed46a85713ab04f4769a683298e4 Author: skyanth <skyanth@gmail.com> Date: Fri Aug 24 11:36:35 2018 +0200 added “todo” placeholder commit 0d45a5de8248710661f7968f9e5019953f2baadf Author: skyanth <skyanth@gmail.com> Date: Fri Aug 24 11:21:43 2018 +0200 majorly improved piechart percentage placement commit 6a4af5e574cef9b0bc5f355cad24ce5470cd8d70 Author: skyanth <skyanth@gmail.com> Date: Wed Aug 22 11:06:26 2018 +0200 finding severity metabar thickness commit 697e78fe48e007f132a67ac3141baab2cec1656a Author: skyanth <skyanth@gmail.com> Date: Wed Aug 22 10:55:13 2018 +0200 Revert "gradient bar to show severity" This reverts commit 0cc25e45d11d349c99b395ac9bd87546a162d940. commit 0cc25e45d11d349c99b395ac9bd87546a162d940 Author: skyanth <skyanth@gmail.com> Date: Fri Aug 10 10:30:42 2018 +0200 gradient bar to show severity commit c199666050588288ee13235f6aa6570f515bc626 Author: skyanth <skyanth@gmail.com> Date: Thu Aug 9 10:39:56 2018 +0200 Visual severity clue in finding metabar commit 47e6c85e02ec7d32d9f0c25ae2be0a4f35f79414 Author: skyanth <skyanth@gmail.com> Date: Thu Aug 9 10:29:23 2018 +0200 section-tocs no longer exist commit 221fd21636af483dd43a398f9e7baf534d4e4c94 Author: skyanth <skyanth@gmail.com> Date: Thu Aug 9 10:29:02 2018 +0200 Improved color customizability commit b8aa99b910e0d2ba82c86bcb031ef111b2902a1f Author: skyanth <skyanth@gmail.com> Date: Wed Aug 8 11:23:30 2018 +0200 Sections no longer force end on even page commit 3cf2a2ce2ad282782d5d1b7fcfb2f47a2836a188 Author: skyanth <skyanth@gmail.com> Date: Wed Aug 8 11:16:28 2018 +0200 Moved section marker to footer; removed sidetab commit f2db57f4617cd5470c8f77c395a0e9dea70078a5 Author: skyanth <skyanth@gmail.com> Date: Wed Aug 8 10:26:08 2018 +0200 Different graphic for quote cover commit 6917217cadbb8652e07093d8731f01d4e7a390e2 Author: skyanth <skyanth@gmail.com> Date: Tue Aug 7 10:40:36 2018 +0200 A lot of work on waivers/titles/customizability commit 3434275da82c73d71557608aaa8263715e9ba098 Author: skyanth <skyanth@gmail.com> Date: Tue Jul 24 11:03:31 2018 +0200 preventing text dropoff commit ae2385cbcd6f19dc8a201de47f316b79c2be8769 Author: skyanth <skyanth@gmail.com> Date: Tue Jul 24 10:58:34 2018 +0200 different front page graphic commit 25390e59777bb25be724637cf732983a27c67a98 Author: skyanth <skyanth@gmail.com> Date: Tue Jul 24 10:57:56 2018 +0200 Better pie chart display commit 471785e4714f3a739e116485d180819a4246d39d Author: skyanth <skyanth@gmail.com> Date: Tue Jul 24 10:57:37 2018 +0200 Better pie chart display commit f21577f1b355997c834c9422eb6edd0e68f509a2 Merge: 832b884 8c0d4fa Author: skyanth <skyanth@gmail.com> Date: Mon Jul 9 14:16:35 2018 +0200 Merge branch 'xslt-new-layout' of https://github.com/radicallyopensecurity/pentext into xslt-new-layout # Conflicts: # xml/dtd/common.xsd commit ee602f8a96bce6984570575edc395eae6eecb6d3 Author: skyanth <skyanth@gmail.com> Date: Mon Jul 9 14:14:10 2018 +0200 accept floats commit a653ae60ef38e04242ed7d5868093c7c61b8d59f Author: skyanth <skyanth@gmail.com> Date: Mon Jul 9 14:14:02 2018 +0200 accept floats commit 270758f95c2417887bdb2ab16e45b484c18d6a64 Author: Patricia Piolon <skyanth@gmail.com> Date: Mon May 7 14:51:02 2018 +0200 new generic document style commit 24f3c0ce0f814a3ceb2d7ace61e2a7797593a08f Author: Patricia Piolon <skyanth@gmail.com> Date: Fri May 4 14:38:09 2018 +0200 fix email; updated exampe offerte commit 866afd015254ecf3bfd1f19bfa8951f206629ac9 Author: skyanth <skyanth@gmail.com> Date: Fri May 4 14:03:54 2018 +0200 faulty common commit 53455555d7473427a9cc686d894e447ca6874b77 Author: skyanth <skyanth@gmail.com> Date: Fri May 4 13:27:50 2018 +0200 set default root properties on root element commit d3a109494e0a245fdc8a3de20e8abab8b07dec7f Author: skyanth <skyanth@gmail.com> Date: Tue Apr 17 15:34:55 2018 +0200 Improved ratecard design commit 759764d1f9ec0b5f7087aed71d1e37a64051fdcf Author: skyanth <skyanth@gmail.com> Date: Thu Apr 12 12:45:59 2018 +0200 somewhat improved ratecard design… not complete yet commit 4f1ef5b5139de2ca5c8f8d954047a72c11de61d3 Author: skyanth <skyanth@gmail.com> Date: Wed Apr 11 15:24:37 2018 +0200 Invoice & ratecard new design commit aeba58ae0cfddd13376b7b06a52117617b7187e0 Author: skyanth <skyanth@gmail.com> Date: Fri Apr 6 16:01:12 2018 +0200 better list design (default+finding/rec tables) commit 975afadbbd01395d1777dd758808d9430827b898 Author: skyanth <skyanth@gmail.com> Date: Fri Apr 6 14:56:54 2018 +0200 general var/param/function refactoring - small fixes commit dbfe29238eb56857a6b6de8601ed0c6b1943ab31 Author: skyanth <skyanth@gmail.com> Date: Fri Apr 6 14:48:04 2018 +0200 refactoring to isolate keys/vars/params/functions commit c3b94fec4bfb9f5d2189f5866ab5876385444538 Author: skyanth <skyanth@gmail.com> Date: Wed Apr 4 09:51:03 2018 +0200 made toc colwidth dynamic to stop fop from whining commit 58df1d1434db767e76f19df814d871493f6e94b5 Author: skyanth <skyanth@gmail.com> Date: Wed Apr 4 09:50:38 2018 +0200 added waivers back to quotes (oops) commit 5279b2534d4c4435c46b2932863aaba46851070f Author: skyanth <skyanth@gmail.com> Date: Wed Apr 4 09:50:21 2018 +0200 Added waivers back to quotes (oops) commit f9374400513c9af303b06f896609184d2a9e5fed Author: skyanth <skyanth@gmail.com> Date: Wed Apr 4 09:49:45 2018 +0200 Migrated exec summary to new design commit 6bf792e92783db2aefb5e6944a382640de880092 Author: skyanth <skyanth@gmail.com> Date: Wed Apr 4 09:48:08 2018 +0200 merge fix commit 61e821ea18fca498cabce6a859300834d2f02df0 Author: skyanth <skyanth@gmail.com> Date: Wed Apr 4 09:47:55 2018 +0200 moving TitleCase function to top level sheet commit 4d4d1be9167217c6b4bc6b8e976842d04dc4403a Author: skyanth <skyanth@gmail.com> Date: Wed Apr 4 09:46:34 2018 +0200 adding client reference commit 81df9ce41b7b627723266cd4c552565c03339a96 Author: skyanth <skyanth@gmail.com> Date: Thu Mar 29 16:52:39 2018 +0200 fixing exec summary variable name commit f8bf71ed627e61a1f6b04c4a92b1fa0f8a4ebcac Author: skyanth <skyanth@gmail.com> Date: Thu Mar 29 16:51:43 2018 +0200 proper styling and counting for waiver title commit 91d83bc05711c198ad8f283e4ec534d673f23a2c Merge: 4a668bf6788dc9Author: skyanth <skyanth@gmail.com> Date: Wed Mar 28 16:46:55 2018 +0200 Merge branch 'master' into xslt-new-layout # Conflicts: # chatops/python/gitlab-to-pentext.py # chatops/python/pentext_id.py # chatops/python/validate_report.py # xml/xslt/auto.xslt # xml/xslt/findings.xslt # xml/xslt/generate_offerte.xsl # xml/xslt/generate_report.xsl # xml/xslt/meta.xslt # xml/xslt/numbering.xslt # xml/xslt/placeholders.xslt # xml/xslt/structure.xslt # xml/xslt/styles.xslt # xml/xslt/styles_rep.xslt # xml/xslt/toc.xslt commit b02d5d1b0cceaa3d1c01eef10ac3d5f2a9ff774a Author: skyanth <skyanth@gmail.com> Date: Wed Mar 28 16:20:29 2018 +0200 new quote layout commit e3fad41e562a38ce2d04efa167fdd0285cfcd9d1 Author: skyanth <skyanth@gmail.com> Date: Tue Mar 27 15:29:42 2018 +0200 renamed prependNumber to prependId commit 20754df335f40b3c8dbb3bf424e811a8de771adb Author: skyanth <skyanth@gmail.com> Date: Tue Mar 27 15:29:24 2018 +0200 Better finding meta box styling commit 2caa84f449b26394df2e048eb580e1aa109b851f Author: skyanth <skyanth@gmail.com> Date: Tue Mar 27 15:28:54 2018 +0200 Better number-title separation commit 2d9cc06ac89a496247e2aad93ee75fb3af770bfd Author: skyanth <skyanth@gmail.com> Date: Tue Mar 27 15:27:55 2018 +0200 Better pie chart colors for @threatLevel commit c28b8a6028260b132959812ce1741371e32ad809 Author: skyanth <skyanth@gmail.com> Date: Tue Mar 27 15:27:38 2018 +0200 add a class; set proper accepted values for @includepage commit 4dd60886f89bbe9152fde5c513090a976270e48c Author: skyanth <skyanth@gmail.com> Date: Wed Nov 15 14:32:48 2017 +0100 finalizing report style commit 19f093eca0588505171a0002ca6b7737836da9ae Author: skyanth <skyanth@gmail.com> Date: Fri Oct 27 14:37:15 2017 +0200 adapting to new layout commit 02fe3ec374017e9f191603672fbb7aae4846e918 Author: skyanth <skyanth@gmail.com> Date: Wed Oct 25 13:58:48 2017 +0200 Fixes after bringing up to date with master commit 87514c44361d0d976c1ddfdc3022cfd07fb36afc Author: skyanth <skyanth@gmail.com> Date: Tue Oct 24 15:16:22 2017 +0200 Squashed commit of the following: commited989f339bMerge:56b6c3b6ff1465Author: Patricia Piolon <skyanth@users.noreply.github.com> Date: Tue Oct 24 14:13:48 2017 +0200 Merge pull request #51 from radicallyopensecurity/no-whitespace-after-recomm-table-list No whitespace after recomm table list commit57942940f8Author: skyanth <skyanth@gmail.com> Date: Tue Oct 24 14:12:04 2017 +0200 no more large whitespace after ol in recommendation table commit81a107f346Author: skyanth <skyanth@gmail.com> Date: Tue Oct 24 14:10:35 2017 +0200 no more large whitespace after ul in recommendation table commit788795e8f4Author: Peter Mosmans <support@go-forward.net> Date: Mon Oct 16 13:16:41 2017 +1000 Display unique finding code as well commit39cca0c5bfAuthor: skyanth <skyanth@gmail.com> Date: Wed Oct 11 11:07:34 2017 +0200 minor xml fixes commit773f155402Author: Marcus Bointon <marcus@synchromedia.co.uk> Date: Tue Oct 10 11:32:02 2017 +0200 Code audit tweaks commit1cd43543e0Author: Marcus Bointon <marcus@synchromedia.co.uk> Date: Thu Oct 5 15:37:37 2017 +0200 Scheduling commit26f4883c37Author: Marcus Bointon <marcus@synchromedia.co.uk> Date: Thu Oct 5 14:18:13 2017 +0200 Planning tweaks commit094199370eAuthor: Marcus Bointon <marcus@synchromedia.co.uk> Date: Thu Oct 5 14:18:00 2017 +0200 Grey box tweaks commit04de7a90f8Author: Marcus Bointon <marcus@synchromedia.co.uk> Date: Mon Feb 27 17:20:12 2017 +0100 Formatting cleanup (cherry picked from commit53ff916) commite73ed1be19Author: skyanth <skyanth@gmail.com> Date: Wed Aug 30 10:45:10 2017 +0200 still better p&p snippets commitc64e536a70Author: skyanth <skyanth@gmail.com> Date: Wed Aug 30 10:25:00 2017 +0200 Updated p&p snippet to use new planning placeholders commit660de99029Author: Peter Mosmans <support@go-forward.net> Date: Sun Aug 20 19:37:37 2017 -0700 Clean up code somewhat Some spelling / imperative fixes. commitb981f99dadAuthor: Peter Mosmans <support@go-forward.net> Date: Sun Aug 20 19:27:20 2017 -0700 Ignore local file structure when querying projects commite6d6f082e4Author: Peter Mosmans <support@go-forward.net> Date: Sun Aug 20 19:26:46 2017 -0700 Re-include helper function to capitalize sentences commit60ff680e3cAuthor: Peter Mosmans <support@go-forward.net> Date: Sun Aug 20 19:08:09 2017 -0700 Add content of all includes for spell checking commitf3f1c2729eAuthor: Patricia Piolon <skyanth@users.noreply.github.com> Date: Fri Aug 18 11:29:19 2017 +0200 Added new planning element info to release notes commit1ff5806eddAuthor: skyanth <skyanth@gmail.com> Date: Tue Aug 15 11:30:57 2017 +0200 offerte ‘fee’ element now deals gracefully with non-numbers commite0c6f0d25bAuthor: skyanth <skyanth@gmail.com> Date: Tue Aug 1 11:32:21 2017 +0200 Added client_postal_code placeholder commit63ff61a942Merge:951cd74184269fAuthor: Patricia Piolon <skyanth@users.noreply.github.com> Date: Tue Jul 25 15:45:10 2017 +0200 Merge pull request #45 from radicallyopensecurity/placeholders-in-summarytables placeholders can now be used in summary tables commita5a14f7413Author: skyanth <skyanth@gmail.com> Date: Tue Jul 25 15:43:12 2017 +0200 placeholders can now be used in summary tables commit802ce0a978Merge:f649847645ef7eAuthor: Patricia Piolon <skyanth@users.noreply.github.com> Date: Tue Jul 25 11:23:56 2017 +0200 Merge pull request #41 from DeforaNetworks/khorben/findings2csv Import findings2csv.xsl commit449e5b5be8Author: skyanth <skyanth@gmail.com> Date: Tue Jul 25 11:10:24 2017 +0200 Updated phone number commitd5de885821Merge:6529219e0ea42fAuthor: Patricia Piolon <skyanth@users.noreply.github.com> Date: Tue Jul 25 11:06:49 2017 +0200 Merge pull request #44 from radicallyopensecurity/contact-info-update updated contact info commit418408a922Author: skyanth <skyanth@gmail.com> Date: Tue Jul 25 11:01:05 2017 +0200 updated contact info, switched to single point of truth for company contact info commitd1a44bda5aMerge:4f9fe9c6412935Author: Patricia Piolon <skyanth@users.noreply.github.com> Date: Mon Jul 24 14:44:57 2017 +0200 Merge pull request #43 from radicallyopensecurity/date-formatting Fixed date formatting commit04ee23b791Author: skyanth <skyanth@gmail.com> Date: Mon Jul 24 14:44:08 2017 +0200 Fixed date formatting commitff94346e3fMerge:d1785ffb1f85bfAuthor: Patricia Piolon <skyanth@users.noreply.github.com> Date: Wed Jul 5 14:23:41 2017 +0200 Merge pull request #42 from radicallyopensecurity/better-planning-data Better planning data commitfc6d844632Author: skyanth <skyanth@gmail.com> Date: Wed Jul 5 14:21:00 2017 +0200 removing some files that shouldn’t have been pushed commite9565b849cAuthor: skyanth <skyanth@gmail.com> Date: Wed Jul 5 14:17:03 2017 +0200 improved planning data in documents commit161199c1e2Author: skyanth <skyanth@gmail.com> Date: Wed Jul 5 13:54:04 2017 +0200 merged activity_info and activityinfo, added planning dates commitf1817e4227Author: skyanth <skyanth@gmail.com> Date: Wed Jul 5 13:52:10 2017 +0200 Removed ‘disregard-shifts’ from Pie chart font commit5982f9fffbAuthor: Pierre Pronchery <khorben@defora.org> Date: Tue Jul 4 18:22:47 2017 +0200 Import findings2csv.xsl This stylesheet outputs the findings from a report as CSV data. It should be useful already but: - it assumes the finding IDs are in sequential order; - the description is currently expected as a single paragraph (<p>) - recommendations are expected as a single paragraph, an unordered list (<ul><li>...), or fallback to whatever else. commit9d1002ec6dMerge:9d4dc9866907dcAuthor: Peter Mosmans <support@go-forward.net> Date: Tue Jul 4 09:19:59 2017 +1000 Merge pull request #40 from radicallyopensecurity/execsummaryfix Exec summary fix commit1ad231ad68Author: skyanth <skyanth@gmail.com> Date: Mon Jul 3 15:45:31 2017 +0200 deprecating summary.xsl(t) commit8db28b9879Author: skyanth <skyanth@gmail.com> Date: Mon Jul 3 15:28:53 2017 +0200 exec summary switch no longer prevents other docs from being generated commit7855364835Author: skyanth <skyanth@gmail.com> Date: Mon Jul 3 15:21:06 2017 +0200 changed fop.conf back to fop.xconf Sorry for the confusion… :/ commit172bcfa810Author: skyanth <skyanth@gmail.com> Date: Mon Jul 3 15:16:42 2017 +0200 execsummary option for report build command fixed commit7e168f8809Author: skyanth <skyanth@gmail.com> Date: Mon Jul 3 15:14:39 2017 +0200 Fixed exec summary commitb29bcf81e4Author: skyanth <skyanth@gmail.com> Date: Mon Jul 3 15:11:20 2017 +0200 Revert "Exec summary switch now generates report as well as executive summary (and not just the summary)" This reverts commitef1ff0542c. commitef1ff0542cAuthor: skyanth <skyanth@gmail.com> Date: Mon Jul 3 15:10:56 2017 +0200 Exec summary switch now generates report as well as executive summary (and not just the summary) commitde857873d3Merge:c89177896e0c6bAuthor: Peter Mosmans <support@go-forward.net> Date: Mon Jul 3 20:45:27 2017 +1000 Merge pull request #38 from radicallyopensecurity/normalize-filename Filter backtick from filename, closes #37 commit244f970441Author: Peter Mosmans <support@go-forward.net> Date: Mon Jul 3 20:44:25 2017 +1000 Filter backtick from filename, closes #37 commitdd97bdeb47Merge:d6dd53615ba585Author: skyanth <skyanth@gmail.com> Date: Thu Jun 29 11:08:54 2017 +0200 Merge branch 'master' of https://github.com/radicallyopensecurity/pentext commit319516ecc9Author: skyanth <skyanth@gmail.com> Date: Thu Jun 29 11:05:29 2017 +0200 Corrected order of ‘Elevated’ and ‘Moderate’ risk in comments commit67c3d16efbMerge:efc76b987176f9Author: Peter Mosmans <support@go-forward.net> Date: Sat Jun 24 11:50:41 2017 +1000 Merge pull request #36 from radicallyopensecurity/change-spelling-backend Change spelling back end to use pyenchant commit541f5b048eAuthor: Peter Mosmans <support@go-forward.net> Date: Sat Jun 24 11:44:10 2017 +1000 Change spelling back end to use pyenchant Pyenchant is a more abstract spelling back end, and can utilize aspell, as well as hunspell. Use titlecase module to validate whether titles are properly title cased. Note that this change uses two new Python libraries, which should be installed: - pyenchant - titlecase commit580af35500Author: skyanth <skyanth@gmail.com> Date: Fri Jun 23 08:55:43 2017 +0200 Improvement to placeholder error info & readability commitee9de74f89Merge:f4cf9cd4cd206dAuthor: Patricia Piolon <skyanth@users.noreply.github.com> Date: Thu Jun 22 17:03:16 2017 +0200 Merge pull request #35 from radicallyopensecurity/improved-placeholder-errors improved placeholder errors commit92b0707cb6Author: skyanth <skyanth@gmail.com> Date: Thu Jun 22 17:01:49 2017 +0200 improved placeholder errors commit452e58b9beMerge:bd85c798bcc3a1Author: Patricia Piolon <skyanth@users.noreply.github.com> Date: Mon Jun 19 17:33:17 2017 +0200 Merge pull request #34 from radicallyopensecurity/nonfinding-ids Implemented non-finding IDs commit8da8bb360fAuthor: skyanth <skyanth@gmail.com> Date: Mon Jun 19 17:31:25 2017 +0200 Implemented non-finding IDs commit70f27d302cMerge:1918cdf9e9ab57Author: Peter Mosmans <support@go-forward.net> Date: Tue Jun 13 16:50:23 2017 +1000 Merge pull request #33 from radicallyopensecurity/script-improvement Support --force flag for 'new' PenText repositories commita0a47ba228Author: Peter Mosmans <support@go-forward.net> Date: Tue Jun 13 16:46:59 2017 +1000 Support --force flag for 'new' PenText repositories The --force flag allows repositories not containing the PenText repository to 'update' to the latest version of PenText. commit347476b339Author: skyanth <skyanth@gmail.com> Date: Mon Jun 12 15:55:15 2017 +0200 Updated examplereport.xml so it’s valid again commit724dd4382bAuthor: skyanth <skyanth@gmail.com> Date: Mon Jun 12 13:51:49 2017 +0200 Custom invoice total now calculated correctly commitf61c670908Author: skyanth <skyanth@gmail.com> Date: Mon Jun 12 13:43:11 2017 +0200 Fixed date formatting for custom invoice commit6fa4968b9dAuthor: skyanth <skyanth@gmail.com> Date: Mon Jun 12 13:27:20 2017 +0200 Example QS is valid again commit8f0dbf9ddeAuthor: skyanth <skyanth@gmail.com> Date: Fri Jun 9 16:43:54 2017 +0200 deleted test report commitc03d5e7d31Author: skyanth <skyanth@gmail.com> Date: Fri Jun 9 16:43:17 2017 +0200 implemented Incident Response Management template commitae017d6638Author: skyanth <skyanth@gmail.com> Date: Fri Jun 9 10:35:35 2017 +0200 Updated testing procedure doc commitb818ed9959Merge:2eddc7e8ed7308Author: skyanth <skyanth@gmail.com> Date: Fri Jun 9 10:09:44 2017 +0200 Merge branch 'master' of https://github.com/radicallyopensecurity/pentext commit7a8e229d7eAuthor: skyanth <skyanth@gmail.com> Date: Fri Jun 9 10:09:33 2017 +0200 Added some rate card documentation commitdefcfb27b0Author: Patricia Piolon <skyanth@users.noreply.github.com> Date: Thu Jun 8 16:06:14 2017 +0200 smiling verboten commitf4a42f1de7Author: Patricia Piolon <skyanth@users.noreply.github.com> Date: Thu Jun 8 16:03:49 2017 +0200 typo commit61d58b1b68Author: skyanth <skyanth@gmail.com> Date: Thu Jun 8 16:01:05 2017 +0200 Pie chart colours, status prettification commitb5b8d8ac95Author: skyanth <skyanth@gmail.com> Date: Thu Jun 8 09:28:01 2017 +0200 Colour coding for retest statuses commit4c2db372d7Merge:bbb22f3ecec4deAuthor: skyanth <skyanth@gmail.com> Date: Wed Jun 7 17:13:43 2017 +0200 Merge branch 'master' of https://github.com/radicallyopensecurity/pentext commit8575059c98Author: skyanth <skyanth@gmail.com> Date: Wed Jun 7 17:13:28 2017 +0200 Finetuned some retest features commit9a838f0408Author: Patricia Piolon <skyanth@users.noreply.github.com> Date: Wed Jun 7 14:30:49 2017 +0200 Update RELEASE_NOTES.md commitcc476939b1Author: skyanth <skyanth@gmail.com> Date: Wed Jun 7 14:29:24 2017 +0200 Moved comment about inserting non-findings to correct place commitf15a3979e0Merge:2917d8a4f5ee75Author: Peter Mosmans <support@go-forward.net> Date: Wed Jun 7 19:45:58 2017 +1000 Merge pull request #31 from radicallyopensecurity/bugfix Catch gitlab exception properly commit0857e0f1e1Author: Peter Mosmans <support@go-forward.net> Date: Wed Jun 7 19:44:24 2017 +1000 Catch gitlab exception properly commit6cd3ccbdbfMerge:28f486dc065e57Author: Peter Mosmans <support@go-forward.net> Date: Mon May 29 12:15:31 2017 +1000 Merge pull request #30 from radicallyopensecurity/identifier Add pentext_id for conversion between report - filename identifiers commit65d356a108Author: Peter Mosmans <support@go-forward.net> Date: Mon May 29 12:12:21 2017 +1000 Add pentext_id for conversion between report - filename identifiers commit9d8cb3754aAuthor: skyanth <skyanth@gmail.com> Date: Wed May 17 10:53:11 2017 +0200 Renamed pentestinfo to activityinfo commit3f7f0c839bAuthor: skyanth <skyanth@gmail.com> Date: Mon May 15 11:26:37 2017 +0200 changed pentest_info element to activity_info commit48491e97d8Merge:ccef9224b564a5Author: skyanth <skyanth@gmail.com> Date: Mon May 15 10:25:52 2017 +0200 Merge branch 'master' of https://github.com/radicallyopensecurity/pentext commitd4ed82bdd3Author: skyanth <skyanth@gmail.com> Date: Mon May 15 10:25:41 2017 +0200 Changed ‘manday’ to ‘personday’ commit4b4b1c8196Merge:7a3a39b5d5026aAuthor: Patricia Piolon <skyanth@users.noreply.github.com> Date: Mon May 15 09:40:41 2017 +0200 Merge pull request #28 from radicallyopensecurity/catch-exception Make embedding git commit hash in the document an option (--tag) commitb753ce8d82Merge:ddf2bafcc5f0acAuthor: Patricia Piolon <skyanth@users.noreply.github.com> Date: Mon May 15 09:39:56 2017 +0200 Merge pull request #29 from radicallyopensecurity/change-default-fop Change default FOP configuration file: /etc/docbuilder/fop.xconf commit51e901ed9aAuthor: Peter Mosmans <support@go-forward.net> Date: Wed May 10 19:40:43 2017 +1000 Change default FOP configuration file: /etc/docbuilder/fop.xconf commitbdbe448a9dAuthor: Peter Mosmans <support@go-forward.net> Date: Wed May 10 18:50:04 2017 +1000 Make embedding git commit hash in the document an option (--tag) Add exception handlers around git usage. commit5a7d752871Merge:346e6f8262566eAuthor: Patricia Piolon <skyanth@users.noreply.github.com> Date: Mon May 1 14:16:00 2017 +0200 Merge pull request #27 from PeterMosmans/non-findings Implemented correct conversion for non-findings, closes #26 commitc1eae6905dMerge:004bacb2c73209Author: Marcus Bointon <marcus@synchromedia.co.uk> Date: Thu Apr 13 11:26:29 2017 +0200 Merge remote-tracking branch 'origin/master' # Conflicts: # xml/RELEASE_NOTES.md # xml/source/client_info.xml # xml/source/snippets/company_info.xml # xml/source/snippets/offerte/en/conditions.xml # xml/source/snippets/offerte/en/crystal-box.xml # xml/source/snippets/offerte/en/disclaimer.xml # xml/source/snippets/offerte/en/disclaimer_code-audit.xml # xml/source/snippets/offerte/en/examplewaiver.xml # xml/source/snippets/offerte/en/grey-box.xml # xml/source/snippets/offerte/en/introandscope.xml # xml/source/snippets/offerte/en/introandscope_retest.xml # xml/source/snippets/offerte/en/methodology_code-audit.xml # xml/source/snippets/offerte/en/prerequisites_training.xml # xml/source/snippets/offerte/en/projectoverview.xml # xml/source/snippets/offerte/en/projectoverview_retest.xml # xml/source/snippets/offerte/en/projectoverview_training.xml # xml/source/snippets/offerte/en/teamandreporting.xml # xml/xslt/auto.xslt commit30140c5bddAuthor: Marcus Bointon <marcus@synchromedia.co.uk> Date: Thu Apr 13 11:25:12 2017 +0200 Update snippets when building a new doc commitc346872da0Author: skyanth <skyanth@gmail.com> Date: Wed Mar 29 11:40:42 2017 +0200 implemented finding count placeholder (cont.) commit40f1ecfb06Author: skyanth <skyanth@gmail.com> Date: Wed Mar 29 11:40:12 2017 +0200 implemented finding count placeholder commit3f1efca457Author: skyanth <skyanth@gmail.com> Date: Wed Mar 29 11:31:12 2017 +0200 allowed <code> in <pre> (oops) commitd6c998b797Author: melanierieback <melanie@radicallyopensecurity.com> Date: Tue Mar 28 13:41:27 2017 +0000 Update README.md commitce5fa5778dAuthor: melanierieback <melanie@radicallyopensecurity.com> Date: Tue Mar 28 13:40:48 2017 +0000 Update README.md commit754d5be3e4Author: melanierieback <melanie@radicallyopensecurity.com> Date: Tue Mar 28 13:40:16 2017 +0000 Update README.md commitae45256dffAuthor: melanierieback <melanie@radicallyopensecurity.com> Date: Tue Mar 28 13:38:54 2017 +0000 Update README.md commitdef0931641Author: Peter Mosmans <support@go-forward.net> Date: Fri Mar 24 20:43:33 2017 +0800 Implemented correct conversion for non-findings, closes #26 commite0f25250f8Author: Marcus Bointon <marcus@synchromedia.co.uk> Date: Mon Feb 27 17:20:12 2017 +0100 Formatting cleanup commit1cba757095Author: skyanth <skyanth@gmail.com> Date: Thu Jan 12 11:58:28 2017 +0100 Implemented pie charts commit22e55a0b81Author: skyanth <skyanth@gmail.com> Date: Tue Dec 6 16:04:12 2016 +0100 Added training quote title to strings commit958b6ecb87Author: Marcus Bointon <marcus@synchromedia.co.uk> Date: Tue Dec 6 15:43:34 2016 +0100 Add training offerte subtype commit9f3d2f511dAuthor: Marcus Bointon <marcus@synchromedia.co.uk> Date: Tue Dec 6 15:43:08 2016 +0100 Snippet & document cleanup commit a17f738de4cbfac3af8b1a9c169e0a11d664b7cc Author: skyanth <skyanth@gmail.com> Date: Thu Mar 30 10:51:04 2017 +0200 Finished new report layout code commit 7adcb4be2cde1441914ca1993ae6652483667332 Author: skyanth <skyanth@gmail.com> Date: Wed Mar 29 11:12:00 2017 +0200 some work on title pages, footers, new page sequence masters commit bf283c19487b5fab6bf08828e5424a71a5bb206e Author: skyanth <skyanth@gmail.com> Date: Fri Mar 24 15:26:09 2017 +0100 New tab, header, footer, toc, titles, tables, codeblocks
@@ -6,6 +6,7 @@
|
||||
xsi:noNamespaceSchemaLocation="../dtd/offerte.xsd"
|
||||
xml:lang="en"><!--document meta information; to be filled in by the offerte writer-->
|
||||
<meta>
|
||||
<title>quote</title>
|
||||
<offered_service_long>penetration testing services</offered_service_long>
|
||||
<!--if there is a shorter way of saying the same thing, you can type it here (it makes for more dynamic offerte text). If not, just repeat the long name.-->
|
||||
<offered_service_short>penetration test</offered_service_short>
|
||||
@@ -23,6 +24,7 @@
|
||||
<!--short party name; if no short name: same as long name-->
|
||||
<waiver_rep>Hotshot Dev Lawyer</waiver_rep>
|
||||
<address>Silicon Valley St. 50</address>
|
||||
<postal_code>10000</postal_code>
|
||||
<city>San Francisco</city>
|
||||
<country>US</country>
|
||||
</party>
|
||||
@@ -30,15 +32,17 @@
|
||||
<activityinfo>
|
||||
<duration>10</duration>
|
||||
<!--duration of pentest, in working days-->
|
||||
<test_planning>August 1st, 2016, lasting until August 13th, 2016</test_planning>
|
||||
<persondays>20</persondays>
|
||||
<planning>
|
||||
<start>2018-01-01</start>
|
||||
<end>2018-02-02</end>
|
||||
</planning>
|
||||
<!--date or date range in text, e.g. May 18th until May 25th, 2015-->
|
||||
<report_writing>August 26th, 2016</report_writing>
|
||||
<!--date or date range in text, e.g. May 18th until May 25th, 2015-->
|
||||
<report_due>August 26th, 2016</report_due>
|
||||
<report_due>2018-03-03</report_due>
|
||||
<nature>time-boxed</nature>
|
||||
<type>crystal-box</type>
|
||||
<!--please choose one of the following: black-box, grey-box, crystal-box-->
|
||||
<fee denomination="euro">1000000</fee>
|
||||
<fee denomination="eur">1000000</fee>
|
||||
<!--(euro|dollar)-->
|
||||
<target_application>FishInABarrel</target_application>
|
||||
<!--name of application/service to be tested (if any; if none, DELETE target_application element)-->
|
||||
@@ -62,7 +66,6 @@
|
||||
<xi:include href="snippets/offerte/en/disclaimer.xml"/>
|
||||
<!--Methodology section-->
|
||||
<xi:include href="snippets/offerte/en/methodology.xml"/>
|
||||
<xi:include href="snippets/offerte/en/codeauditmethodology.xml"/>
|
||||
<xi:include href="snippets/offerte/en/teamandreporting.xml"/>
|
||||
<!--Planning and payment section-->
|
||||
<xi:include href="snippets/offerte/en/planningandpayment.xml"/>
|
||||
|
||||
@@ -10,7 +10,10 @@
|
||||
<activityinfo>
|
||||
<duration>4</duration>
|
||||
<persondays>4</persondays>
|
||||
<test_planning>bla</test_planning>
|
||||
<planning>
|
||||
<start>TBD</start>
|
||||
<end>TBD</end>
|
||||
</planning>
|
||||
<report_due>bla</report_due>
|
||||
<nature>something</nature>
|
||||
<type>black-box</type>
|
||||
@@ -230,111 +233,104 @@ Raw packets sent: 1681 (73.962KB) | Rcvd: 1681 (77.322KB)</pre>
|
||||
</section>
|
||||
|
||||
</section>
|
||||
<section id="techSummary">
|
||||
<title>Pentest Technical Summary</title>
|
||||
<section id="findings">
|
||||
<title>Findings</title>
|
||||
|
||||
<p>We have identified the following issues:</p>
|
||||
<section id="findings">
|
||||
<title>Findings</title>
|
||||
|
||||
<finding id="f1" threatLevel="Moderate" type="Information Leak">
|
||||
<title>PHPInfo Disclosure</title>
|
||||
<description>
|
||||
<p>The phpinfo() function of the PHP language is readable,
|
||||
resulting in a listing of all the runtime
|
||||
information of the environment, thus disclosing
|
||||
potentially valuable information to attackers.</p>
|
||||
</description>
|
||||
<technicaldescription>
|
||||
<p>This is where the good stuff goes. We give a detailed
|
||||
technical description of the problem.</p>
|
||||
<p>Illustrative picture of an evil hacker pondering dark
|
||||
deeds:</p>
|
||||
<img height="10" src="../graphics/screenshot.jpg"/>
|
||||
</technicaldescription>
|
||||
<impact>
|
||||
<p>This is where we explain how the sh*t is hitting the fan,
|
||||
exactly.</p>
|
||||
</impact>
|
||||
<recommendation>
|
||||
<p>Here is where we write some tips to solve the
|
||||
problem.</p>
|
||||
</recommendation>
|
||||
</finding>
|
||||
<p>We have identified the following issues:</p>
|
||||
|
||||
<finding id="f2" threatLevel="High" type="XSS">
|
||||
<title>A terrible XSS issue</title>
|
||||
<description>
|
||||
<p>A general description of the problem.</p>
|
||||
</description>
|
||||
<technicaldescription>
|
||||
<p>This is we go into great detail about the
|
||||
vulnerability.</p>
|
||||
</technicaldescription>
|
||||
<impact>
|
||||
<p>This is where we explain why this vulnerability is a
|
||||
problem.</p>
|
||||
</impact>
|
||||
<recommendation>
|
||||
<p>This is where we solve everything and the sun starts
|
||||
shining again.</p>
|
||||
</recommendation>
|
||||
</finding>
|
||||
<finding id="f1" threatLevel="Moderate" type="Information Leak">
|
||||
<title>PHPInfo Disclosure</title>
|
||||
<description>
|
||||
<p>The phpinfo() function of the PHP language is readable, resulting
|
||||
in a listing of all the runtime information of the
|
||||
environment, thus disclosing potentially valuable
|
||||
information to attackers.</p>
|
||||
</description>
|
||||
<technicaldescription>
|
||||
<p>This is where the good stuff goes. We give a detailed technical
|
||||
description of the problem.</p>
|
||||
<p>Illustrative picture of an evil hacker pondering dark deeds:</p>
|
||||
<img height="10" src="../graphics/screenshot.jpg"/>
|
||||
</technicaldescription>
|
||||
<impact>
|
||||
<p>This is where we explain how the sh*t is hitting the fan,
|
||||
exactly.</p>
|
||||
</impact>
|
||||
<recommendation>
|
||||
<p>Here is where we write some tips to solve the problem.</p>
|
||||
</recommendation>
|
||||
</finding>
|
||||
|
||||
<finding id="f3" threatLevel="Low" type="XSS">
|
||||
<title>A not quite so terrible XSS issue</title>
|
||||
<description>
|
||||
<p>A description of the problem.</p>
|
||||
</description>
|
||||
<technicaldescription>
|
||||
<p>Vulnerability described in detail.</p>
|
||||
</technicaldescription>
|
||||
<impact>
|
||||
<p>Impact on security.</p>
|
||||
</impact>
|
||||
<recommendation>
|
||||
<p>A ready solution.</p>
|
||||
</recommendation>
|
||||
</finding>
|
||||
</section>
|
||||
<finding id="f2" threatLevel="High" type="XSS">
|
||||
<title>A terrible XSS issue</title>
|
||||
<description>
|
||||
<p>A general description of the problem.</p>
|
||||
</description>
|
||||
<technicaldescription>
|
||||
<p>This is we go into great detail about the vulnerability.</p>
|
||||
</technicaldescription>
|
||||
<impact>
|
||||
<p>This is where we explain why this vulnerability is a problem.</p>
|
||||
</impact>
|
||||
<recommendation>
|
||||
<p>This is where we solve everything and the sun starts shining
|
||||
again.</p>
|
||||
</recommendation>
|
||||
</finding>
|
||||
|
||||
<section id="nonFindings">
|
||||
<title>Non-Findings</title>
|
||||
<p>In this section we list some of the things that were tried but turned out
|
||||
to be dead ends.</p>
|
||||
<finding id="f3" threatLevel="Low" type="XSS">
|
||||
<title>A not quite so terrible XSS issue</title>
|
||||
<description>
|
||||
<p>A description of the problem.</p>
|
||||
</description>
|
||||
<technicaldescription>
|
||||
<p>Vulnerability described in detail.</p>
|
||||
</technicaldescription>
|
||||
<impact>
|
||||
<p>Impact on security.</p>
|
||||
</impact>
|
||||
<recommendation>
|
||||
<p>A ready solution.</p>
|
||||
</recommendation>
|
||||
</finding>
|
||||
</section>
|
||||
|
||||
<non-finding id="ftp">
|
||||
<title>FTP</title>
|
||||
<p>The server was running FTPserver ABC, the most recent version of
|
||||
this particular piece of software. Anonymous login was
|
||||
turned off and no relevant vulnerabilities or exploits were
|
||||
found.</p>
|
||||
</non-finding>
|
||||
<non-finding id="mail">
|
||||
<title>Mail Server</title>
|
||||
<p>The server was running Mailserver XYZ, the most recent version of
|
||||
this particular piece of software. No relevant
|
||||
vulnerabilities or exploits were found. </p>
|
||||
</non-finding>
|
||||
<non-finding id="sqlInjection">
|
||||
<title>SQL Code Injection</title>
|
||||
<p>The following parameters are not vulnerable to SQL injection. </p>
|
||||
<p>All parameters have been checked manually.</p>
|
||||
<pre>-file1.php
|
||||
<section id="nonFindings">
|
||||
<title>Non-Findings</title>
|
||||
<p>In this section we list some of the things that were tried but turned out to be
|
||||
dead ends.</p>
|
||||
|
||||
<non-finding id="ftp">
|
||||
<title>FTP</title>
|
||||
<p>The server was running FTPserver ABC, the most recent version of this
|
||||
particular piece of software. Anonymous login was turned off and no
|
||||
relevant vulnerabilities or exploits were found.</p>
|
||||
</non-finding>
|
||||
<non-finding id="mail">
|
||||
<title>Mail Server</title>
|
||||
<p>The server was running Mailserver XYZ, the most recent version of this
|
||||
particular piece of software. No relevant vulnerabilities or
|
||||
exploits were found. </p>
|
||||
</non-finding>
|
||||
<non-finding id="sqlInjection">
|
||||
<title>SQL Code Injection</title>
|
||||
<p>The following parameters are not vulnerable to SQL injection. </p>
|
||||
<p>All parameters have been checked manually.</p>
|
||||
<pre>-file1.php
|
||||
-file2.php
|
||||
-file3.php
|
||||
</pre>
|
||||
</non-finding>
|
||||
<non-finding id="heartbleed">
|
||||
<title>Heartbleed</title>
|
||||
<p>System was not vulnerable to heartbleed.</p>
|
||||
</non-finding>
|
||||
<non-finding id="sp2">
|
||||
<title>Windows XP</title>
|
||||
<p>The host is running Windows XP. As we all know, Windows XP is
|
||||
bulletproof.</p>
|
||||
</non-finding>
|
||||
</section>
|
||||
</non-finding>
|
||||
<non-finding id="heartbleed">
|
||||
<title>Heartbleed</title>
|
||||
<p>System was not vulnerable to heartbleed.</p>
|
||||
</non-finding>
|
||||
<non-finding id="sp2">
|
||||
<title>Windows XP</title>
|
||||
<p>The host is running Windows XP. As we all know, Windows XP is
|
||||
bulletproof.</p>
|
||||
</non-finding>
|
||||
</section>
|
||||
<section id="conclusion">
|
||||
<title>Conclusion</title>
|
||||
|
||||
189
xml/doc/placeholders.md
Normal file
@@ -0,0 +1,189 @@
|
||||
PenText 2.0 Placeholders
|
||||
|
||||
###client_long
|
||||
*Refers to:* /*/meta//client/full_name
|
||||
Client's full name (e.g. Sitting Duck B.V.)
|
||||
|
||||
###client_short
|
||||
*Refers to:* /*/meta//client/short_name
|
||||
Client's shorter name (e.g. Sitting Duck)
|
||||
|
||||
###client_street
|
||||
*Refers to:* /*/meta//client/address
|
||||
Client's street + number
|
||||
|
||||
###client_city
|
||||
*Refers to:* /*/meta//client/city
|
||||
Client's city
|
||||
|
||||
###client_country
|
||||
*Refers to:* /*/meta//client/country
|
||||
Client's country
|
||||
|
||||
###client_postal_code
|
||||
*Refers to:* /*/meta//client/postal_code
|
||||
Client's postal code
|
||||
|
||||
###client_legal_rep
|
||||
*Refers to:* /*/meta//client/legal_rep
|
||||
Name of client's legal representative (to sign quotes)
|
||||
|
||||
###client_waiver_rep
|
||||
*Refers to:* /*/meta//client/waiver_rep
|
||||
Name of client's waiver-signing representative (to sign waiver)
|
||||
|
||||
###client_poc1
|
||||
*Refers to:* /*/meta//client/poc1
|
||||
Name of client's first point of contact when the pentest is underway
|
||||
|
||||
###client_coc
|
||||
*Refers to:* /*/meta//client/coc
|
||||
Client's chamber of commerce number
|
||||
|
||||
###client_ref
|
||||
*Refers to:* /*/meta/client_reference
|
||||
Client's reference number for the project (sometimes they want this to be shown in the quote/report/invoice)
|
||||
|
||||
###client_rate
|
||||
*Refers to:* /*/meta//client/rates/rate[@title = $roleTitle] (rate per role category)
|
||||
|
||||
###company_long
|
||||
*Refers to:* /*/meta/company/full_name
|
||||
Company's full name (e.g. Radically Open Security B.V.)
|
||||
|
||||
###company_short
|
||||
*Refers to:* /*/meta/company/short_name
|
||||
Company's short name (e.g. ROS)
|
||||
|
||||
###company_address
|
||||
*Refers to:* /*/meta/company/address
|
||||
Company's street name & number
|
||||
|
||||
###company_city
|
||||
*Refers to:* /*/meta/company/city
|
||||
Company's city
|
||||
|
||||
###company_postalcode
|
||||
*Refers to:* /*/meta/company/postal_code
|
||||
Company's postal code
|
||||
|
||||
###company_country
|
||||
*Refers to:* /*/meta/company/country
|
||||
Company's country
|
||||
|
||||
###company_svc_long
|
||||
*Refers to:* /*/meta/offered_service_long
|
||||
Long name of service offered (e.g. Pentesting Services)
|
||||
|
||||
###company_svc_short
|
||||
*Refers to:* /*/meta/offered_service_short
|
||||
Short name of service offered (e.g. Pentest)
|
||||
|
||||
###company_legal_rep
|
||||
*Refers to:* /*/meta/company/legal_rep
|
||||
Company's legal representative
|
||||
|
||||
###company_poc1
|
||||
*Refers to:* /*/meta/company/poc1
|
||||
Company's first point of contact during the pentest
|
||||
|
||||
###company_email
|
||||
*Refers to:* /*/meta/company/email
|
||||
Company's email address
|
||||
|
||||
###t_app
|
||||
*Refers to:* /*/meta/activityinfo/target_application
|
||||
Name of the tested application (if any)
|
||||
|
||||
###t_app_producer
|
||||
*Refers to:* /*/meta/activityinfo/target_application_producer
|
||||
Name of the company producing the tested application
|
||||
|
||||
###p_duration
|
||||
*Refers to:* /*/meta/activityinfo/duration
|
||||
Test duration
|
||||
|
||||
###p_persondays
|
||||
*Refers to:* /*/meta/activityinfo/persondays
|
||||
Persondays allotted to test
|
||||
|
||||
###p_boxtype
|
||||
*Refers to:* /*/meta/activityinfo/type
|
||||
Pentest boxtype (crystal, black, ...)
|
||||
|
||||
###p_fee*
|
||||
Refers to:* /offerte/meta/activityinfo/fee"
|
||||
Agreed fee (can be used in QUOTES only!)
|
||||
|
||||
###p_startdate
|
||||
*Refers to:* /*/meta/activityinfo/planning/start
|
||||
Start date of test
|
||||
|
||||
###p_enddate
|
||||
*Refers to:* /*/meta/activityinfo/planning/end
|
||||
End date of test
|
||||
|
||||
###p_reportdue
|
||||
*Refers to:* /*/meta/activityinfo/report_due
|
||||
Due date of pentest report
|
||||
|
||||
###finding_count
|
||||
*Refers to:* total finding count. Use @threatLevel or @status in this placeholder to filter by threatlevel or status. Can be used only in reports!
|
||||
|
||||
###todo
|
||||
Inserts a highly visible 'todo' reminder in snippets (or elsewhere) as a reminder to the editor that info is missing at that point.
|
||||
|
||||
|
||||
## Contract-specific placeholders
|
||||
###engagement_description
|
||||
*Refers to:* /contract/meta/scope/engagement_description
|
||||
###secondpartyrole
|
||||
*Refers to:* /contract/meta/scope/secondpartyrole
|
||||
###contract_start_date
|
||||
*Refers to:* /contract/meta/work/start_date
|
||||
###contract_end_date
|
||||
*Refers to:* /contract/meta/work/end_date
|
||||
###contract_period
|
||||
*Refers to:* difference between /contract/meta/work/start_date and /contract/meta/work/end_date (i.e. a period of time)
|
||||
###contract_total_fee
|
||||
*Refers to:* calculated total fee
|
||||
###contract_planned_hours
|
||||
*Refers to:* /contract/meta/work/planning/hours
|
||||
###contract_period_unit
|
||||
*Refers to:* /contract/meta/work/planning/per
|
||||
###contract_activities
|
||||
*Refers to:* /contract/meta/work/activities/activity (multiple activities possible)
|
||||
###contractor_name_company
|
||||
*Refers to:* /contract/meta/contractor/name (and /contract/meta/contractor/ctcompany, if present)
|
||||
###contractor_name
|
||||
*Refers to:* /contract/meta/contractor/name
|
||||
###contractor_company
|
||||
*Refers to:* /contract/meta/contractor/ctcompany
|
||||
###contractor_address
|
||||
*Refers to:* /contract/meta/contractor/address
|
||||
###contractor_city
|
||||
*Refers to:* /contract/meta/contractor/city
|
||||
###contractor_postalcode
|
||||
*Refers to:* /contract/meta/contractor/postal_code
|
||||
###contractor_country
|
||||
*Refers to:* /contract/meta/contractor/country
|
||||
###contractor_hourly_fee
|
||||
*Refers to:* /contract/meta/contractor/hourly_fee
|
||||
###contractor_email
|
||||
*Refers to:* /contract/meta/contractor/email
|
||||
###contractor_possessive_pronoun
|
||||
*Refers to:* /contract/meta/contractor/@sex (will show as his/her/their depending on sex)
|
||||
###contractor_subject_pronoun
|
||||
*Refers to:* /contract/meta/contractor/@sex (will show as he/she/xe depending on sex)
|
||||
###contractor_object_pronoun
|
||||
*Refers to:* /contract/meta/contractor/@sex (will show as him/her/them depending on sex)
|
||||
###generate_raterevisiondate
|
||||
*Refers to:* //meta//client/rates/@lastrevisiondate
|
||||
|
||||
## Incident Response Quote Specific Placeholders
|
||||
###ir_ora_rate
|
||||
*Refers to:* /*/meta/activityinfo/organizational_readiness_assessment/rate
|
||||
###ir_sim_rate
|
||||
*Refers to:* /*/meta/activityinfo/security_incident_management/rate
|
||||
###ir_taa_rate
|
||||
*Refers to:* /*/meta/activityinfo/technical_artefact_analysis/rate
|
||||
@@ -2,20 +2,21 @@
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" elementFormDefault="qualified"
|
||||
vc:minVersion="1.0" vc:maxVersion="1.1">
|
||||
<xs:import namespace="http://www.w3.org/XML/1998/namespace"
|
||||
<xs:import namespace="http://www.w3.org/XML/1998/namespace"
|
||||
schemaLocation="http://www.w3.org/2001/xml.xsd"/>
|
||||
<xs:import namespace="http://www.w3.org/2001/XInclude"
|
||||
schemaLocation="http://www.w3.org/2001/XInclude/XInclude.xsd"/>
|
||||
|
||||
<!-- company -->
|
||||
|
||||
|
||||
<xs:simpleType name="emailAddress">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value="[^@]+@[^\.]+\..+"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:complexType name="emailAddressType" mixed="true">
|
||||
<xs:choice minOccurs="0" maxOccurs="1">
|
||||
<xs:element name="company_email"/>
|
||||
<xs:element name="client_email"/>
|
||||
<xs:element name="contractor_email"/>
|
||||
</xs:choice>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:element name="email" type="emailAddressType"/>
|
||||
|
||||
<xs:element name="company">
|
||||
<xs:complexType>
|
||||
@@ -37,10 +38,13 @@
|
||||
</xs:element>
|
||||
|
||||
<xs:group name="name-group">
|
||||
<xs:sequence>
|
||||
<xs:element ref="full_name"/>
|
||||
<xs:element ref="short_name"/>
|
||||
</xs:sequence>
|
||||
<xs:choice>
|
||||
<xs:sequence>
|
||||
<xs:element ref="full_name"/>
|
||||
<xs:element ref="short_name"/>
|
||||
</xs:sequence>
|
||||
<xs:group ref="placeholders"/>
|
||||
</xs:choice>
|
||||
</xs:group>
|
||||
<xs:group name="address-group">
|
||||
<xs:sequence>
|
||||
@@ -63,11 +67,15 @@
|
||||
</xs:choice>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="postal_code" type="xs:string"/>
|
||||
<xs:element name="city" type="xs:string"/>
|
||||
<xs:element name="country" type="xs:string"/>
|
||||
<xs:element name="postal_code" type="addresstype"/>
|
||||
<xs:element name="city" type="addresstype"/>
|
||||
<xs:element name="country" type="addresstype"/>
|
||||
<xs:complexType name="addresstype" mixed="true">
|
||||
<xs:choice minOccurs="0" maxOccurs="1">
|
||||
<xs:group ref="placeholders"/>
|
||||
</xs:choice>
|
||||
</xs:complexType>
|
||||
<xs:element name="phone" type="xs:string"/>
|
||||
<xs:element name="email" type="emailAddress"/>
|
||||
<xs:element name="website" type="xs:anyURI"/>
|
||||
<xs:element name="vat_no" type="xs:string"/>
|
||||
<xs:element name="iban" type="xs:string"/>
|
||||
@@ -151,11 +159,11 @@
|
||||
</xs:element>
|
||||
|
||||
<xs:element name="invoice_rep" type="xs:string"/>
|
||||
<xs:element name="invoice_mail" type="emailAddress"/>
|
||||
<xs:element name="invoice_mail" type="xs:string"/>
|
||||
<xs:element name="invoice_extra_field" type="xs:string"/>
|
||||
|
||||
<xs:element name="duration" type="xs:nonNegativeInteger"/>
|
||||
<xs:element name="persondays" type="xs:nonNegativeInteger"/>
|
||||
<xs:element name="duration" type="xs:float"/>
|
||||
<xs:element name="persondays" type="xs:float"/>
|
||||
<xs:element name="planning">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
@@ -191,8 +199,8 @@
|
||||
<xs:union memberTypes="xs:date xs:string"/>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<xs:element name="target_application" type="xs:string"/>
|
||||
<xs:element name="target_application_producer" type="xs:string"/>
|
||||
@@ -206,6 +214,14 @@
|
||||
</xs:choice>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="subtitle">
|
||||
<xs:complexType mixed="true">
|
||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:group ref="placeholders"/>
|
||||
<xs:group ref="inline-all"/>
|
||||
</xs:choice>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="br">
|
||||
<xs:complexType/>
|
||||
</xs:element>
|
||||
@@ -216,6 +232,7 @@
|
||||
</xs:sequence>
|
||||
<xs:attribute name="border" use="optional" type="xs:integer"/>
|
||||
<xs:attribute name="cols" use="optional" type="xs:string"/>
|
||||
<xs:attribute name="width" use="optional" type="xs:string"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="tr">
|
||||
@@ -299,6 +316,8 @@
|
||||
|
||||
<xs:attribute name="class" type="xs:string"/>
|
||||
|
||||
<xs:element name="client_reference" type="xs:string"/>
|
||||
|
||||
<xs:element name="version_history">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
@@ -361,12 +380,12 @@
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="xs:string">
|
||||
<xs:attribute name="href" use="required" type="xs:anyURI"/>
|
||||
<xs:attribute name="class" use="optional" type="xs:string"/>
|
||||
<xs:attribute name="includepage" use="optional">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="black-box"/>
|
||||
<xs:enumeration value="crystal-box"/>
|
||||
<xs:enumeration value="grey-box"/>
|
||||
<xs:enumeration value="yes"/>
|
||||
<xs:enumeration value="no"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:attribute>
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
<xs:sequence>
|
||||
<xs:element ref="company"/>
|
||||
<xs:element ref="client"/>
|
||||
<xs:element ref="client_reference" minOccurs="0"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element ref="title"/>
|
||||
<xs:element ref="subtitle" minOccurs="0"/>
|
||||
<xs:element ref="client_reference" minOccurs="0"/>
|
||||
<xs:element ref="offered_service_long"/>
|
||||
<xs:element ref="offered_service_short"/>
|
||||
<xs:element ref="company"/>
|
||||
@@ -145,6 +147,7 @@
|
||||
</xs:sequence>
|
||||
<xs:attribute ref="xml:base"/>
|
||||
<xs:attribute ref="xml:lang"/>
|
||||
<xs:attribute name="annex_number" type="xs:integer"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
@@ -236,11 +239,17 @@
|
||||
<xs:element name="client_legal_rep"/>
|
||||
<xs:element name="client_waiver_rep"/>
|
||||
<xs:element name="client_poc1"/>
|
||||
<xs:element name="client_ref"/>
|
||||
<xs:element name="company_long"/>
|
||||
<xs:element name="company_short"/>
|
||||
<xs:element name="company_svc_long"/>
|
||||
<xs:element name="company_svc_short"/>
|
||||
<xs:element name="company_legal_rep"/>
|
||||
<xs:element name="company_address"/>
|
||||
<xs:element name="company_postalcode"/>
|
||||
<xs:element name="company_city"/>
|
||||
<xs:element name="company_country"/>
|
||||
<xs:element name="company_coc"/>
|
||||
<xs:element name="company_poc1"/>
|
||||
<xs:element name="t_app"/>
|
||||
<xs:element name="t_app_producer"/>
|
||||
@@ -250,6 +259,8 @@
|
||||
<xs:element name="p_fee"/>
|
||||
<xs:element name="p_testingduration"/>
|
||||
<xs:element name="p_reportdue"/>
|
||||
<xs:element name="p_startdate"/>
|
||||
<xs:element name="p_enddate"/>
|
||||
<xs:element name="signee_long"/>
|
||||
<xs:element name="signee_short"/>
|
||||
<xs:element name="signee_street"/>
|
||||
@@ -261,6 +272,7 @@
|
||||
<xs:element name="ir_ora_rate"/>
|
||||
<xs:element name="ir_sim_rate"/>
|
||||
<xs:element name="ir_taa_rate"/>
|
||||
<xs:element name="todo"/>
|
||||
</xs:choice>
|
||||
</xs:group>
|
||||
|
||||
|
||||
@@ -32,7 +32,9 @@
|
||||
<xs:element name="meta">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element ref="title"/>
|
||||
<xs:element ref="title" minOccurs="1"/>
|
||||
<xs:element ref="subtitle" minOccurs="0"/>
|
||||
<xs:element ref="client_reference" minOccurs="0"/>
|
||||
<xs:element ref="targets"/>
|
||||
<xs:element ref="activityinfo" minOccurs="0"/>
|
||||
<xs:element ref="permission_parties"/>
|
||||
@@ -377,9 +379,15 @@
|
||||
<xs:element name="client_city"/>
|
||||
<xs:element name="client_postal_code"/>
|
||||
<xs:element name="client_country"/>
|
||||
<xs:element name="client_ref"/>
|
||||
<xs:element name="company_long"/>
|
||||
<xs:element name="company_short"/>
|
||||
<xs:element name="company_svc_long"/>
|
||||
<xs:element name="company_address"/>
|
||||
<xs:element name="company_postalcode"/>
|
||||
<xs:element name="company_city"/>
|
||||
<xs:element name="company_country"/>
|
||||
<xs:element name="company_coc"/>
|
||||
<xs:element name="t_app"/>
|
||||
<xs:element name="t_app_producer"/>
|
||||
<xs:element name="p_duration"/>
|
||||
@@ -394,6 +402,7 @@
|
||||
<xs:attribute ref="threatLevel" use="optional"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="todo"/>
|
||||
</xs:choice>
|
||||
|
||||
</xs:group>
|
||||
|
||||
BIN
xml/graphics/frontpage_quote.jpg
Normal file
|
After Width: | Height: | Size: 235 KiB |
BIN
xml/graphics/frontpage_report.jpg
Normal file
|
After Width: | Height: | Size: 187 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 6.6 KiB |
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" stroke-miterlimit="1.4142" viewBox="0 0 3508 2481" clip-rule="evenodd" stroke-linejoin="round"><path fill="#E96117" d="M1753.94 432.631c195.1 0 353.5 158.398 353.5 353.5s-158.4 353.499-353.5 353.499-353.5-158.397-353.5-353.499c0-195.102 158.4-353.5 353.5-353.5zm22.47 138.821c19.03-14.946 40.35-18.905 63.45-14.085-.48 4.944 3.34 8.125 6.94 10.166 11.19 6.349 16.82 15.901 19.2 28.168.47 2.436 3.2 4.68 5.33 6.486 1.94 1.642 4.54 2.497 6.76 3.847 3.91 2.391 3.37 5.873.19 7.589-6.05 3.285-3.89 8.96-4.02 13.263-.13 4.501 2.81 9.034 3.99 13.653.56 2.199.67 4.77.12 6.958-1.49 5.94-1.03 7.02 4.74 8.151 14.53 2.84 28.61 7.486 40.09 16.768 10.31 8.325 16.03 20.059 17.31 33.644.54 5.754 1.14 11.621 2.74 17.15 4.95 17.196 10.54 34.212 15.6 51.38 3.81 12.926 7.05 26.022 10.79 38.97 3.38 11.712 2.84 23.356.5 35.129-2.11 10.637-4.26 21.291-5.69 32.029-.82 6.132-.02 12.46-.31 18.681-.6 12.73-3.63 24.475-11.84 34.91-3.39 4.32-4.84 10.496-6.18 16.065-7.7 31.883-21.3 61.086-39.85 87.986-12.14 17.6-24.28 35.24-37.35 52.15-5.92 7.66-14.07 13.87-25.03 12.48-3.41-.43-7.13-1.52-9.89-3.47-13.02-9.19-27.08-15.55-42.66-19.38-11.01-2.72-21.3-8.19-32.17-11.63-20.85-6.6-41.67-13.58-62.94-18.5-10.72-2.48-22.45-1.52-33.63-.79-13.68.9-27.06 4.1-39.68 9.72-5.62 2.51-10.91 5.73-16.51 8.28-10 4.57-20.06 9.04-30.24 13.18-3.55 1.43-6.16-.17-6.47-4.41-.08-1.09-.15-2.89-.71-3.11-5.9-2.27-1.44-8.21-4.22-11.49 1.59-1.24 3.06-2.72 4.82-3.63 1.58-.83 3.49-1.03 6.36-1.8-3.35-1.48-5.27-2.32-7.19-3.16 1.72-3.61 2.97-7.54 5.23-10.76 9.71-13.8 25.16-18.08 39.86-23.7 5.18-1.97 10.08-4.79 14.82-7.68 6.51-3.95 12.54-9.16 20.92-7.15 2.64.63 5.4 1.76 7.48 3.45 10.12 8.19 21.19 11.29 34.08 8.06 7.55-1.89 15.33-2.88 23.01-4.28l.12-2.04c-18.29-6.72-35.08-17.314-55-19.873-5.15-.658-10.05-3.122-15.18-3.887-13.31-1.997-24.83-8.916-37.4-12.915-1.24-.4-2.61-.473-3.78-1.002-1.71-.765-3.29-1.805-4.93-2.728 1.23-1.485 2.18-3.662 3.75-4.32 4.21-1.755 8.7-2.869 13.08-4.213 3.12-.956 6.22-2.003 9.39-2.779 7.41-1.834 14.79-4.635 22.3-5.034 13.07-.698 25.43-3.319 37.59-8.083 12.12-4.748 17.48-2.082 22.15 10.057 4.66 12.122 12.62 20.273 25.48 23.828 17.47 4.821 34.91 9.861 52.1 15.61 10.17 3.403 19.82 8.359 28.72 12.199 8.15-19.641 16.78-40.235 25.22-60.896 2.04-5.006 4.15-10.153 4.98-15.429.64-4.034-.07-8.562-1.25-12.55-5.97-20.239-5.73-40.05 4.3-58.911 5.07-9.529 11.89-17.787 22.68-21.702 6.15-2.227 4.76-8.415 5.84-12.949 1.5-6.277-5.43-24.705-9.73-29.082-1.27 1.457-2.62 2.987-3.96 4.523-.47-.315-.93-5.389-1.4-5.698v-2.177l-2.49-.771c1.09-2.12-2.11-5.569-.87-7.999-1.58-1.052-1.24-.827-3.58-2.379 4.47-4.793-1.17-10.806-3.53-14.614-7-11.295-13.66-23.097-27.06-28.379-1.01-.399-2.07-1.113-2.71-1.98-6.33-8.499-16.3-12.251-24.11-18.765-5.75-4.781-11.43-9.838-16.17-15.576-13.01-15.761-28.28-28.446-46.77-37.283-18.75-8.949-35.32-21.336-52.3-33.137-8.05-5.586-17.29-9.889-26.56-13.118-5.58-1.94-12.27-.99-18.46-.81-6.28.18-10.28-1.62-11.62-8.466-.92-4.657-3.43-8.977-4.85-13.562-3.66-11.857 2.82-15.334 11.67-17.736 11.73-3.178 17.93 4.067 23.86 10.885 10 11.515 22.61 18.298 36.5 23.316 16.04 5.794 32.24 11.126 48.17 17.168 6.44 2.441 12.36 6.232 18.43 9.354.11-6.553-4.69-11.812-12.58-13.556-9.01-1.992-10.4-2.903-10.31-11.459.05-4.398-1.71-6.913-4.66-8.955-4.92-3.414-9.93-6.84-15.27-9.512-14.02-7.009-27.62-14.541-38.61-26.016-15.4-16.076-34.74-26.899-52.73-39.522-4.24-2.975-8.95-5.49-13.78-7.335-2.36-.894-5.96-.602-8.18.63-4.9 2.729-9.31 6.329-13.84 9.687-3.11 2.312-6.09 2.722-9.16.017-3.49-3.049-7.03-6.042-10.5-9.113-6.85-6.063-6.08-11.621 1.35-15.446-.79-2.621-2.66-6.829-2.05-7.234 2.76-1.805 6.41-3.78 9.41-3.364 5.04.704 9.42.315 14.24-1.302 3.09-1.04 7.27-.675 10.39.529 7.67 2.948 14.9 7.007 22.5 10.142 12.1 5.001 24.23 10.001 36.59 14.305 18.72 6.519 35.92 15.874 53.3 25.307 16.12 8.758 27.22 23.428 42.89 32.299 1.97 1.119 5.32 3.178 6.04 2.543 3.15-2.768 6.37-6.053 7.87-9.827l6.72 1.797z"/></svg>
|
||||
|
Before Width: | Height: | Size: 3.9 KiB |
BIN
xml/graphics/logo_footer.png
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
xml/graphics/logo_large_whitecaps.png
Normal file
|
After Width: | Height: | Size: 112 KiB |
|
Before Width: | Height: | Size: 147 KiB |
|
Before Width: | Height: | Size: 67 KiB |
|
Before Width: | Height: | Size: 48 KiB |
BIN
xml/rosbot/OpenSans-Bold.ttf
Executable file
@@ -103,7 +103,9 @@ the location of this file.
|
||||
<font kerning="yes" embed-url="LiberationMono-BoldItalic.ttf">
|
||||
<font-triplet name="LiberationMono" style="italic" weight="bold"/>
|
||||
</font>
|
||||
|
||||
<font kerning="yes" embed-url="OpenSans-Bold.ttf">
|
||||
<font-triplet name="OpenSans" style="normal" weight="bold"/>
|
||||
</font>
|
||||
</fonts>
|
||||
|
||||
</renderer>
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
<!-- THIS you can change/expand! -->
|
||||
<!-- COVERPAGE AND HEADERS/FOOTERS -->
|
||||
<string id="coverpage_offer">
|
||||
<translation xml:lang="nl">OFFERTE</translation>
|
||||
<translation xml:lang="en">QUOTE</translation>
|
||||
<translation xml:lang="nl">Offerte</translation>
|
||||
<translation xml:lang="en">Quote</translation>
|
||||
</string>
|
||||
<string id="coverpage_service_pentest">
|
||||
<translation xml:lang="nl">penetratietestdiensten</translation>
|
||||
@@ -75,6 +75,10 @@
|
||||
<translation xml:lang="nl">Kamer van Koophandel</translation>
|
||||
<translation xml:lang="en">Chamber of Commerce</translation>
|
||||
</string>
|
||||
<string id="page_of">
|
||||
<translation xml:lang="nl">van</translation>
|
||||
<translation xml:lang="en">of</translation>
|
||||
</string>
|
||||
<!-- INVOICES -->
|
||||
<string id="invoice_no">
|
||||
<translation xml:lang="nl">Factuur nr.</translation>
|
||||
@@ -142,11 +146,15 @@
|
||||
<string id="invoice_yaygreen">
|
||||
<translation xml:lang="nl">Spaar papier — niet afdrukken tenzij absoluut
|
||||
noodzakelijk. Lees onze (unieke) voorwaarden op:
|
||||
https://radicallyopensecurity.com/TermsandConditions.pdf
|
||||
</translation>
|
||||
<translation xml:lang="en">Please keep digital unless absolutely required.
|
||||
Read the (unique) terms and conditions of Radically Open Security at:
|
||||
https://radicallyopensecurity.com/TermsandConditions.pdf
|
||||
</translation>
|
||||
</string>
|
||||
<string id="invoice_terms">
|
||||
<translation xml:lang="nl">https://radicallyopensecurity.com/TermsandConditions.pdf
|
||||
</translation>
|
||||
<translation xml:lang="en">https://radicallyopensecurity.com/TermsandConditions.pdf
|
||||
</translation>
|
||||
</string>
|
||||
<!-- QUICKSCOPING 2 QUOTE -->
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<annex>
|
||||
<title>Annex 1<br/>General Terms and Conditions</title>
|
||||
<title>Annex 1 - General Terms and Conditions</title>
|
||||
<p>
|
||||
<b>What is this document?</b>
|
||||
</p>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<waivers>
|
||||
<waivers annex_number="2">
|
||||
<standard_waiver>
|
||||
<title>
|
||||
<company_svc_short/>
|
||||
- WAIVER
|
||||
waiver
|
||||
</title>
|
||||
|
||||
<p>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<waivers>
|
||||
<waivers annex_number="2">
|
||||
<standard_waiver>
|
||||
<title><company_svc_short/> - VRIJWARINGSVERKLARING</title>
|
||||
|
||||
|
||||
@@ -19,23 +19,24 @@
|
||||
<xi:include href="../company_info.xml"/>
|
||||
<xi:include href="../../client_info.xml"/>
|
||||
</meta>
|
||||
<title><company_long/><br/> <br/>SERVICES RATE CARD FOR <client_long/></title>
|
||||
<title>Service Rate Card for <client_long/></title>
|
||||
<div class="important"><generate_raterevisiondate/></div>
|
||||
<p>For <client_long/> we have the following hourly rates:</p>
|
||||
<table cols="10mm 80mm 30mm">
|
||||
<tr><td>•</td><td>Junior pentester:</td><td><client_rate title="juniorpentester"/></td></tr>
|
||||
<tr><td>•</td><td>Medior pentester:</td><td><client_rate title="mediorpentester"/></td></tr>
|
||||
<tr><td>•</td><td>Senior pentester:</td><td><client_rate title="seniorpentester"/></td></tr>
|
||||
<p><company_long/> offers <client_long/> the following hourly rates:</p>
|
||||
<table cols="1cm 8cm 3cm">
|
||||
<tr><th> </th><th>Role</th><th>Rate</th></tr>
|
||||
<tr><td>•</td><td>Junior pentester</td><td><client_rate title="juniorpentester"/></td></tr>
|
||||
<tr><td>•</td><td>Medior pentester</td><td><client_rate title="mediorpentester"/></td></tr>
|
||||
<tr><td>•</td><td>Senior pentester</td><td><client_rate title="seniorpentester"/></td></tr>
|
||||
<tr><td>•</td><td>Expert pentester<fnref>Only on special requests by, and after discussion with and
|
||||
approval of, <client_short/></fnref>:</td><td><client_rate title="expertpentester"/></td></tr>
|
||||
approval of, <client_short/></fnref></td><td><client_rate title="expertpentester"/></td></tr>
|
||||
<tr><td>•</td><td>Junior project and account manager<fnref>Tasks of a project and account manager include
|
||||
support in client contact, writing pentest reports, presenting findings and
|
||||
conclusions, communication with team, etc.</fnref>:</td><td><client_rate title="juniormanager"/></td></tr>
|
||||
<tr><td>•</td><td>Senior project and account manager:</td><td><client_rate title="seniormanager"/></td></tr>
|
||||
conclusions, communication with team, etc.</fnref></td><td><client_rate title="juniormanager"/></td></tr>
|
||||
<tr><td>•</td><td>Senior project and account manager</td><td><client_rate title="seniormanager"/></td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
<p><company_long/>'s hourly rates are excluding VAT and out-of-pocket expenses and depend upon
|
||||
<p>All hourly rates are excluding VAT and out-of-pocket expenses and depend upon
|
||||
the exact service or area of expertise.</p>
|
||||
<p>Typically, a pentesting team is composed of two pentesters and one project/account manager. The actual team composition and price naturally depends on the length of the pentest and the complexity of the tasks, and will be determined in close consultation with <client_short/> on a per-assignment basis.</p>
|
||||
<p>
|
||||
|
||||
@@ -44,6 +44,6 @@
|
||||
</ul>
|
||||
<p>Please note that this risk rating system was taken from the Penetration Testing Execution
|
||||
Standard (PTES). For more information, see:
|
||||
http://www.pentest-standard.org/index.php/Reporting. </p>
|
||||
<a href="http://www.pentest-standard.org/index.php/Reporting">http://www.pentest-standard.org/index.php/Reporting</a>. </p>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs"
|
||||
xmlns:fo="http://www.w3.org/1999/XSL/Format" version="2.0"
|
||||
xmlns:svg="http://www.w3.org/2000/svg" xmlns:math="http://www.w3.org/2005/xpath-functions/math"
|
||||
xmlns:my="http://www.radical.sexy" extension-element-prefixes="math my">
|
||||
xmlns:fo="http://www.w3.org/1999/XSL/Format" version="2.0">
|
||||
|
||||
<xsl:template match="generate_targets">
|
||||
<xsl:call-template name="generate_targets_xslt"/>
|
||||
@@ -11,11 +9,10 @@
|
||||
|
||||
<xsl:template name="generate_targets_xslt">
|
||||
<xsl:param name="Ref" select="@Ref"/>
|
||||
<fo:list-block xsl:use-attribute-sets="list" provisional-distance-between-starts="0.75cm"
|
||||
provisional-label-separation="2.5mm" space-after="12pt" start-indent="1cm">
|
||||
<fo:list-block xsl:use-attribute-sets="list">
|
||||
<xsl:for-each
|
||||
select="/*/meta/targets/target[@Ref = $Ref] | /*/meta/targets/target[not(@Ref)]">
|
||||
<fo:list-item>
|
||||
<fo:list-item xsl:use-attribute-sets="li">
|
||||
<!-- insert a bullet -->
|
||||
<fo:list-item-label end-indent="label-end()">
|
||||
<fo:block>
|
||||
@@ -25,7 +22,7 @@
|
||||
<!-- list text -->
|
||||
<fo:list-item-body start-indent="body-start()">
|
||||
<fo:block>
|
||||
<xsl:value-of select="."/>
|
||||
<xsl:apply-templates/>
|
||||
</fo:block>
|
||||
</fo:list-item-body>
|
||||
</fo:list-item>
|
||||
@@ -152,7 +149,7 @@
|
||||
</xsl:for-each>
|
||||
</xsl:variable>
|
||||
<fo:block>
|
||||
<fo:table width="100%" table-layout="fixed" xsl:use-attribute-sets="table borders">
|
||||
<fo:table xsl:use-attribute-sets="fwtable table borders">
|
||||
<xsl:call-template name="checkIfLast"/>
|
||||
<fo:table-column column-width="proportional-column-width(12)"
|
||||
xsl:use-attribute-sets="borders"/>
|
||||
@@ -163,17 +160,17 @@
|
||||
<fo:table-column column-width="proportional-column-width(16)"
|
||||
xsl:use-attribute-sets="borders"/>
|
||||
<fo:table-body>
|
||||
<fo:table-row xsl:use-attribute-sets="bg-orange borders">
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
<fo:table-row keep-with-next.within-column="always">
|
||||
<fo:table-cell xsl:use-attribute-sets="th">
|
||||
<fo:block>ID</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
<fo:table-cell xsl:use-attribute-sets="th">
|
||||
<fo:block>Type</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
<fo:table-cell xsl:use-attribute-sets="th">
|
||||
<fo:block>Description</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
<fo:table-cell xsl:use-attribute-sets="th">
|
||||
<fo:block>Threat level</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
@@ -211,7 +208,10 @@
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="findingsSummaryContent">
|
||||
<fo:table-row xsl:use-attribute-sets="borders TableFont">
|
||||
<fo:table-row xsl:use-attribute-sets="TableFont">
|
||||
<xsl:if test="position() mod 2 != 0">
|
||||
<xsl:attribute name="background-color">#ededed</xsl:attribute>
|
||||
</xsl:if>
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
<fo:block>
|
||||
<xsl:if test="@id">
|
||||
@@ -219,7 +219,7 @@
|
||||
<xsl:value-of select="@id"/>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
<fo:basic-link color="blue">
|
||||
<fo:basic-link xsl:use-attribute-sets="link">
|
||||
<xsl:attribute name="internal-destination">
|
||||
<xsl:value-of select="@findingId"/>
|
||||
</xsl:attribute>
|
||||
@@ -255,7 +255,7 @@
|
||||
</xsl:for-each>
|
||||
</xsl:variable>
|
||||
<fo:block>
|
||||
<fo:table width="100%" table-layout="fixed" xsl:use-attribute-sets="table borders">
|
||||
<fo:table xsl:use-attribute-sets="fwtable table borders">
|
||||
<xsl:call-template name="checkIfLast"/>
|
||||
<fo:table-column column-width="proportional-column-width(12)"
|
||||
xsl:use-attribute-sets="borders"/>
|
||||
@@ -264,14 +264,14 @@
|
||||
<fo:table-column column-width="proportional-column-width(66)"
|
||||
xsl:use-attribute-sets="borders"/>
|
||||
<fo:table-body>
|
||||
<fo:table-row xsl:use-attribute-sets="bg-orange borders">
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
<fo:table-row keep-with-next.within-column="always">
|
||||
<fo:table-cell xsl:use-attribute-sets="th">
|
||||
<fo:block>ID</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
<fo:table-cell xsl:use-attribute-sets="th">
|
||||
<fo:block>Type</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
<fo:table-cell xsl:use-attribute-sets="th">
|
||||
<fo:block>Recommendation</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
@@ -309,10 +309,13 @@
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="recommendationsSummaryContent">
|
||||
<fo:table-row xsl:use-attribute-sets="TableFont borders">
|
||||
<fo:table-row xsl:use-attribute-sets="TableFont">
|
||||
<xsl:if test="position() mod 2 != 0">
|
||||
<xsl:attribute name="background-color">#ededed</xsl:attribute>
|
||||
</xsl:if>
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
<fo:block>
|
||||
<fo:basic-link color="blue">
|
||||
<fo:basic-link xsl:use-attribute-sets="link">
|
||||
<xsl:attribute name="internal-destination">
|
||||
<xsl:value-of select="@id"/>
|
||||
</xsl:attribute>
|
||||
@@ -329,7 +332,7 @@
|
||||
<fo:block>
|
||||
<xsl:choose>
|
||||
<xsl:when test="recommendation_summary">
|
||||
<xsl:value-of select="recommendation_summary"/>
|
||||
<xsl:apply-templates select="recommendation_summary" mode="summarytable"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:apply-templates select="recommendation" mode="summarytable"/>
|
||||
@@ -343,7 +346,7 @@
|
||||
|
||||
<xsl:template match="generate_testteam">
|
||||
<fo:block>
|
||||
<fo:table width="100%" table-layout="fixed" xsl:use-attribute-sets="borders">
|
||||
<fo:table xsl:use-attribute-sets="fwtable borders">
|
||||
<fo:table-column column-width="proportional-column-width(25)"
|
||||
xsl:use-attribute-sets="borders"/>
|
||||
<fo:table-column column-width="proportional-column-width(75)"
|
||||
@@ -401,7 +404,7 @@
|
||||
</xsl:call-template>
|
||||
</fo:block>
|
||||
<fo:block>
|
||||
<fo:table width="100%" table-layout="fixed" xsl:use-attribute-sets="borders">
|
||||
<fo:table xsl:use-attribute-sets="fwtable borders">
|
||||
<fo:table-column column-width="proportional-column-width(50)"
|
||||
xsl:use-attribute-sets="borders"/>
|
||||
<fo:table-column column-width="proportional-column-width(50)"
|
||||
@@ -534,453 +537,4 @@
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="generate_piechart">
|
||||
<xsl:choose>
|
||||
<xsl:when test="//finding">
|
||||
<!-- only generate pie chart if there are findings in the report - otherwise we get into trouble with empty percentages and divisions by zero -->
|
||||
<xsl:call-template name="do_generate_piechart">
|
||||
<xsl:with-param name="pieAttr" select="@pieAttr"/>
|
||||
<xsl:with-param name="pieElem" select="@pieElem"/>
|
||||
<xsl:with-param name="pieHeight" select="@pieHeight"/>
|
||||
<xsl:with-param name="status" select="@status"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<fo:block xsl:use-attribute-sets="errortext">Pie chart can only be generated when
|
||||
there are findings in the report. Get to work! ;)</fo:block>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="do_generate_piechart">
|
||||
<!-- Get the numbers -->
|
||||
<!-- generate_piechart @type="type" or "threatLevel" -->
|
||||
<xsl:param name="pieAttr" select="@pieAttr"/>
|
||||
<xsl:param name="pieElem" select="@pieElem"/>
|
||||
<xsl:param name="pieHeight" as="xs:integer" select="@pieHeight"/>
|
||||
<xsl:param name="status" select="@status"/>
|
||||
<xsl:variable name="statusSequence" as="item()*">
|
||||
<xsl:for-each select="$status">
|
||||
<xsl:for-each select="tokenize(., ' ')">
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:for-each>
|
||||
</xsl:for-each>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="pieTotal">
|
||||
<xsl:choose>
|
||||
<xsl:when test="not(@status)">
|
||||
<xsl:value-of select="count(//*[local-name() = $pieElem])"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of
|
||||
select="count(//*[local-name() = $pieElem][@status = $statusSequence])"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<!-- Create generic nodeset with values -->
|
||||
<xsl:variable name="unsortedPieTable">
|
||||
<xsl:choose>
|
||||
<xsl:when test="not(@status)">
|
||||
<xsl:for-each-group select="//*[local-name() = $pieElem]"
|
||||
group-by="@*[name() = $pieAttr]">
|
||||
<pieEntry>
|
||||
<pieEntryLabel>
|
||||
<xsl:value-of select="current-grouping-key()"/>
|
||||
</pieEntryLabel>
|
||||
<pieEntryCount>
|
||||
<xsl:value-of
|
||||
select="count(//*[local-name() = $pieElem][@*[name() = $pieAttr]][@* = current-grouping-key()])"
|
||||
/>
|
||||
</pieEntryCount>
|
||||
</pieEntry>
|
||||
</xsl:for-each-group>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:for-each-group
|
||||
select="//*[local-name() = $pieElem][@status = $statusSequence]"
|
||||
group-by="@*[name() = $pieAttr]">
|
||||
<pieEntry>
|
||||
<pieEntryLabel>
|
||||
<xsl:value-of select="current-grouping-key()"/>
|
||||
</pieEntryLabel>
|
||||
<pieEntryCount>
|
||||
<xsl:value-of
|
||||
select="count(//*[local-name() = $pieElem][@*[name() = $pieAttr]][@status = $statusSequence][@* = current-grouping-key()])"
|
||||
/>
|
||||
</pieEntryCount>
|
||||
</pieEntry>
|
||||
</xsl:for-each-group>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="pieHeightHalf" as="xs:double" select="$pieHeight div 2"/>
|
||||
<!-- Now we need to sort that pieTable - custom order for threat levels, 'count' descending order for all other types -->
|
||||
<xsl:variable name="pieTable">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$pieElem = 'finding' and $pieAttr = 'threatLevel'">
|
||||
<xsl:for-each select="$unsortedPieTable/pieEntry">
|
||||
<xsl:sort data-type="number" order="descending"
|
||||
select="
|
||||
(number(pieEntryLabel = 'Extreme') * 10)
|
||||
+ (number(pieEntryLabel = 'High') * 9)
|
||||
+ (number(pieEntryLabel = 'Elevated') * 8)
|
||||
+ (number(pieEntryLabel = 'Moderate') * 7)
|
||||
+ (number(pieEntryLabel = 'Low') * 6)
|
||||
+ (number(pieEntryLabel = 'Unknown') * 3)
|
||||
+ (number(pieEntryLabel = 'N/A') * 1)"/>
|
||||
<pieEntry>
|
||||
<pieEntryLabel>
|
||||
<xsl:value-of select="pieEntryLabel"/>
|
||||
</pieEntryLabel>
|
||||
<pieEntryCount>
|
||||
<xsl:value-of select="pieEntryCount"/>
|
||||
</pieEntryCount>
|
||||
</pieEntry>
|
||||
</xsl:for-each>
|
||||
</xsl:when>
|
||||
<xsl:when test="$pieElem = 'finding' and $pieAttr = 'status'">
|
||||
<xsl:for-each select="$unsortedPieTable/pieEntry">
|
||||
<xsl:sort data-type="number" order="descending"
|
||||
select="
|
||||
(number(pieEntryLabel = 'new') * 10)
|
||||
+ (number(pieEntryLabel = 'unresolved') * 9)
|
||||
+ (number(pieEntryLabel = 'not_retested') * 8)
|
||||
+ (number(pieEntryLabel = 'resolved') * 7)"/>
|
||||
<pieEntry>
|
||||
<pieEntryLabel>
|
||||
<xsl:value-of select="pieEntryLabel"/>
|
||||
</pieEntryLabel>
|
||||
<pieEntryCount>
|
||||
<xsl:value-of select="pieEntryCount"/>
|
||||
</pieEntryCount>
|
||||
</pieEntry>
|
||||
</xsl:for-each>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:for-each select="$unsortedPieTable/pieEntry">
|
||||
<xsl:sort data-type="number" order="descending" select="pieEntryCount"/>
|
||||
<pieEntry>
|
||||
<pieEntryLabel>
|
||||
<xsl:value-of select="pieEntryLabel"/>
|
||||
</pieEntryLabel>
|
||||
<pieEntryCount>
|
||||
<xsl:value-of select="pieEntryCount"/>
|
||||
</pieEntryCount>
|
||||
</pieEntry>
|
||||
</xsl:for-each>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
</xsl:variable>
|
||||
<xsl:variable name="no_entries" select="count($pieTable/pieEntry)"/>
|
||||
<xsl:for-each select="$pieTable">
|
||||
<fo:block xsl:use-attribute-sets="p">
|
||||
<fo:table margin-top="15px">
|
||||
<!-- need some margin to make space for percentages that can't fit in the pie... -->
|
||||
<fo:table-column column-width="{$pieHeight + 50}px"/>
|
||||
<fo:table-column/>
|
||||
<fo:table-body>
|
||||
<fo:table-row keep-together.within-column="always">
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
<fo:block>
|
||||
<fo:instream-foreign-object
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<!--set the display-->
|
||||
<svg:svg>
|
||||
<!-- width and height of the viewport -->
|
||||
<xsl:attribute name="width">
|
||||
<xsl:value-of select="$pieHeight"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="height">
|
||||
<xsl:value-of select="$pieHeight"/>
|
||||
</xsl:attribute>
|
||||
<!-- viewBox to scale -->
|
||||
<xsl:attribute name="viewBox">
|
||||
<xsl:value-of
|
||||
select="concat('0 0 ', $pieHeight, ' ', $pieHeight)"
|
||||
/>
|
||||
</xsl:attribute>
|
||||
<!--call the template starting at the last slice-->
|
||||
<xsl:call-template name="pie_chart_slice">
|
||||
<xsl:with-param name="pieTotal" select="$pieTotal"/>
|
||||
<xsl:with-param name="no_entries"
|
||||
select="$no_entries"/>
|
||||
<xsl:with-param name="position" select="$no_entries"/>
|
||||
<xsl:with-param name="middle_x"
|
||||
select="$pieHeightHalf"/>
|
||||
<xsl:with-param name="middle_y"
|
||||
select="$pieHeightHalf"/>
|
||||
<xsl:with-param name="move_x" select="0"/>
|
||||
<xsl:with-param name="radius"
|
||||
select="$pieHeightHalf"/>
|
||||
</xsl:call-template>
|
||||
</svg:svg>
|
||||
</fo:instream-foreign-object>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<!-- PIE CHART LEGEND -->
|
||||
<fo:table-cell>
|
||||
<fo:block>
|
||||
<fo:table xsl:use-attribute-sets="pieLegendTable">
|
||||
<fo:table-column column-width="20px"/>
|
||||
<fo:table-column/>
|
||||
<fo:table-body>
|
||||
<xsl:for-each select="$pieTable/pieEntry">
|
||||
<xsl:variable name="pieEntryLabelClean"
|
||||
select="translate(pieEntryLabel, '/', '_')"/>
|
||||
<xsl:variable name="pieEntryLabel">
|
||||
<xsl:sequence
|
||||
select="
|
||||
string-join(for $x in tokenize(pieEntryLabel, '_')
|
||||
return
|
||||
my:titleCase($x), ' ')"
|
||||
/>
|
||||
</xsl:variable>
|
||||
<fo:table-row>
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
<fo:block>
|
||||
<fo:instream-foreign-object>
|
||||
<svg:svg height="13" width="13">
|
||||
<svg:rect stroke="black" stroke-width="1"
|
||||
stroke-linejoin="round" height="11" width="11">
|
||||
<xsl:attribute name="fill">
|
||||
<xsl:call-template name="giveColor">
|
||||
<xsl:with-param name="i" select="position()"/>
|
||||
<xsl:with-param name="pieEntryLabel"
|
||||
select="pieEntryLabel"/>
|
||||
</xsl:call-template>
|
||||
</xsl:attribute>
|
||||
</svg:rect>
|
||||
</svg:svg>
|
||||
</fo:instream-foreign-object>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
<fo:block>
|
||||
<xsl:value-of select="$pieEntryLabel"/>
|
||||
<xsl:text> (</xsl:text>
|
||||
<!-- for threatLevel legend, link to finding summary table -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="$pieAttr = 'threatLevel'">
|
||||
<fo:basic-link text-decoration="underline">
|
||||
<xsl:attribute name="internal-destination"
|
||||
>summaryTableThreatLevel<xsl:value-of
|
||||
select="$pieEntryLabelClean"/></xsl:attribute>
|
||||
<xsl:value-of select="pieEntryCount"/>
|
||||
</fo:basic-link>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="pieEntryCount"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:text>)</xsl:text>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
</xsl:for-each>
|
||||
</fo:table-body>
|
||||
</fo:table>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
</fo:table-body>
|
||||
</fo:table>
|
||||
|
||||
</fo:block>
|
||||
</xsl:for-each>
|
||||
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="pie_chart_slice">
|
||||
<xsl:param name="pieTotal"/>
|
||||
<xsl:param name="position"/>
|
||||
<xsl:param name="no_entries"/>
|
||||
<xsl:param name="middle_x"/>
|
||||
<xsl:param name="middle_y"/>
|
||||
<xsl:param name="move_x"/>
|
||||
<xsl:param name="radius"/>
|
||||
<!--prepare the middle part of the arc command-->
|
||||
<xsl:variable name="middle" select="concat('M', ' ', $middle_x, ',', $middle_y)"/>
|
||||
<xsl:variable name="part" as="xs:double"
|
||||
select="sum(//pieEntry[position() <= $position]/pieEntryCount)"/>
|
||||
<!-- sum of pieEntryCounts up to this point -->
|
||||
<xsl:variable name="angle" select="($part div $pieTotal) * 360"/>
|
||||
<xsl:variable name="x" select="math:sin(3.1415292 * $angle div 180.0) * $radius"/>
|
||||
<xsl:variable name="y" select="math:cos(3.1415292 * $angle div 180.0) * $radius"/>
|
||||
<xsl:variable name="move_y" select="-$radius"/>
|
||||
<xsl:variable name="first_line" select="concat('l', ' ', $move_x, ',', $move_y)"/>
|
||||
<xsl:variable name="arc_move1" select="'0'"/>
|
||||
<xsl:variable name="arc_move2">
|
||||
<xsl:choose>
|
||||
<!--check the direction of the arc: inward or outward-->
|
||||
<xsl:when test="$angle <= 180">0</xsl:when>
|
||||
<xsl:otherwise>1</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="arc_move3" select="'1'"/>
|
||||
<xsl:variable name="arc_move" select="concat($arc_move1, ' ', $arc_move2, ',', $arc_move3)"/>
|
||||
<xsl:variable name="d"
|
||||
select="concat($middle, ' ', $first_line, ' ', 'a', $radius, ',', $radius, ' ', $arc_move, ' ', $x, ',', $radius - $y, ' ', 'z')"/>
|
||||
<!--put it all together-->
|
||||
<svg:path stroke="black" stroke-width="1" stroke-linejoin="round">
|
||||
<xsl:attribute name="fill">
|
||||
<xsl:call-template name="giveColor">
|
||||
<xsl:with-param name="i" select="$position"/>
|
||||
<xsl:with-param name="pieEntryLabel"
|
||||
select="//pieEntry[position() = $position]/pieEntryLabel"/>
|
||||
</xsl:call-template>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="d">
|
||||
<xsl:value-of select="$d"/>
|
||||
</xsl:attribute>
|
||||
</svg:path>
|
||||
<!--now the percentage-->
|
||||
<xsl:variable name="percentage" as="xs:double"
|
||||
select="(//pieEntry[position() = $position]/pieEntryCount div sum(//pieEntry/pieEntryCount)) * 100"/>
|
||||
<xsl:variable name="part_half" as="xs:double"
|
||||
select="(//pieEntry[position() = $position]/pieEntryCount div sum(//pieEntry/pieEntryCount)) div 2 * 360"/>
|
||||
<xsl:variable name="text_x"
|
||||
select="math:sin(3.1415292 * (($angle - $part_half) div 180.0)) * ($radius * 0.8)"/>
|
||||
<xsl:variable name="text_y"
|
||||
select="math:cos(3.1415292 * (($angle - $part_half) div 180.0)) * ($radius * 0.8)"/>
|
||||
<xsl:variable name="text_line_x"
|
||||
select="math:sin(3.1415292 * (($angle - $part_half) div 180.0)) * ($radius * 1.15)"/>
|
||||
<xsl:variable name="text_line_y"
|
||||
select="math:cos(3.1415292 * (($angle - $part_half) div 180.0)) * ($radius * 1.15)"/>
|
||||
<!--we either put it on the edge of the pie directly or have a line pointing into the slice, depending on how thick the slice is-->
|
||||
<xsl:choose>
|
||||
<xsl:when test="$percentage >= 3.5">
|
||||
<!--on the edge-->
|
||||
<svg:text text-anchor="middle" xsl:use-attribute-sets="PieFont">
|
||||
<xsl:attribute name="x">
|
||||
<xsl:value-of select="$middle_x + $text_line_x"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="y">
|
||||
<xsl:value-of select="$middle_y - $text_line_y"/>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="format-number($percentage, '##,##0.0')"/>
|
||||
<xsl:text>%</xsl:text>
|
||||
</svg:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<!--extra line pointing into the slice-->
|
||||
<xsl:variable name="line_dir">
|
||||
<xsl:choose>
|
||||
<!--when in the first half of the pie, have the line point to the right, otherwise to the left -->
|
||||
<xsl:when test="$angle <= 180">+10</xsl:when>
|
||||
<xsl:otherwise>-10</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="text_x_relative_to_line">
|
||||
<xsl:choose>
|
||||
<!--when in the first half of the pie, have the text be on the right of the line, otherwise on the left -->
|
||||
<xsl:when test="$angle <= 180">
|
||||
<xsl:value-of select="$middle_x + $text_line_x + $line_dir * 2 + 11"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$middle_x + $text_line_x - 11"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<svg:path stroke="black" stroke-width="1" stroke-linejoin="round">
|
||||
<xsl:attribute name="fill">none</xsl:attribute>
|
||||
<xsl:attribute name="d">
|
||||
<xsl:value-of
|
||||
select="concat('M', ' ', $middle_x + $text_x, ',', $middle_y - $text_y, ' ', 'L', ' ', $middle_x + $text_line_x, ',', $middle_y - $text_line_y, ' ', 'H', ' ', $middle_x + $text_line_x + $line_dir)"
|
||||
/>
|
||||
</xsl:attribute>
|
||||
</svg:path>
|
||||
<svg:text text-anchor="end" xsl:use-attribute-sets="PieFont">
|
||||
<xsl:attribute name="x">
|
||||
<!-- placement of text depends on where extra line is pointing -->
|
||||
<xsl:value-of select="$text_x_relative_to_line"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="y">
|
||||
<xsl:value-of select="$middle_y - $text_line_y + 1"/>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="format-number($percentage, '##,##0.0')"/>
|
||||
<xsl:text>%</xsl:text>
|
||||
</svg:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<!--<svg:text text-anchor="middle" xsl:use-attribute-sets="DefaultFont">
|
||||
<xsl:attribute name="x">
|
||||
<xsl:value-of select="$middle_x + $text_line_x"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="y">
|
||||
<xsl:value-of select="$middle_y - $text_line_y"/>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="format-number($percentage, '##,##0.0')"/>
|
||||
<xsl:text>%</xsl:text>
|
||||
</svg:text>-->
|
||||
<!--loop until we reach the first part-->
|
||||
<xsl:if test="$position > 1">
|
||||
<xsl:call-template name="pie_chart_slice">
|
||||
<xsl:with-param name="pieTotal" select="$pieTotal"/>
|
||||
<xsl:with-param name="position" select="$position - 1"/>
|
||||
<xsl:with-param name="no_entries" select="$no_entries"/>
|
||||
<xsl:with-param name="middle_x" select="$middle_x"/>
|
||||
<xsl:with-param name="middle_y" select="$middle_y"/>
|
||||
<xsl:with-param name="move_x" select="$move_x"/>
|
||||
<xsl:with-param name="radius" select="$radius"/>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
<xsl:template name="giveColor">
|
||||
<xsl:param name="i"/>
|
||||
<xsl:param name="pieEntryLabel"/>
|
||||
<xsl:choose>
|
||||
<!-- specific cases -->
|
||||
<!-- threat level -->
|
||||
<xsl:when test="$pieEntryLabel = 'Extreme'">#CC4900</xsl:when>
|
||||
<xsl:when test="$pieEntryLabel = 'High'">#FF5C00</xsl:when>
|
||||
<xsl:when test="$pieEntryLabel = 'Elevated'">#FE9920</xsl:when>
|
||||
<xsl:when test="$pieEntryLabel = 'Moderate'">#ffbf7f</xsl:when>
|
||||
<xsl:when test="$pieEntryLabel = 'Low'">#ffed7f</xsl:when>
|
||||
<xsl:when test="$pieEntryLabel = 'N/A'">#FFFFFF</xsl:when>
|
||||
<xsl:when test="$pieEntryLabel = 'Unknown'">#CCCCCC</xsl:when>
|
||||
<!-- status -->
|
||||
<xsl:when test="$pieEntryLabel = 'new'">#CC4900</xsl:when>
|
||||
<xsl:when test="$pieEntryLabel = 'unresolved'">#FF5C00</xsl:when>
|
||||
<xsl:when test="$pieEntryLabel = 'not_retested'">#FE9920</xsl:when>
|
||||
<xsl:when test="$pieEntryLabel = 'resolved'">#e5d572</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<!-- generic pie chart -->
|
||||
<xsl:choose>
|
||||
<!-- Going with shades of green and blue in all cases here so as not to imply severity levels -->
|
||||
<xsl:when test="$i = 1">#D9D375</xsl:when>
|
||||
<xsl:when test="$i = 2">#B9A44C</xsl:when>
|
||||
<xsl:when test="$i = 3">#BEC5AD</xsl:when>
|
||||
<xsl:when test="$i = 4">#7CA982</xsl:when>
|
||||
<xsl:when test="$i = 5">#566E3D</xsl:when>
|
||||
<xsl:when test="$i = 6">#5B5F97</xsl:when>
|
||||
<xsl:when test="$i = 7">#C200FB</xsl:when>
|
||||
<xsl:when test="$i = 8">#A9E5BB</xsl:when>
|
||||
<xsl:when test="$i = 9">#98C1D9</xsl:when>
|
||||
<xsl:when test="$i = 10">#5B5F97</xsl:when>
|
||||
<xsl:when test="$i = 11">burlywood</xsl:when>
|
||||
<xsl:when test="$i = 12">cornflowerblue</xsl:when><!-- that's right people, cornflower blue -->
|
||||
<xsl:when test="$i = 13">cornsilk</xsl:when>
|
||||
<xsl:otherwise>black</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:function name="my:titleCase" as="xs:string">
|
||||
<xsl:param name="s" as="xs:string"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="lower-case($s) = ('and', 'or')">
|
||||
<xsl:value-of select="lower-case($s)"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$s = upper-case($s)">
|
||||
<xsl:value-of select="$s"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of
|
||||
select="concat(upper-case(substring($s, 1, 1)), lower-case(substring($s, 2)))"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:function>
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<xsl:apply-templates/>
|
||||
</fo:block>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="li/p">
|
||||
<fo:block xsl:use-attribute-sets="li">
|
||||
<xsl:apply-templates/>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:my="http://www.radical.sexy" exclude-result-prefixes="xs my"
|
||||
xmlns:fo="http://www.w3.org/1999/XSL/Format" version="2.0">
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:my="http://www.radical.sexy"
|
||||
exclude-result-prefixes="xs my" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="2.0">
|
||||
|
||||
<xsl:template match="finding" mode="meta">
|
||||
<xsl:variable name="status" select="@status"/>
|
||||
@@ -13,8 +13,10 @@
|
||||
my:titleCase($x), ' ')"
|
||||
/>
|
||||
</xsl:variable>
|
||||
<fo:table width="100%" table-layout="fixed" xsl:use-attribute-sets="table"
|
||||
margin-bottom="{$large-space}">
|
||||
<fo:table xsl:use-attribute-sets="findingTable">
|
||||
<xsl:attribute name="border-top">4px solid <xsl:call-template name="selectColor"
|
||||
><xsl:with-param name="label" select="@threatLevel"/></xsl:call-template>
|
||||
</xsl:attribute>
|
||||
<fo:table-column column-width="proportional-column-width(70)"/>
|
||||
<fo:table-column column-width="proportional-column-width(30)"/>
|
||||
<fo:table-body>
|
||||
@@ -84,8 +86,8 @@
|
||||
<xsl:template match="description_summary | recommendation_summary"/>
|
||||
|
||||
<xsl:template match="description">
|
||||
<fo:block xsl:use-attribute-sets="title-4">Description:</fo:block>
|
||||
<fo:block margin-bottom="{$large-space}">
|
||||
<fo:block xsl:use-attribute-sets="title-findingsection">Description:</fo:block>
|
||||
<fo:block xsl:use-attribute-sets="finding-content">
|
||||
<xsl:apply-templates/>
|
||||
</fo:block>
|
||||
</xsl:template>
|
||||
@@ -100,22 +102,22 @@
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="technicaldescription">
|
||||
<fo:block xsl:use-attribute-sets="title-4">Technical description:</fo:block>
|
||||
<fo:block margin-bottom="{$large-space}">
|
||||
<fo:block xsl:use-attribute-sets="title-findingsection">Technical description:</fo:block>
|
||||
<fo:block xsl:use-attribute-sets="finding-content">
|
||||
<xsl:apply-templates/>
|
||||
</fo:block>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="impact">
|
||||
<fo:block xsl:use-attribute-sets="title-4">Impact:</fo:block>
|
||||
<fo:block margin-bottom="{$large-space}">
|
||||
<fo:block xsl:use-attribute-sets="title-findingsection">Impact:</fo:block>
|
||||
<fo:block xsl:use-attribute-sets="finding-content">
|
||||
<xsl:apply-templates/>
|
||||
</fo:block>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="recommendation">
|
||||
<fo:block xsl:use-attribute-sets="title-4">Recommendation:</fo:block>
|
||||
<fo:block margin-bottom="{$large-space}">
|
||||
<fo:block xsl:use-attribute-sets="title-findingsection">Recommendation:</fo:block>
|
||||
<fo:block xsl:use-attribute-sets="finding-content">
|
||||
<xsl:apply-templates/>
|
||||
</fo:block>
|
||||
</xsl:template>
|
||||
@@ -128,5 +130,12 @@
|
||||
</xsl:if>
|
||||
<xsl:apply-templates mode="summarytable"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="recommendation_summary" mode="summarytable">
|
||||
<xsl:apply-templates mode="summarytable"/>
|
||||
</xsl:template>
|
||||
<xsl:template match="description_summary" mode="summarytable">
|
||||
<xsl:apply-templates mode="summarytable"/>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
||||
195
xml/xslt/functions_params_vars.xslt
Normal file
@@ -0,0 +1,195 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:my="http://www.radical.sexy"
|
||||
exclude-result-prefixes="xs my" version="2.0">
|
||||
|
||||
<!-- auto numbering format (used in various docs) -->
|
||||
<xsl:param name="AUTO_NUMBERING_FORMAT" select="'1.1.1'"/>
|
||||
|
||||
<!-- executive summary (report only) -->
|
||||
<xsl:param name="EXEC_SUMMARY" select="true()"/>
|
||||
|
||||
<!-- language parameter for localization (quote & invoice) -->
|
||||
<xsl:param name="lang" select="/*/@xml:lang"/>
|
||||
|
||||
<!-- keys for numbering (used in report) -->
|
||||
<xsl:key name="rosid" match="section | finding | appendix | non-finding" use="@id"/>
|
||||
|
||||
<!-- key for bibliographies (for general document) -->
|
||||
<xsl:key name="biblioid" match="biblioentry" use="@id"/>
|
||||
|
||||
<!-- contract variables -->
|
||||
<xsl:variable name="hourly_fee" select="/contract/meta/contractor/hourly_fee * 1"/>
|
||||
<xsl:variable name="plannedHours" select="/contract/meta/work/planning/hours * 1"/>
|
||||
<xsl:variable name="total_fee" select="$hourly_fee * $plannedHours"/>
|
||||
|
||||
<!-- finding colors (used in findings & pie charts) -->
|
||||
<!-- threatlevel -->
|
||||
<xsl:variable name="color_extreme">#000000</xsl:variable>
|
||||
<xsl:variable name="color_high">#922D00</xsl:variable>
|
||||
<xsl:variable name="color_elevated">#E2632A</xsl:variable>
|
||||
<xsl:variable name="color_moderate">#FFA67E</xsl:variable>
|
||||
<xsl:variable name="color_low">#F7D4C4</xsl:variable>
|
||||
<xsl:variable name="color_na">silver</xsl:variable>
|
||||
<xsl:variable name="color_unknown">#EDD382</xsl:variable>
|
||||
<!-- status -->
|
||||
<xsl:variable name="color_new">#CC4900</xsl:variable>
|
||||
<xsl:variable name="color_unresolved">#FF5C00</xsl:variable>
|
||||
<xsl:variable name="color_notretested">#FE9920</xsl:variable>
|
||||
<xsl:variable name="color_resolved">#e5d572</xsl:variable>
|
||||
|
||||
<!-- generic pie chart colors -->
|
||||
<xsl:variable name="generic_piecolor_1">#D9D375</xsl:variable>
|
||||
<xsl:variable name="generic_piecolor_2">#B9A44C</xsl:variable>
|
||||
<xsl:variable name="generic_piecolor_3">#BEC5AD</xsl:variable>
|
||||
<xsl:variable name="generic_piecolor_4">#7CA982</xsl:variable>
|
||||
<xsl:variable name="generic_piecolor_5">#566E3D</xsl:variable>
|
||||
<xsl:variable name="generic_piecolor_6">#5B5F97</xsl:variable>
|
||||
<xsl:variable name="generic_piecolor_7">#C200FB</xsl:variable>
|
||||
<xsl:variable name="generic_piecolor_8">#A9E5BB</xsl:variable>
|
||||
<xsl:variable name="generic_piecolor_9">#98C1D9</xsl:variable>
|
||||
<xsl:variable name="generic_piecolor_10">#5B5F97</xsl:variable>
|
||||
<xsl:variable name="generic_piecolor_11">burlywood</xsl:variable>
|
||||
<xsl:variable name="generic_piecolor_12">cornflowerblue</xsl:variable>
|
||||
<!-- that's right people, cornflower blue -->
|
||||
<xsl:variable name="generic_piecolor_13">darksalmon</xsl:variable>
|
||||
<xsl:variable name="generic_piecolor_14">goldenrod</xsl:variable>
|
||||
<xsl:variable name="generic_piecolor_15">lightslategray</xsl:variable>
|
||||
<xsl:variable name="generic_piecolor_16">mediumpurple</xsl:variable>
|
||||
<xsl:variable name="generic_piecolor_17">teal</xsl:variable>
|
||||
<xsl:variable name="generic_piecolor_18">yellow</xsl:variable>
|
||||
<xsl:variable name="generic_piecolor_19">sienna</xsl:variable>
|
||||
<xsl:variable name="generic_piecolor_20">mediumturquoise</xsl:variable>
|
||||
<xsl:variable name="generic_piecolor_21">navy</xsl:variable>
|
||||
<xsl:variable name="generic_piecolor_other">black</xsl:variable>
|
||||
|
||||
<!-- document version number (mostly for report) -->
|
||||
<xsl:variable name="latestVersionNumber">
|
||||
<xsl:for-each select="//version_history/version">
|
||||
<xsl:sort select="xs:dateTime(@date)" order="descending"/>
|
||||
<xsl:if test="position() = 1">
|
||||
<xsl:call-template name="VersionNumber">
|
||||
<xsl:with-param name="number" select="@number"/>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:variable>
|
||||
|
||||
|
||||
<!-- document version number (various documents) -->
|
||||
<xsl:variable name="latestVersionDate">
|
||||
<xsl:choose>
|
||||
<xsl:when test="/contract">
|
||||
<!-- we're not using versions for contracts, but the contract date will do just fine -->
|
||||
<xsl:value-of
|
||||
select="format-date(/contract/meta/work/start_date, '[MNn] [D1], [Y]', 'en', (), ())"
|
||||
/>
|
||||
</xsl:when>
|
||||
<xsl:when test="/ratecard">
|
||||
<xsl:for-each select="/*/meta/client/rates/latestrevisiondate">
|
||||
<xsl:sort select="xs:dateTime(@date)" order="descending"/>
|
||||
<xsl:if test="position() = 1">
|
||||
<xsl:value-of select="format-dateTime(@date, '[MNn] [D1], [Y]', en, (), ())"
|
||||
/>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:for-each select="//version_history/version">
|
||||
<xsl:sort select="xs:dateTime(@date)" order="descending"/>
|
||||
<xsl:if test="position() = 1">
|
||||
<xsl:value-of
|
||||
select="format-dateTime(@date, '[MNn] [D1o], [Y]', 'en', (), ())"/>
|
||||
<!-- Note: this should be:
|
||||
<xsl:value-of select="format-dateTime(@date, $localDateFormat, $lang, (), ())"/>
|
||||
to properly be localised, but we're using Saxon HE instead of PE/EE and having localised month names
|
||||
would require creating a LocalizerFactory
|
||||
See http://www.saxonica.com/html/documentation/extensibility/config-extend/localizing/ for more info
|
||||
sounds like I'd have to know Java for that so for now, the date isn't localised. :) -->
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<!-- Money stuff -->
|
||||
<xsl:variable name="eur" select="'eur'"/>
|
||||
<xsl:variable name="gbp" select="'gbp'"/>
|
||||
<xsl:variable name="usd" select="'usd'"/>
|
||||
<xsl:variable name="eur_s" select="'€'"/>
|
||||
<xsl:variable name="gbp_s" select="'£'"/>
|
||||
<xsl:variable name="usd_s" select="'$'"/>
|
||||
<xsl:variable name="denomination">
|
||||
<xsl:choose>
|
||||
<xsl:when test="/ratecard">
|
||||
<xsl:choose>
|
||||
<xsl:when test="//meta/client/rates/@denomination = $eur">
|
||||
<xsl:value-of select="$eur_s"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="//meta/client/rates/@denomination = $gbp">
|
||||
<xsl:value-of select="$gbp_s"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="//meta/client/rates/@denomination = $usd">
|
||||
<xsl:value-of select="$usd_s"/>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:when test="/contract">
|
||||
<xsl:choose>
|
||||
<xsl:when test="/contract/meta/contractor/hourly_fee/@denomination = $eur">
|
||||
<xsl:value-of select="$eur_s"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="/contract/meta/contractor/hourly_fee/@denomination = $gbp">
|
||||
<xsl:value-of select="$gbp_s"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="/contract/meta/contractor/hourly_fee/@denomination = $usd">
|
||||
<xsl:value-of select="$usd_s"/>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:when test="/offerte">
|
||||
<xsl:choose>
|
||||
<xsl:when test="/offerte/meta/activityinfo/fee/@denomination = $eur">
|
||||
<xsl:value-of select="$eur_s"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="/offerte/meta/activityinfo/fee/@denomination = $gbp">
|
||||
<xsl:value-of select="$gbp_s"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="/offerte/meta/activityinfo/fee/@denomination = $usd">
|
||||
<xsl:value-of select="$usd_s"/>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:when test="/invoice">
|
||||
<xsl:choose>
|
||||
<xsl:when test="/invoice/@denomination = $eur">
|
||||
<xsl:value-of select="$eur_s"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="/invoice/@denomination = $gbp">
|
||||
<xsl:value-of select="$gbp_s"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="/invoice/@denomination = $usd">
|
||||
<xsl:value-of select="$usd_s"/>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<!-- titlecase function -->
|
||||
<xsl:function name="my:titleCase" as="xs:string">
|
||||
<xsl:param name="s" as="xs:string"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="lower-case($s) = ('and', 'or')">
|
||||
<xsl:value-of select="lower-case($s)"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$s = upper-case($s)">
|
||||
<xsl:value-of select="$s"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of
|
||||
select="concat(upper-case(substring($s, 1, 1)), lower-case(substring($s, 2)))"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:function>
|
||||
</xsl:stylesheet>
|
||||
@@ -24,53 +24,22 @@
|
||||
|
||||
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
|
||||
|
||||
|
||||
<!-- ****** AUTO_NUMBERING_FORMAT: value of the <xsl:number> element used for auto numbering -->
|
||||
<xsl:param name="AUTO_NUMBERING_FORMAT" select="'1.1.1'"/>
|
||||
|
||||
|
||||
<xsl:key name="rosid" match="section | finding | appendix | non-finding" use="@id"/>
|
||||
<xsl:key name="biblioid" match="biblioentry" use="@id"/>
|
||||
|
||||
|
||||
<xsl:variable name="CLASSES" select="document('../xslt/styles_con.xslt')/*/xsl:attribute-set"/>
|
||||
|
||||
<xsl:variable name="lang" select="/*/@xml:lang"/>
|
||||
<xsl:variable name="localDateFormat" select="$strdoc/date/format[lang($lang)]"/>
|
||||
<xsl:variable name="fee" select="/contract/meta/contractor/hourly_fee * 1"/>
|
||||
<xsl:variable name="plannedHours" select="/contract/meta/work/planning/hours * 1"/>
|
||||
<xsl:variable name="total_fee" select="$fee * $plannedHours"/>
|
||||
<xsl:variable name="denomination">
|
||||
<xsl:choose>
|
||||
<xsl:when test="/contract/meta/contractor/hourly_fee/@denomination = 'eur'">€</xsl:when>
|
||||
<xsl:when test="/contract/meta/contractor/hourly_fee/@denomination = 'gbp'">£</xsl:when>
|
||||
<xsl:when test="/contract/meta/contractor/hourly_fee/@denomination = 'usd'">$</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:param name="latestVersionDate"><!-- we're not using versions for contracts, but the contract date will do just fine -->
|
||||
<xsl:value-of select="format-date(/contract/meta/work/start_date, '[MNn] [D1], [Y]', 'en', (), ())"/>
|
||||
</xsl:param>
|
||||
<xsl:include href="functions_params_vars.xslt"/>
|
||||
|
||||
<!-- ROOT -->
|
||||
<xsl:template match="/">
|
||||
|
||||
<fo:root>
|
||||
|
||||
<xsl:call-template name="layout-master-set"/>
|
||||
<xsl:call-template name="Content">
|
||||
<xsl:with-param name="execsummary" select="false()" tunnel="yes"/>
|
||||
</xsl:call-template>
|
||||
|
||||
<xsl:with-param name="execsummary" select="'no'" tunnel="yes"/>
|
||||
</xsl:call-template>
|
||||
</fo:root>
|
||||
</xsl:template>
|
||||
|
||||
<!-- OVERRIDES -->
|
||||
|
||||
|
||||
|
||||
<!-- NO FRONT PAGE FOR META, JUST A HEADER -->
|
||||
<xsl:template match="meta"/>
|
||||
|
||||
|
||||
<!-- TITLES (NO NUMBERING) -->
|
||||
<xsl:template match="title">
|
||||
@@ -106,13 +75,13 @@
|
||||
<fo:table-body>
|
||||
<fo:table-row>
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
<fo:block><xsl:value-of
|
||||
select="/contract/meta/contractor/city"/>
|
||||
<fo:block>
|
||||
<xsl:value-of select="/contract/meta/contractor/city"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
<fo:block><xsl:value-of
|
||||
select="/*/meta/company/city"/>
|
||||
<fo:block>
|
||||
<xsl:value-of select="/*/meta/company/city"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
@@ -128,19 +97,25 @@
|
||||
</fo:table-row>
|
||||
<fo:table-row>
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
<fo:block><xsl:value-of
|
||||
select="/*/meta/contractor/name"/></fo:block>
|
||||
<fo:block>
|
||||
<xsl:value-of select="/*/meta/contractor/name"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
<fo:block><xsl:value-of select="/*/meta/company/legal_rep"/></fo:block>
|
||||
<fo:block>
|
||||
<xsl:value-of select="/*/meta/company/legal_rep"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
<fo:table-row>
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
<fo:block xsl:use-attribute-sets="bold"><xsl:value-of select="/*/meta/contractor/ctcompany"/></fo:block>
|
||||
<fo:block xsl:use-attribute-sets="bold">
|
||||
<xsl:value-of select="/*/meta/contractor/ctcompany"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
<fo:block xsl:use-attribute-sets="bold"><xsl:value-of select="/*/meta/company/full_name"/>
|
||||
<fo:block xsl:use-attribute-sets="bold">
|
||||
<xsl:value-of select="/*/meta/company/full_name"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
@@ -149,39 +124,56 @@
|
||||
</fo:block>
|
||||
</fo:block>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template name="page_header">
|
||||
<fo:static-content flow-name="region-before-cover" xsl:use-attribute-sets="HeaderFont">
|
||||
<fo:block>
|
||||
<fo:table width="100%" table-layout="fixed">
|
||||
<fo:table-column column-width="proportional-column-width(40)"/>
|
||||
<fo:table-column column-width="proportional-column-width(20)"/>
|
||||
<fo:table-column column-width="proportional-column-width(40)"/>
|
||||
<fo:table-body>
|
||||
<fo:table-row>
|
||||
<fo:table-cell text-align="right" display-align="after" padding-bottom="5mm">
|
||||
<fo:block xsl:use-attribute-sets="TinyFont">
|
||||
<fo:block xsl:use-attribute-sets="bold orange-text"><xsl:value-of select="/*/meta/company/full_name"/></fo:block>
|
||||
<fo:block><xsl:value-of select="/*/meta/company/address"/></fo:block>
|
||||
<fo:block><xsl:value-of select="/*/meta/company/postal_code"/> <xsl:value-of select="/*/meta/company/city"/></fo:block>
|
||||
<fo:block><xsl:value-of select="/*/meta/company/country"/></fo:block>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell text-align="center">
|
||||
<fo:block><fo:external-graphic xsl:use-attribute-sets="logo"/></fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell display-align="after" padding-bottom="5mm">
|
||||
<fo:block xsl:use-attribute-sets="TinyFont">
|
||||
<fo:block xsl:use-attribute-sets="bold orange-text"><xsl:value-of select="/*/meta/company/website"/></fo:block>
|
||||
<fo:block><xsl:value-of select="/*/meta/company/email"/></fo:block>
|
||||
<fo:block>Chamber of Commerce <xsl:value-of select="/*/meta/company/coc"/></fo:block>
|
||||
<fo:block>VAT number <xsl:value-of select="/*/meta/company/vat_no"/></fo:block>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
</fo:table-body>
|
||||
</fo:table>
|
||||
</fo:block>
|
||||
<fo:table width="100%" table-layout="fixed">
|
||||
<fo:table-column column-width="proportional-column-width(40)"/>
|
||||
<fo:table-column column-width="proportional-column-width(20)"/>
|
||||
<fo:table-column column-width="proportional-column-width(40)"/>
|
||||
<fo:table-body>
|
||||
<fo:table-row>
|
||||
<fo:table-cell text-align="right" display-align="after"
|
||||
padding-bottom="5mm">
|
||||
<fo:block xsl:use-attribute-sets="TinyFont">
|
||||
<fo:block xsl:use-attribute-sets="bold orange-text">
|
||||
<xsl:value-of select="/*/meta/company/full_name"/>
|
||||
</fo:block>
|
||||
<fo:block>
|
||||
<xsl:value-of select="/*/meta/company/address"/>
|
||||
</fo:block>
|
||||
<fo:block><xsl:value-of select="/*/meta/company/postal_code"
|
||||
/> <xsl:value-of select="/*/meta/company/city"
|
||||
/></fo:block>
|
||||
<fo:block>
|
||||
<xsl:value-of select="/*/meta/company/country"/>
|
||||
</fo:block>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell text-align="center">
|
||||
<fo:block>
|
||||
<fo:external-graphic xsl:use-attribute-sets="logo"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell display-align="after" padding-bottom="5mm">
|
||||
<fo:block xsl:use-attribute-sets="TinyFont">
|
||||
<fo:block xsl:use-attribute-sets="bold orange-text">
|
||||
<xsl:value-of select="/*/meta/company/website"/>
|
||||
</fo:block>
|
||||
<fo:block>
|
||||
<xsl:value-of select="/*/meta/company/email"/>
|
||||
</fo:block>
|
||||
<fo:block>Chamber of Commerce <xsl:value-of
|
||||
select="/*/meta/company/coc"/></fo:block>
|
||||
<fo:block>VAT number <xsl:value-of
|
||||
select="/*/meta/company/vat_no"/></fo:block>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
</fo:table-body>
|
||||
</fo:table>
|
||||
</fo:block>
|
||||
</fo:static-content>
|
||||
<fo:static-content flow-name="region-before-content" xsl:use-attribute-sets="HeaderFont">
|
||||
<fo:block xsl:use-attribute-sets="header"/>
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:fo="http://www.w3.org/1999/XSL/Format" exclude-result-prefixes="xs" version="2.0">
|
||||
xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:my="http://www.radical.sexy"
|
||||
exclude-result-prefixes="my xs" version="2.0">
|
||||
|
||||
|
||||
<xsl:import href="pages.xslt"/>
|
||||
@@ -10,7 +11,6 @@
|
||||
<xsl:import href="structure.xslt"/>
|
||||
<xsl:import href="att-set.xslt"/>
|
||||
<xsl:import href="block.xslt"/>
|
||||
<xsl:import href="findings.xslt"/>
|
||||
<xsl:import href="auto.xslt"/>
|
||||
<xsl:import href="table.xslt"/>
|
||||
<xsl:import href="lists.xslt"/>
|
||||
@@ -19,46 +19,29 @@
|
||||
<xsl:import href="generic.xslt"/>
|
||||
<xsl:import href="numbering.xslt"/>
|
||||
<xsl:import href="localisation.xslt"/>
|
||||
|
||||
<xsl:include href="styles_rep.xslt"/>
|
||||
|
||||
|
||||
<xsl:include href="styles_off.xslt"/>
|
||||
|
||||
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
|
||||
|
||||
<xsl:include href="functions_params_vars.xslt"/>
|
||||
|
||||
<!-- ****** AUTO_NUMBERING_FORMAT: value of the <xsl:number> element used for auto numbering -->
|
||||
<xsl:param name="AUTO_NUMBERING_FORMAT" select="'1.1.1'"/>
|
||||
|
||||
<xsl:key name="rosid" match="section|appendix" use="@id"/>
|
||||
<xsl:key name="biblioid" match="biblioentry" use="@id"/>
|
||||
|
||||
<xsl:variable name="CLASSES" select="document('../xslt/styles_doc.xslt')/*/xsl:attribute-set"/>
|
||||
<xsl:variable name="lang" select="/*/@xml:lang"/>
|
||||
|
||||
<xsl:variable name="latestVersionDate">
|
||||
<xsl:for-each select="/*/meta/version_history/version">
|
||||
<xsl:sort select="xs:dateTime(@date)" order="descending"/>
|
||||
<xsl:if test="position() = 1">
|
||||
<xsl:value-of select="format-dateTime(@date, '[MNn] [D1o], [Y]', 'en', (), ())"/>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:variable>
|
||||
|
||||
<!-- ROOT -->
|
||||
<!-- ROOT -->
|
||||
<xsl:template match="/">
|
||||
|
||||
<fo:root xsl:use-attribute-sets="root-common">
|
||||
|
||||
<xsl:call-template name="layout-master-set"/>
|
||||
<xsl:call-template name="FrontMatter"/>
|
||||
<xsl:call-template name="Content">
|
||||
<xsl:with-param name="execsummary" select="false()" tunnel="yes"/>
|
||||
</xsl:call-template>
|
||||
|
||||
<xsl:with-param name="execsummary" select="'no'" tunnel="yes"/>
|
||||
</xsl:call-template>
|
||||
</fo:root>
|
||||
</xsl:template>
|
||||
|
||||
<!-- OVERRIDES -->
|
||||
<!-- meta -->
|
||||
<xsl:template match="meta">
|
||||
<!-- OVERRIDES -->
|
||||
|
||||
<xsl:template match="meta" mode="frontmatter">
|
||||
<xsl:param name="execsummary" tunnel="yes"/>
|
||||
<xsl:variable name="latestVersionNumber">
|
||||
<xsl:for-each select="version_history/version">
|
||||
<xsl:sort select="xs:dateTime(@date)" order="descending"/>
|
||||
@@ -69,48 +52,62 @@
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:variable>
|
||||
<fo:block xsl:use-attribute-sets="graphics-block">
|
||||
<fo:external-graphic xsl:use-attribute-sets="logo"/>
|
||||
</fo:block>
|
||||
<fo:block xsl:use-attribute-sets="title-0">
|
||||
<xsl:if test="not(subtitle)">
|
||||
<xsl:attribute name="margin-bottom">7cm</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:value-of select="upper-case(title)"/>
|
||||
</fo:block>
|
||||
<xsl:if test="subtitle">
|
||||
<fo:block xsl:use-attribute-sets="title-client">
|
||||
<xsl:value-of select="subtitle"/>
|
||||
</fo:block>
|
||||
</xsl:if>
|
||||
<fo:block break-after="page">
|
||||
<fo:table width="100%" table-layout="fixed">
|
||||
<fo:table-column column-width="proportional-column-width(66)"/>
|
||||
<fo:table-column column-width="proportional-column-width(33)"/>
|
||||
<fo:table-body>
|
||||
<fo:table-row>
|
||||
<fo:table-cell>
|
||||
<xsl:variable name="reporttitle">
|
||||
<xsl:value-of select="title"/>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="words" select="tokenize($reporttitle, '\s')"/>
|
||||
|
||||
<fo:block xsl:use-attribute-sets="frontpagetext">
|
||||
<fo:block xsl:use-attribute-sets="title-0">
|
||||
<xsl:for-each select="$words">
|
||||
<xsl:choose>
|
||||
<xsl:when
|
||||
test="
|
||||
. = 'And' or
|
||||
. = 'and' or
|
||||
. = 'Or' or
|
||||
. = 'or' or
|
||||
. = 'The' or
|
||||
. = 'the' or
|
||||
. = 'Of' or
|
||||
. = 'of' or
|
||||
. = 'A' or
|
||||
. = 'a'">
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<fo:block/>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell text-align="left">
|
||||
<fo:block> V<xsl:value-of select="$latestVersionNumber"/>
|
||||
</fo:block>
|
||||
<fo:block>
|
||||
<xsl:text>Amsterdam</xsl:text>
|
||||
</fo:block>
|
||||
<fo:block>
|
||||
<xsl:value-of select="$latestVersionDate"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
</fo:table-body>
|
||||
</fo:table>
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:for-each>
|
||||
</fo:block>
|
||||
<fo:block xsl:use-attribute-sets="frontpagesubtitle">
|
||||
<xsl:sequence
|
||||
select="
|
||||
string-join(for $x in tokenize(//subtitle, ' ')
|
||||
return
|
||||
my:titleCase($x), ' ')"
|
||||
/>
|
||||
</fo:block>
|
||||
<fo:block xsl:use-attribute-sets="title-date">
|
||||
<xsl:value-of select="$latestVersionDate"/>
|
||||
</fo:block>
|
||||
</fo:block>
|
||||
<xsl:call-template name="DocProperties"/>
|
||||
<xsl:call-template name="VersionControl"/>
|
||||
<xsl:call-template name="Contact"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="cover_footer">
|
||||
<fo:static-content flow-name="region-after-cover" xsl:use-attribute-sets="FooterFont">
|
||||
<fo:block xsl:use-attribute-sets="footer coverfooter">
|
||||
<fo:block>
|
||||
<xsl:value-of select="//meta/company/coc"/>
|
||||
</fo:block>
|
||||
</fo:block>
|
||||
</fo:static-content>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template name="DocProperties">
|
||||
<xsl:variable name="latestVersionNumber">
|
||||
<xsl:for-each select="version_history/version">
|
||||
@@ -122,7 +119,8 @@
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="authors" select="version_history/version/v_author[not(.=../preceding::version/v_author)]" />
|
||||
<xsl:variable name="authors"
|
||||
select="version_history/version/v_author[not(. = ../preceding::version/v_author)]"/>
|
||||
<fo:block xsl:use-attribute-sets="title-4">Document Properties</fo:block>
|
||||
<fo:block margin-bottom="{$very-large-space}">
|
||||
<fo:table width="100%" table-layout="fixed" xsl:use-attribute-sets="borders">
|
||||
@@ -152,8 +150,7 @@
|
||||
</fo:table-row>
|
||||
<fo:table-row xsl:use-attribute-sets="borders">
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
<fo:block>Author<xsl:if test="$authors[2]"
|
||||
>s</xsl:if></fo:block>
|
||||
<fo:block>Author<xsl:if test="$authors[2]">s</xsl:if></fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
<fo:block>
|
||||
@@ -161,7 +158,9 @@
|
||||
<xsl:if test="preceding::v_author">
|
||||
<xsl:text>, </xsl:text>
|
||||
</xsl:if>
|
||||
<fo:inline><xsl:value-of select="."/></fo:inline>
|
||||
<fo:inline>
|
||||
<xsl:value-of select="."/>
|
||||
</fo:inline>
|
||||
</xsl:for-each>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
@@ -195,4 +194,7 @@
|
||||
</fo:block>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Don't want tabs in generic documents -->
|
||||
<xsl:template name="getTabMarker"/>
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
||||
@@ -1,20 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:my="http://radical.sexy" exclude-result-prefixes="xs my" version="2.0">
|
||||
xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:my="http://radical.sexy"
|
||||
exclude-result-prefixes="xs my" version="2.0">
|
||||
|
||||
|
||||
<xsl:import href="pages.xslt"/>
|
||||
<xsl:import href="pages_flimsy.xslt"/>
|
||||
<xsl:import href="meta.xslt"/>
|
||||
|
||||
<xsl:include href="styles_inv.xslt"/>
|
||||
<xsl:include href="localisation.xslt"/>
|
||||
|
||||
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
|
||||
|
||||
<xsl:variable name="lang" select="/*/@xml:lang"/>
|
||||
|
||||
<!-- ****** AUTO_NUMBERING_FORMAT: value of the <xsl:number> element used for auto numbering -->
|
||||
<!--<xsl:param name="AUTO_NUMBERING_FORMAT" select="'1.1.1'"/>-->
|
||||
<xsl:param name="INVOICE_NO">
|
||||
<xsl:choose>
|
||||
<xsl:when test="/invoice/@invoice_no">
|
||||
@@ -33,56 +31,73 @@
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:param>
|
||||
|
||||
<xsl:include href="functions_params_vars.xslt"/>
|
||||
|
||||
<!-- proper localized amount printing for invoices -->
|
||||
<xsl:decimal-format name="eu" decimal-separator=',' grouping-separator='.' />
|
||||
<xsl:decimal-format name="us" decimal-separator='.' grouping-separator=',' />
|
||||
<xsl:function name="my:amount" as="xs:string">
|
||||
<xsl:param name="a" as="xs:decimal"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$lang = 'nl'">
|
||||
<xsl:value-of select="format-number($a,'##.###,00', 'eu')"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$lang = 'en'">
|
||||
<xsl:value-of select="format-number($a,'###,###.00', 'us')"/>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:function>
|
||||
|
||||
<!-- ROOT -->
|
||||
<xsl:template match="/offerte | /invoice">
|
||||
<!-- Invoice is generated straight from offerte -->
|
||||
<fo:root>
|
||||
<xsl:call-template name="layout-master-set"/>
|
||||
<fo:root xsl:use-attribute-sets="root-common">
|
||||
<xsl:call-template name="layout-master-set-flimsy"/>
|
||||
<xsl:call-template name="Content">
|
||||
<xsl:with-param name="execsummary" select="false()" tunnel="yes"/>
|
||||
</xsl:call-template>
|
||||
<xsl:with-param name="execsummary" select="false()" tunnel="yes"/>
|
||||
</xsl:call-template>
|
||||
</fo:root>
|
||||
</xsl:template>
|
||||
|
||||
<!-- CONTENT -->
|
||||
<xsl:template name="invoice_from_offerte">
|
||||
<xsl:variable name="fee" select="/offerte/meta/activityinfo/fee * 1"/>
|
||||
<xsl:variable name="vat" select="$fee div 100 * 21"/>
|
||||
<xsl:variable name="denomination">
|
||||
<xsl:choose>
|
||||
<xsl:when test="/offerte/meta/activityinfo/fee/@denomination = 'eur'">€</xsl:when>
|
||||
<xsl:when test="/offerte/meta/activityinfo/fee/@denomination = 'gbp'">£</xsl:when>
|
||||
<xsl:when test="/offerte/meta/activityinfo/fee/@denomination = 'usd'">$</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="fee" select="/offerte/meta/activityinfo/fee" as="xs:decimal"/>
|
||||
<xsl:variable name="vat" select="$fee div 100 * 21" as="xs:decimal"/>
|
||||
<xsl:call-template name="invoiceStart">
|
||||
<xsl:with-param name="INVOICE_NO" select="$INVOICE_NO"/>
|
||||
<xsl:with-param name="DATE" select="format-date($DATE, '[MNn] [D1], [Y]', 'en', (), ())"
|
||||
/>
|
||||
</xsl:call-template>
|
||||
<xsl:variable name="serviceDescription">
|
||||
<xsl:value-of select="/offerte/meta/activityinfo/duration"/><xsl:text>-</xsl:text><xsl:call-template name="getString"><xsl:with-param
|
||||
name="stringID" select="'invoice_days'"
|
||||
/></xsl:call-template> <xsl:value-of
|
||||
select="/offerte/meta/offered_service_short"
|
||||
/> <xsl:value-of
|
||||
select="/offerte/meta/permission_parties/client/short_name"
|
||||
/>
|
||||
<xsl:value-of select="/offerte/meta/activityinfo/duration"/>
|
||||
<xsl:text>-</xsl:text>
|
||||
<xsl:call-template name="getString">
|
||||
<xsl:with-param name="stringID" select="'invoice_days'"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="/offerte/meta/offered_service_short"/>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="/offerte/meta/permission_parties/client/short_name"/>
|
||||
<xsl:if test="/offerte/meta/client_reference"><xsl:text> </xsl:text>(<xsl:value-of
|
||||
select="/offerte/meta/client_reference"/>)</xsl:if>
|
||||
</xsl:variable>
|
||||
<fo:block>
|
||||
<fo:table width="100%" table-layout="fixed"
|
||||
xsl:use-attribute-sets="big-space-below table-shading">
|
||||
<fo:table-column column-width="proportional-column-width(90)"/>
|
||||
<fo:table-column column-width="proportional-column-width(10)"/>
|
||||
<fo:table-column column-width="proportional-column-width(85)"/>
|
||||
<fo:table-column column-width="proportional-column-width(15)"/>
|
||||
<fo:table-body>
|
||||
<fo:table-row>
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
<fo:block><xsl:value-of select="$serviceDescription"/></fo:block>
|
||||
<fo:block>
|
||||
<xsl:value-of select="$serviceDescription"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell xsl:use-attribute-sets="td align-right">
|
||||
<fo:block xsl:use-attribute-sets="p"><xsl:value-of
|
||||
select="$denomination"/> <xsl:number value="$fee"
|
||||
grouping-separator="," grouping-size="3"/>.--</fo:block>
|
||||
<fo:block xsl:use-attribute-sets="p">
|
||||
<xsl:sequence select="my:amount($fee)"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
<fo:table-row>
|
||||
@@ -92,9 +107,7 @@
|
||||
21%</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell xsl:use-attribute-sets="td align-right">
|
||||
<fo:block xsl:use-attribute-sets="p"><xsl:value-of
|
||||
select="$denomination"/> <xsl:number value="$vat"
|
||||
grouping-separator="," grouping-size="3"/>.--</fo:block>
|
||||
<fo:block xsl:use-attribute-sets="p"><xsl:sequence select="my:amount($vat)"/></fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
<fo:table-row xsl:use-attribute-sets="border-top bold">
|
||||
@@ -107,15 +120,14 @@
|
||||
</fo:table-cell>
|
||||
<fo:table-cell xsl:use-attribute-sets="td align-right">
|
||||
<fo:block xsl:use-attribute-sets="p"><xsl:value-of
|
||||
select="$denomination"/> <xsl:number value="$vat + $fee"
|
||||
grouping-separator="," grouping-size="3"/>.--</fo:block>
|
||||
select="$denomination"/><xsl:sequence select="my:amount($vat + $fee)"/></fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
</fo:table-body>
|
||||
</fo:table>
|
||||
</fo:block>
|
||||
<xsl:if
|
||||
test="/*/meta//client/invoice_extra_field and normalize-space(/*/meta//client/invoice_extra_field) != ''">
|
||||
<xsl:if
|
||||
test="/*/meta//client/client_reference and normalize-space(/*/meta//client/client_reference) != ''">
|
||||
<fo:block>
|
||||
<fo:table width="100%" table-layout="fixed"
|
||||
xsl:use-attribute-sets="big-space-below table-shading">
|
||||
@@ -124,7 +136,7 @@
|
||||
<fo:table-row>
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
<fo:block xsl:use-attribute-sets="bold">
|
||||
<xsl:value-of select="/*/meta//client/invoice_extra_field"/>
|
||||
<xsl:value-of select="/*/meta//client/client_reference"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
@@ -138,13 +150,6 @@
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="custom_invoice">
|
||||
<xsl:variable name="denomination">
|
||||
<xsl:choose>
|
||||
<xsl:when test="/invoice/@denomination = 'usd'">$</xsl:when>
|
||||
<xsl:when test="/invoice/@denomination = 'eur'">€</xsl:when>
|
||||
<xsl:when test="/invoice/@denomination = 'gbp'">£</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:call-template name="invoiceStart">
|
||||
<xsl:with-param name="INVOICE_NO" select="$INVOICE_NO"/>
|
||||
<xsl:with-param name="DATE" select="format-date($DATE, '[MNn] [D1], [Y]', 'en', (), ())"
|
||||
@@ -153,20 +158,22 @@
|
||||
<fo:block>
|
||||
<fo:table width="100%" table-layout="fixed"
|
||||
xsl:use-attribute-sets="big-space-below table-shading">
|
||||
<fo:table-column column-width="proportional-column-width(90)"/>
|
||||
<fo:table-column column-width="proportional-column-width(10)"/>
|
||||
<fo:table-column column-width="proportional-column-width(85)"/>
|
||||
<fo:table-column column-width="proportional-column-width(15)"/>
|
||||
<fo:table-body>
|
||||
<xsl:for-each select="servicesdelivered/service">
|
||||
<xsl:variable name="fee" select="fee * 1"/>
|
||||
<fo:table-row>
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
<fo:block>
|
||||
<xsl:value-of select="description"/>
|
||||
<fo:inline>
|
||||
<xsl:value-of select="description"/>
|
||||
</fo:inline>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell xsl:use-attribute-sets="td align-right">
|
||||
<fo:block xsl:use-attribute-sets="p"><xsl:value-of
|
||||
select="$denomination"/> <xsl:number value="$fee"
|
||||
select="$denomination"/><xsl:number value="$fee"
|
||||
grouping-separator="," grouping-size="3"/>.--</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
@@ -205,7 +212,8 @@
|
||||
<xsl:for-each-group select="servicesdelivered/service | additionalcosts/cost"
|
||||
group-by="fee">
|
||||
<xsl:variable name="vat">
|
||||
<xsl:value-of select="sum(current-group()/fee[@vat = 'yes']) div 100 * 21"/>
|
||||
<xsl:value-of
|
||||
select="sum(current-group()/fee[@vat = 'yes']) div 100 * 21"/>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="total">
|
||||
<xsl:value-of select="sum(current-group()/fee) + $vat"/>
|
||||
@@ -241,7 +249,7 @@
|
||||
</fo:table>
|
||||
</fo:block>
|
||||
<xsl:if
|
||||
test="/*/meta//client/invoice_extra_field and normalize-space(/*/meta//client/invoice_extra_field) != ''">
|
||||
test="/*/meta//client/client_reference and normalize-space(/*/meta//client/client_reference) != ''">
|
||||
<fo:block>
|
||||
<fo:table width="100%" table-layout="fixed"
|
||||
xsl:use-attribute-sets="big-space-below table-shading">
|
||||
@@ -250,7 +258,7 @@
|
||||
<fo:table-row>
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
<fo:block xsl:use-attribute-sets="bold">
|
||||
<xsl:value-of select="/*/meta//client/invoice_extra_field"/>
|
||||
<xsl:value-of select="/*/meta//client/client_reference"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
@@ -266,7 +274,7 @@
|
||||
<xsl:template name="invoiceStart">
|
||||
<xsl:param name="INVOICE_NO"/>
|
||||
<xsl:param name="DATE"/>
|
||||
<fo:block xsl:use-attribute-sets="title-0">
|
||||
<fo:block xsl:use-attribute-sets="title-1">
|
||||
<xsl:call-template name="getString">
|
||||
<xsl:with-param name="stringID" select="'invoice_no'"/>
|
||||
</xsl:call-template>
|
||||
@@ -278,7 +286,8 @@
|
||||
<xsl:value-of select="/*/meta//client/full_name"/>
|
||||
</fo:block>
|
||||
<fo:block>
|
||||
<xsl:if test="/*/meta//client/invoice_rep and normalize-space(//client/invoice_rep) != ''">
|
||||
<xsl:if
|
||||
test="/*/meta//client/invoice_rep and normalize-space(//client/invoice_rep) != ''">
|
||||
<xsl:call-template name="getString">
|
||||
<xsl:with-param name="stringID" select="'invoice_fao'"/>
|
||||
</xsl:call-template>
|
||||
@@ -349,10 +358,9 @@
|
||||
<xsl:value-of select="/*/meta/company/full_name"/>
|
||||
</fo:block>
|
||||
</xsl:template>
|
||||
|
||||
<!-- overrules for pages.xslt -->
|
||||
|
||||
<xsl:template name="Content">
|
||||
<fo:page-sequence master-reference="Report">
|
||||
<fo:page-sequence master-reference="Flimsy">
|
||||
<xsl:call-template name="page_header"/>
|
||||
<xsl:call-template name="page_footer"/>
|
||||
<fo:flow flow-name="region-body" xsl:use-attribute-sets="DefaultFont">
|
||||
@@ -364,96 +372,13 @@
|
||||
<xsl:when test="self::invoice">
|
||||
<xsl:call-template name="custom_invoice"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:apply-templates/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</fo:block>
|
||||
<fo:block id="EndOfDoc"/>
|
||||
</fo:flow>
|
||||
</fo:page-sequence>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="page_header">
|
||||
<fo:static-content flow-name="region-before-cover" xsl:use-attribute-sets="HeaderFont">
|
||||
<fo:block>
|
||||
<fo:table width="100%" table-layout="fixed">
|
||||
<fo:table-column column-width="proportional-column-width(40)"/>
|
||||
<fo:table-column column-width="proportional-column-width(20)"/>
|
||||
<fo:table-column column-width="proportional-column-width(40)"/>
|
||||
<fo:table-body>
|
||||
<fo:table-row>
|
||||
<fo:table-cell text-align="right" display-align="after"
|
||||
padding-bottom="5mm">
|
||||
<fo:block xsl:use-attribute-sets="TinyFont">
|
||||
<fo:block xsl:use-attribute-sets="bold orange-text">
|
||||
<xsl:value-of select="/*/meta/company/full_name"/>
|
||||
</fo:block>
|
||||
<fo:block>
|
||||
<xsl:value-of select="/*/meta/company/address"/>
|
||||
</fo:block>
|
||||
<fo:block><xsl:value-of select="/*/meta/company/postal_code"
|
||||
/> <xsl:value-of select="/*/meta/company/city"
|
||||
/></fo:block>
|
||||
<fo:block>
|
||||
<xsl:value-of select="/*/meta/company/country"/>
|
||||
</fo:block>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell text-align="center">
|
||||
<fo:block>
|
||||
<fo:external-graphic xsl:use-attribute-sets="logo"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell display-align="after" padding-bottom="5mm">
|
||||
<fo:block xsl:use-attribute-sets="TinyFont">
|
||||
<fo:block xsl:use-attribute-sets="bold orange-text">
|
||||
<xsl:value-of select="/*/meta/company/website"/>
|
||||
</fo:block>
|
||||
<fo:block>
|
||||
<xsl:value-of select="/*/meta/company/email"/>
|
||||
</fo:block>
|
||||
<fo:block>
|
||||
<xsl:call-template name="getString">
|
||||
<xsl:with-param name="stringID" select="'page_kvk'"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="/*/meta/company/coc"/>
|
||||
</fo:block>
|
||||
<fo:block>
|
||||
<xsl:call-template name="getString">
|
||||
<xsl:with-param name="stringID" select="'invoice_vatno'"
|
||||
/>
|
||||
</xsl:call-template>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="/*/meta/company/vat_no"/>
|
||||
</fo:block>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
</fo:table-body>
|
||||
</fo:table>
|
||||
</fo:block>
|
||||
</fo:static-content>
|
||||
<fo:static-content flow-name="region-before-content" xsl:use-attribute-sets="HeaderFont">
|
||||
<fo:block xsl:use-attribute-sets="header"/>
|
||||
</fo:static-content>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="page_footer">
|
||||
<fo:static-content flow-name="region-after-cover" xsl:use-attribute-sets="FooterFont">
|
||||
<fo:block xsl:use-attribute-sets="footer">
|
||||
<fo:inline xsl:use-attribute-sets="TinyFont orange-text">
|
||||
<xsl:call-template name="getString">
|
||||
<xsl:with-param name="stringID" select="'invoice_yaygreen'"/>
|
||||
</xsl:call-template>
|
||||
</fo:inline>
|
||||
</fo:block>
|
||||
</fo:static-content>
|
||||
<fo:static-content flow-name="region-after-content" xsl:use-attribute-sets="FooterFont">
|
||||
<fo:block xsl:use-attribute-sets="footer">
|
||||
<fo:inline xsl:use-attribute-sets="TinyFont orange-text">
|
||||
<xsl:call-template name="getString">
|
||||
<xsl:with-param name="stringID" select="'invoice_yaygreen'"/>
|
||||
</xsl:call-template>
|
||||
</fo:inline>
|
||||
</fo:block>
|
||||
</fo:static-content>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:fo="http://www.w3.org/1999/XSL/Format" exclude-result-prefixes="xs" version="2.0">
|
||||
xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:my="http://www.radical.sexy"
|
||||
exclude-result-prefixes="xs my" version="2.0" extension-element-prefixes="my">
|
||||
|
||||
|
||||
<xsl:import href="pages.xslt"/>
|
||||
<xsl:import href="meta.xslt"/>
|
||||
<xsl:import href="toc.xslt"/>
|
||||
<xsl:import href="structure.xslt"/>
|
||||
<xsl:import href="att-set.xslt"/>
|
||||
<!--<xsl:import href="att-set.xslt"/>-->
|
||||
<xsl:import href="block.xslt"/>
|
||||
<!--<xsl:import href="findings.xslt"/>-->
|
||||
<xsl:import href="auto.xslt"/>
|
||||
<xsl:import href="table.xslt"/>
|
||||
<xsl:import href="lists.xslt"/>
|
||||
@@ -18,111 +18,94 @@
|
||||
<xsl:import href="graphics.xslt"/>
|
||||
<xsl:import href="generic.xslt"/>
|
||||
<xsl:import href="numbering.xslt"/>
|
||||
<xsl:import href="localisation.xslt"/>
|
||||
<xsl:import href="placeholders.xslt"/>
|
||||
<xsl:import href="waiver.xslt"/>
|
||||
|
||||
<xsl:include href="localisation.xslt"/>
|
||||
<xsl:include href="functions_params_vars.xslt"/>
|
||||
<xsl:include href="styles_off.xslt"/>
|
||||
|
||||
|
||||
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
|
||||
|
||||
<!-- numbered titles or not? -->
|
||||
<xsl:param name="NUMBERING" select="false()"/>
|
||||
|
||||
<!-- ****** AUTO_NUMBERING_FORMAT: value of the <xsl:number> element used for auto numbering -->
|
||||
<xsl:param name="AUTO_NUMBERING_FORMAT" select="'1.1.1'"/>
|
||||
<xsl:param name="EXEC_SUMMARY" select="false()"/><!-- not needed except for shared code -->
|
||||
|
||||
|
||||
<xsl:key name="rosid" match="section|finding|appendix|non-finding" use="@id"/>
|
||||
<xsl:key name="biblioid" match="biblioentry" use="@id"/>
|
||||
|
||||
<!-- not used but needed because of shared code with contract; todo: clean these up -->
|
||||
<xsl:variable name="fee" select="/contract/meta/contractor/hourly_fee * 1"/>
|
||||
<xsl:variable name="plannedHours" select="/contract/meta/work/planning/hours * 1"/>
|
||||
<xsl:variable name="total_fee" select="$fee * $plannedHours"/>
|
||||
<!-- end -->
|
||||
|
||||
<xsl:variable name="CLASSES" select="document('../xslt/styles_off.xslt')/*/xsl:attribute-set"/>
|
||||
|
||||
<xsl:variable name="lang" select="/*/@xml:lang"/>
|
||||
<xsl:variable name="localDateFormat" select="$strdoc/date/format[lang($lang)]"/>
|
||||
|
||||
<xsl:variable name="latestVersionDate">
|
||||
<xsl:for-each select="/*/meta/version_history/version">
|
||||
<xsl:sort select="xs:dateTime(@date)" order="descending"/>
|
||||
<xsl:if test="position() = 1">
|
||||
<xsl:value-of select="format-dateTime(@date, '[MNn] [D1], [Y]', en, (), ())"/>
|
||||
<!-- Note: this should be:
|
||||
<xsl:value-of select="format-dateTime(@date, $localDateFormat, $lang, (), ())"/>
|
||||
to properly be localised, but we're using Saxon HE instead of PE/EE and having localised month names
|
||||
would require creating a LocalizerFactory
|
||||
See http://www.saxonica.com/html/documentation/extensibility/config-extend/localizing/ for more info
|
||||
sounds like I'd have to know Java for that so for now, the date isn't localised. :) -->
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:variable>
|
||||
|
||||
|
||||
|
||||
<!-- ROOT -->
|
||||
<!-- ROOT -->
|
||||
<xsl:template match="/">
|
||||
|
||||
<fo:root>
|
||||
|
||||
<fo:root xsl:use-attribute-sets="root-common">
|
||||
<xsl:call-template name="layout-master-set"/>
|
||||
<xsl:call-template name="FrontMatter">
|
||||
<xsl:with-param name="execsummary" select="false()" tunnel="yes"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="Content">
|
||||
<xsl:with-param name="execsummary" select="false()" tunnel="yes"/>
|
||||
</xsl:call-template>
|
||||
|
||||
<xsl:with-param name="execsummary" select="false()" tunnel="yes"/>
|
||||
</xsl:call-template>
|
||||
</fo:root>
|
||||
</xsl:template>
|
||||
|
||||
<!-- OVERRIDES -->
|
||||
|
||||
|
||||
<!-- OVERRIDES -->
|
||||
|
||||
<!-- PAGE LAYOUT -->
|
||||
<xsl:template name="Content">
|
||||
<fo:page-sequence master-reference="Sections">
|
||||
<xsl:call-template name="page_header"/>
|
||||
<xsl:call-template name="page_footer"/>
|
||||
<xsl:call-template name="page_tab"/>
|
||||
<fo:flow flow-name="region-body" xsl:use-attribute-sets="DefaultFont">
|
||||
<fo:block>
|
||||
<xsl:apply-templates select="offerte"/>
|
||||
</fo:block>
|
||||
<xsl:if test="not(following-sibling::*)">
|
||||
<fo:block id="EndOfDoc"/>
|
||||
</xsl:if>
|
||||
</fo:flow>
|
||||
</fo:page-sequence>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="page_tab"/>
|
||||
|
||||
<!-- skip meta in quote; this is handled in FrontMatter -->
|
||||
<xsl:template match="meta"/>
|
||||
|
||||
<!-- FRONT PAGE -->
|
||||
<xsl:template match="meta">
|
||||
<fo:block xsl:use-attribute-sets="graphics-block">
|
||||
<fo:external-graphic xsl:use-attribute-sets="logo"/>
|
||||
</fo:block>
|
||||
<fo:block xsl:use-attribute-sets="title-0">
|
||||
<xsl:value-of select="upper-case(company/full_name)"/>
|
||||
</fo:block>
|
||||
<fo:block xsl:use-attribute-sets="for">
|
||||
<xsl:value-of select="//meta/title"/>
|
||||
</fo:block>
|
||||
<fo:block xsl:use-attribute-sets="title-0">
|
||||
<xsl:value-of select="upper-case(offered_service_long)"/>
|
||||
</fo:block>
|
||||
<fo:block xsl:use-attribute-sets="for">
|
||||
<xsl:call-template name="getString">
|
||||
<xsl:with-param name="stringID" select="'coverpage_for'"/>
|
||||
</xsl:call-template>
|
||||
</fo:block>
|
||||
<fo:block xsl:use-attribute-sets="title-client">
|
||||
<xsl:value-of select="permission_parties/client/full_name"/>
|
||||
</fo:block>
|
||||
<!-- NO DOCUMENT CONTROL, JUST THE DATE ON THE FP -->
|
||||
<fo:block xsl:use-attribute-sets="for break-after">
|
||||
<xsl:value-of select="$latestVersionDate"/>
|
||||
</fo:block>
|
||||
</xsl:template>
|
||||
|
||||
<!-- TITLES (NO NUMBERING) -->
|
||||
<xsl:template match="title">
|
||||
<xsl:variable name="LEVEL" select="count(ancestor::*) - 1"/>
|
||||
<xsl:variable name="CLASS">
|
||||
<!-- use title-x for all levels -->
|
||||
<xsl:text>title-</xsl:text>
|
||||
<xsl:value-of select="$LEVEL"/>
|
||||
<xsl:template match="meta" mode="frontmatter">
|
||||
<xsl:param name="execsummary" tunnel="yes"/>
|
||||
<xsl:variable name="latestVersionNumber">
|
||||
<xsl:for-each select="version_history/version">
|
||||
<xsl:sort select="xs:dateTime(@date)" order="descending"/>
|
||||
<xsl:if test="position() = 1">
|
||||
<xsl:call-template name="VersionNumber">
|
||||
<xsl:with-param name="number" select="@number"/>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:variable>
|
||||
|
||||
<fo:block>
|
||||
<xsl:call-template name="use-att-set">
|
||||
<xsl:with-param name="CLASS" select="$CLASS"/>
|
||||
</xsl:call-template>
|
||||
<xsl:apply-templates/>
|
||||
|
||||
<fo:block xsl:use-attribute-sets="frontpagetext">
|
||||
<fo:block xsl:use-attribute-sets="frontlogo">
|
||||
<fo:external-graphic src="../graphics/logo_large.png" width="17cm"
|
||||
content-height="scale-to-fit"/>
|
||||
</fo:block>
|
||||
<fo:footnote>
|
||||
<fo:inline/>
|
||||
<fo:footnote-body xsl:use-attribute-sets="front-titleblock-container">
|
||||
<fo:block xsl:use-attribute-sets="front-titleblock">
|
||||
<xsl:call-template name="front"/>
|
||||
</fo:block>
|
||||
</fo:footnote-body>
|
||||
</fo:footnote>
|
||||
</fo:block>
|
||||
|
||||
<fo:footnote>
|
||||
<fo:inline/>
|
||||
<fo:footnote-body>
|
||||
<xsl:call-template name="Contact"/>
|
||||
</fo:footnote-body>
|
||||
</fo:footnote>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- CONTACT BOX (comes at the end, is just the address, no title/table) -->
|
||||
<xsl:template match="contact">
|
||||
<fo:block xsl:use-attribute-sets="Contact">
|
||||
@@ -130,16 +113,18 @@
|
||||
</fo:block>
|
||||
</xsl:template>
|
||||
<xsl:template match="contact/name">
|
||||
<fo:block><xsl:apply-templates/></fo:block>
|
||||
</xsl:template>
|
||||
<!--<xsl:template match="contact/address">
|
||||
<fo:block><xsl:apply-templates/></fo:block>
|
||||
</xsl:template>-->
|
||||
<!-- is already in block.xslt -->
|
||||
<fo:block>
|
||||
<xsl:apply-templates/>
|
||||
</fo:block>
|
||||
</xsl:template>
|
||||
<xsl:template match="contact/phone">
|
||||
<fo:block><xsl:apply-templates/></fo:block>
|
||||
</xsl:template>
|
||||
<fo:block>
|
||||
<xsl:apply-templates/>
|
||||
</fo:block>
|
||||
</xsl:template>
|
||||
<xsl:template match="contact/email">
|
||||
<fo:block><xsl:apply-templates/></fo:block>
|
||||
</xsl:template>
|
||||
<fo:block>
|
||||
<xsl:apply-templates/>
|
||||
</fo:block>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
xmlns:fo="http://www.w3.org/1999/XSL/Format" exclude-result-prefixes="xs" version="2.0">
|
||||
|
||||
|
||||
<xsl:import href="pages.xslt"/>
|
||||
<xsl:import href="pages_flimsy.xslt"/>
|
||||
<xsl:import href="block.xslt"/>
|
||||
<xsl:import href="inline.xslt"/>
|
||||
<xsl:import href="auto.xslt"/>
|
||||
@@ -14,159 +14,50 @@
|
||||
<xsl:import href="generic.xslt"/>
|
||||
<xsl:import href="att-set.xslt"/>
|
||||
<xsl:import href="table.xslt"/>
|
||||
<xsl:import href="numbering.xslt"/>
|
||||
<xsl:include href="styles_rat.xslt"/>
|
||||
<xsl:include href="localisation.xslt"/>
|
||||
|
||||
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
|
||||
|
||||
|
||||
<!-- params & keys not needed but required by shared code -->
|
||||
<xsl:param name="AUTO_NUMBERING_FORMAT" select="'1.1.1'"/>
|
||||
<xsl:param name="EXEC_SUMMARY" select="false()"/>
|
||||
<xsl:key name="rosid" match="section|finding|appendix|non-finding" use="@id"/>
|
||||
<xsl:key name="biblioid" match="biblioentry" use="@id"/>
|
||||
<xsl:variable name="fee" select="/contract/meta/contractor/hourly_fee * 1"/>
|
||||
<xsl:variable name="plannedHours" select="/contract/meta/work/planning/hours * 1"/>
|
||||
<xsl:variable name="total_fee" select="$fee * $plannedHours"/>
|
||||
|
||||
<!-- the ones below actually *are* used -->
|
||||
<xsl:variable name="CLASSES" select="document('../xslt/styles_rat.xslt')/*/xsl:attribute-set"/>
|
||||
<xsl:variable name="lang" select="/*/@xml:lang"/>
|
||||
<xsl:variable name="latestVersionDate">
|
||||
<xsl:for-each select="/*/meta/client/rates/latestrevisiondate">
|
||||
<xsl:sort select="xs:dateTime(@date)" order="descending"/>
|
||||
<xsl:if test="position() = 1">
|
||||
<xsl:value-of select="format-dateTime(@date, '[MNn] [D1], [Y]', en, (), ())"/>
|
||||
<!-- Note: this should be:
|
||||
<xsl:value-of select="format-dateTime(@date, $localDateFormat, $lang, (), ())"/>
|
||||
to properly be localised, but we're using Saxon HE instead of PE/EE and having localised month names
|
||||
would require creating a LocalizerFactory
|
||||
See http://www.saxonica.com/html/documentation/extensibility/config-extend/localizing/ for more info
|
||||
sounds like I'd have to know Java for that so for now, the date isn't localised. :) -->
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:variable name="denomination">
|
||||
<xsl:choose>
|
||||
<xsl:when test="//meta/client/rates/@denomination = 'eur'">€</xsl:when>
|
||||
<xsl:when test="//meta/client/rates/@denomination = 'gbp'">£</xsl:when>
|
||||
<xsl:when test="//meta/client/rates/@denomination = 'usd'">$</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:include href="functions_params_vars.xslt"/>
|
||||
|
||||
<xsl:template match="ratecard">
|
||||
<!-- Invoice is generated straight from offerte -->
|
||||
<fo:root>
|
||||
<xsl:call-template name="layout-master-set"/>
|
||||
<fo:root xsl:use-attribute-sets="root-common">
|
||||
<xsl:call-template name="layout-master-set-flimsy"/>
|
||||
<xsl:call-template name="Content">
|
||||
<xsl:with-param name="execsummary" select="false()" tunnel="yes"/>
|
||||
</xsl:call-template>
|
||||
<xsl:with-param name="execsummary" select="'no'" tunnel="yes"/>
|
||||
</xsl:call-template>
|
||||
</fo:root>
|
||||
</xsl:template>
|
||||
|
||||
<!-- overrules for pages.xslt -->
|
||||
<xsl:template name="Content">
|
||||
<fo:page-sequence master-reference="Report">
|
||||
<xsl:template name="Content">
|
||||
<fo:page-sequence master-reference="Flimsy">
|
||||
<xsl:call-template name="page_header"/>
|
||||
<xsl:call-template name="page_footer"/>
|
||||
<fo:flow flow-name="region-body" xsl:use-attribute-sets="DefaultFont">
|
||||
<fo:block>
|
||||
<xsl:apply-templates/>
|
||||
<xsl:apply-templates/>
|
||||
</fo:block>
|
||||
<fo:block id="EndOfDoc"/>
|
||||
</fo:flow>
|
||||
</fo:page-sequence>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- title override -->
|
||||
<xsl:template match="title[not(parent::biblioentry)]">
|
||||
<fo:block padding-left="2mm" xsl:use-attribute-sets="title-0">
|
||||
<xsl:apply-templates/>
|
||||
</fo:block>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="meta">
|
||||
<!-- not doing anything here, ratecard meta is only for placeholder references -->
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="page_header">
|
||||
<fo:static-content flow-name="region-before-cover" xsl:use-attribute-sets="HeaderFont">
|
||||
<fo:block>
|
||||
<fo:table width="100%" table-layout="fixed">
|
||||
<fo:table-column column-width="proportional-column-width(40)"/>
|
||||
<fo:table-column column-width="proportional-column-width(20)"/>
|
||||
<fo:table-column column-width="proportional-column-width(40)"/>
|
||||
<fo:table-body>
|
||||
<fo:table-row>
|
||||
<fo:table-cell text-align="right" display-align="after"
|
||||
padding-bottom="5mm">
|
||||
<fo:block xsl:use-attribute-sets="TinyFont">
|
||||
<fo:block xsl:use-attribute-sets="bold orange-text">
|
||||
<xsl:value-of select="/*/meta/company/full_name"/>
|
||||
</fo:block>
|
||||
<fo:block>
|
||||
<xsl:value-of select="/*/meta/company/address"/>
|
||||
</fo:block>
|
||||
<fo:block><xsl:value-of select="/*/meta/company/postal_code"
|
||||
/> <xsl:value-of select="/*/meta/company/city"
|
||||
/></fo:block>
|
||||
<fo:block>
|
||||
<xsl:value-of select="/*/meta/company/country"/>
|
||||
</fo:block>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell text-align="center">
|
||||
<fo:block>
|
||||
<fo:external-graphic xsl:use-attribute-sets="logo"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell display-align="after" padding-bottom="5mm">
|
||||
<fo:block xsl:use-attribute-sets="TinyFont">
|
||||
<fo:block xsl:use-attribute-sets="bold orange-text">
|
||||
<xsl:value-of select="/*/meta/company/website"/>
|
||||
</fo:block>
|
||||
<fo:block>
|
||||
<xsl:value-of select="/*/meta/company/email"/>
|
||||
</fo:block>
|
||||
<fo:block>
|
||||
<xsl:call-template name="getString">
|
||||
<xsl:with-param name="stringID" select="'page_kvk'"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="/*/meta/company/coc"/>
|
||||
</fo:block>
|
||||
<fo:block>
|
||||
<xsl:call-template name="getString">
|
||||
<xsl:with-param name="stringID" select="'invoice_vatno'"
|
||||
/>
|
||||
</xsl:call-template>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="/*/meta/company/vat_no"/>
|
||||
</fo:block>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
</fo:table-body>
|
||||
</fo:table>
|
||||
</fo:block>
|
||||
</fo:static-content>
|
||||
<fo:static-content flow-name="region-before-content" xsl:use-attribute-sets="HeaderFont">
|
||||
<fo:block xsl:use-attribute-sets="header"/>
|
||||
</fo:static-content>
|
||||
|
||||
<xsl:template name="VersionNumber">
|
||||
<xsl:param name="number"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="page_footer">
|
||||
<fo:static-content flow-name="region-after-cover" xsl:use-attribute-sets="FooterFont">
|
||||
<fo:block xsl:use-attribute-sets="footer">
|
||||
<fo:inline xsl:use-attribute-sets="TinyFont orange-text">
|
||||
<xsl:call-template name="getString">
|
||||
<xsl:with-param name="stringID" select="'invoice_yaygreen'"/>
|
||||
</xsl:call-template>
|
||||
</fo:inline>
|
||||
</fo:block>
|
||||
</fo:static-content>
|
||||
<fo:static-content flow-name="region-after-content" xsl:use-attribute-sets="FooterFont">
|
||||
<fo:block xsl:use-attribute-sets="footer">
|
||||
<fo:inline xsl:use-attribute-sets="TinyFont orange-text">
|
||||
<xsl:call-template name="getString">
|
||||
<xsl:with-param name="stringID" select="'invoice_yaygreen'"/>
|
||||
</xsl:call-template>
|
||||
</fo:inline>
|
||||
</fo:block>
|
||||
</fo:static-content>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
<xsl:import href="meta.xslt"/>
|
||||
<xsl:import href="toc.xslt"/>
|
||||
<xsl:import href="structure.xslt"/>
|
||||
<xsl:import href="att-set.xslt"/>
|
||||
<xsl:import href="block.xslt"/>
|
||||
<xsl:import href="findings.xslt"/>
|
||||
<xsl:import href="auto.xslt"/>
|
||||
<xsl:import href="piecharts.xslt"/>
|
||||
<xsl:import href="table.xslt"/>
|
||||
<xsl:import href="lists.xslt"/>
|
||||
<xsl:import href="inline.xslt"/>
|
||||
@@ -20,67 +20,43 @@
|
||||
<xsl:import href="numbering.xslt"/>
|
||||
<xsl:import href="localisation.xslt"/>
|
||||
<xsl:import href="placeholders.xslt"/>
|
||||
<!--
|
||||
<xsl:import href="snippets.xslt"/>-->
|
||||
|
||||
<xsl:include href="styles_rep.xslt"/>
|
||||
|
||||
|
||||
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
|
||||
|
||||
|
||||
<!-- ****** AUTO_NUMBERING_FORMAT: value of the <xsl:number> element used for auto numbering -->
|
||||
<xsl:param name="AUTO_NUMBERING_FORMAT" select="'1.1.1'"/>
|
||||
<xsl:param name="EXEC_SUMMARY" select="false()"/>
|
||||
|
||||
<xsl:key name="rosid" match="section | finding | appendix | non-finding" use="@id"/>
|
||||
<xsl:key name="biblioid" match="biblioentry" use="@id"/>
|
||||
|
||||
<!-- not used but needed because of shared code with contract; todo: clean these up -->
|
||||
<xsl:variable name="fee" select="/contract/meta/contractor/hourly_fee * 1"/>
|
||||
<xsl:variable name="plannedHours" select="/contract/meta/work/planning/hours * 1"/>
|
||||
<xsl:variable name="total_fee" select="$fee * $plannedHours"/>
|
||||
<xsl:variable name="denomination" select="'X'"/>
|
||||
<!-- end -->
|
||||
|
||||
<xsl:variable name="lang" select="/*/@xml:lang"/>
|
||||
|
||||
<xsl:variable name="CLASSES" select="document('../xslt/styles_rep.xslt')/*/xsl:attribute-set"/>
|
||||
|
||||
<xsl:variable name="latestVersionDate">
|
||||
<xsl:for-each select="/*/meta/version_history/version">
|
||||
<xsl:sort select="xs:dateTime(@date)" order="descending"/>
|
||||
<xsl:if test="position() = 1">
|
||||
<xsl:value-of select="format-dateTime(@date, '[MNn] [D1o], [Y]', 'en', (), ())"/>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:include href="functions_params_vars.xslt"/>
|
||||
<xsl:include href="styles_rep.xslt"/>
|
||||
|
||||
|
||||
|
||||
<!-- numbered titles or not? -->
|
||||
<xsl:param name="NUMBERING" select="true()"/>
|
||||
|
||||
<!-- ROOT -->
|
||||
<xsl:template match="/">
|
||||
|
||||
<xsl:if test="$EXEC_SUMMARY = true()">
|
||||
<xsl:result-document href="../target/execsummary.fo">
|
||||
<fo:root xsl:use-attribute-sets="root-common">
|
||||
|
||||
<xsl:call-template name="layout-master-set"/>
|
||||
<xsl:call-template name="Content">
|
||||
<xsl:with-param name="execsummary" select="true()" tunnel="yes"/>
|
||||
</xsl:call-template>
|
||||
|
||||
</fo:root>
|
||||
</xsl:result-document>
|
||||
</xsl:if>
|
||||
<xsl:if test="$EXEC_SUMMARY = true()">
|
||||
<xsl:result-document href="../target/execsummary.fo">
|
||||
<fo:root xsl:use-attribute-sets="root-common">
|
||||
|
||||
<xsl:call-template name="layout-master-set"/>
|
||||
<xsl:call-template name="FrontMatter">
|
||||
<xsl:with-param name="execsummary" select="true()" tunnel="yes"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="Content">
|
||||
<xsl:with-param name="execsummary" select="true()" tunnel="yes"/>
|
||||
</xsl:call-template>
|
||||
</fo:root>
|
||||
</xsl:result-document>
|
||||
</xsl:if>
|
||||
<fo:root xsl:use-attribute-sets="root-common">
|
||||
<xsl:call-template name="layout-master-set"/>
|
||||
<xsl:call-template name="FrontMatter">
|
||||
<xsl:with-param name="execsummary" select="false()" tunnel="yes"/>
|
||||
</xsl:call-template>
|
||||
|
||||
</fo:root>
|
||||
|
||||
|
||||
<xsl:call-template name="Content">
|
||||
<xsl:with-param name="execsummary" select="false()" tunnel="yes"/>
|
||||
</xsl:call-template>
|
||||
</fo:root>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
</xsl:stylesheet>
|
||||
</xsl:stylesheet>
|
||||
@@ -7,7 +7,8 @@
|
||||
<xsl:template match="img">
|
||||
<fo:block xsl:use-attribute-sets="graphics-block">
|
||||
<xsl:call-template name="checkIfLast"/>
|
||||
<fo:block><fo:external-graphic src="{@src}">
|
||||
<fo:block>
|
||||
<fo:external-graphic src="{@src}">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@width">
|
||||
<xsl:attribute name="width">
|
||||
@@ -37,14 +38,15 @@
|
||||
<!-- No height or width set; should plop down graphic as-is, unless it's larger than the page, in which case scale down to page size -->
|
||||
<!-- Note: this is just making things page-width regardless of size... could be much more robust but I'm going to assume we're working with large graphics for now :/ -->
|
||||
<xsl:attribute name="width">
|
||||
<xsl:text>17cm</xsl:text>
|
||||
<!-- 21cm - 2*2cm for the margins -->
|
||||
<xsl:text>15.5cm</xsl:text>
|
||||
<!-- 21cm - 5.5cm for the margins -->
|
||||
</xsl:attribute>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:attribute name="content-width">scale-to-fit</xsl:attribute>
|
||||
<xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
|
||||
</fo:external-graphic></fo:block>
|
||||
</fo:external-graphic>
|
||||
</fo:block>
|
||||
<fo:block xsl:use-attribute-sets="img-title"><xsl:value-of select="@title"/></fo:block>
|
||||
</fo:block>
|
||||
</xsl:template>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
HIDDEN</fo:inline>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<fo:basic-link color="blue">
|
||||
<fo:basic-link xsl:use-attribute-sets="link">
|
||||
<xsl:choose>
|
||||
<xsl:when test="starts-with(@href, '#')">
|
||||
<xsl:attribute name="internal-destination">
|
||||
@@ -78,7 +78,7 @@
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<fo:basic-link color="blue">
|
||||
<fo:basic-link xsl:use-attribute-sets="link">
|
||||
<xsl:choose>
|
||||
<xsl:when test="starts-with(@href, '#')">
|
||||
<xsl:attribute name="internal-destination">
|
||||
|
||||
@@ -5,23 +5,36 @@
|
||||
version="2.0">
|
||||
|
||||
<xsl:template match="ul">
|
||||
<fo:list-block provisional-distance-between-starts="0.75cm"
|
||||
provisional-label-separation="2.5mm">
|
||||
<fo:list-block xsl:use-attribute-sets="list p">
|
||||
<xsl:call-template name="checkIfLast"/>
|
||||
<xsl:call-template name="do_ul"/>
|
||||
<xsl:call-template name="do_ul_default"/>
|
||||
</fo:list-block>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="ul" mode="summarytable">
|
||||
<!-- skip 'check if last' template -->
|
||||
<fo:list-block provisional-distance-between-starts="0.75cm"
|
||||
provisional-label-separation="2.5mm">
|
||||
<xsl:call-template name="do_ul"/>
|
||||
<fo:list-block xsl:use-attribute-sets="list">
|
||||
<xsl:call-template name="do_ul_summarytable"/>
|
||||
</fo:list-block>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="do_ul_default">
|
||||
<xsl:call-template name="space_after_list"/>
|
||||
<xsl:call-template name="do_ul"/>
|
||||
<xsl:apply-templates select="*"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="do_ul_summarytable">
|
||||
<xsl:call-template name="do_ul"/>
|
||||
<xsl:apply-templates select="*" mode="summarytable"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="do_ul">
|
||||
<xsl:call-template name="calculate_indent"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="space_after_list">
|
||||
<xsl:attribute name="space-after">
|
||||
<xsl:choose>
|
||||
<xsl:when test="ancestor::ul or ancestor::ol">
|
||||
@@ -32,141 +45,140 @@
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="calculate_indent">
|
||||
<xsl:attribute name="start-indent">
|
||||
<xsl:variable name="ancestors">
|
||||
<xsl:choose>
|
||||
<xsl:when test="count(ancestor::ol) or count(ancestor::ul)">
|
||||
<xsl:value-of
|
||||
select="
|
||||
1 +
|
||||
(count(ancestor::ol) +
|
||||
count(ancestor::ul)) *
|
||||
1.25"
|
||||
0.75"
|
||||
/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:text>1</xsl:text>
|
||||
<xsl:text>0.2</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:value-of select="concat($ancestors, 'cm')"/>
|
||||
</xsl:attribute>
|
||||
<xsl:apply-templates select="*"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="ul/li">
|
||||
<fo:list-item xsl:use-attribute-sets="li">
|
||||
<fo:list-item-label end-indent="label-end()">
|
||||
<fo:block>•</fo:block>
|
||||
</fo:list-item-label>
|
||||
<fo:list-item-body start-indent="body-start()">
|
||||
<fo:block>
|
||||
<xsl:apply-templates select="*|text()"/>
|
||||
</fo:block>
|
||||
</fo:list-item-body>
|
||||
<xsl:call-template name="do_ul_li"/>
|
||||
</fo:list-item>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="ul/li" mode="summarytable">
|
||||
<fo:list-item>
|
||||
<xsl:call-template name="do_ul_li"/>
|
||||
</fo:list-item>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="do_ul_li">
|
||||
<fo:list-item-label end-indent="label-end()">
|
||||
<fo:block>•</fo:block>
|
||||
</fo:list-item-label>
|
||||
<fo:list-item-body start-indent="body-start()">
|
||||
<fo:block>
|
||||
<xsl:apply-templates select="* | text()"/>
|
||||
</fo:block>
|
||||
</fo:list-item-body>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="ol">
|
||||
<fo:list-block provisional-distance-between-starts="0.85cm"
|
||||
provisional-label-separation="2.5mm">
|
||||
<fo:list-block xsl:use-attribute-sets="list p">
|
||||
<xsl:call-template name="checkIfLast"/>
|
||||
<xsl:call-template name="do_ol"/>
|
||||
<xsl:call-template name="do_ol_default"/>
|
||||
</fo:list-block>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="ol" mode="summarytable">
|
||||
<fo:list-block provisional-distance-between-starts="0.85cm"
|
||||
provisional-label-separation="2.5mm">
|
||||
<xsl:call-template name="do_ol"/>
|
||||
<fo:list-block xsl:use-attribute-sets="list">
|
||||
<xsl:call-template name="do_ol_summarytable"/>
|
||||
</fo:list-block>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="do_ol">
|
||||
<xsl:attribute name="space-after">
|
||||
<xsl:choose>
|
||||
<xsl:when test="ancestor::ul or ancestor::ol">
|
||||
<xsl:text>0pt</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:text>12pt</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="start-indent">
|
||||
<xsl:variable name="ancestors">
|
||||
<xsl:choose>
|
||||
<xsl:when test="count(ancestor::ol) or count(ancestor::ul)">
|
||||
<xsl:value-of
|
||||
select="
|
||||
1 +
|
||||
(count(ancestor::ol) +
|
||||
count(ancestor::ul)) *
|
||||
1.25"
|
||||
/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:text>1</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:value-of select="concat($ancestors, 'cm')"/>
|
||||
</xsl:attribute>
|
||||
<xsl:template name="do_ol_default">
|
||||
<xsl:call-template name="space_after_list"/>
|
||||
<xsl:call-template name="do_ol"/>
|
||||
<xsl:apply-templates select="*"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="do_ol_summarytable">
|
||||
<xsl:call-template name="do_ol"/>
|
||||
<xsl:apply-templates select="*" mode="summarytable"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="do_ol">
|
||||
<xsl:call-template name="calculate_indent"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="ol/li">
|
||||
<fo:list-item xsl:use-attribute-sets="li">
|
||||
<fo:list-item-label end-indent="label-end()">
|
||||
<fo:block>
|
||||
<xsl:variable name="value-attr">
|
||||
<xsl:choose>
|
||||
<xsl:when test="../@start">
|
||||
<xsl:number value="position() + ../@start - 1"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:number value="position()"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:call-template name="do_ol_li"/>
|
||||
</fo:list-item>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="ol/li" mode="summarytable">
|
||||
<fo:list-item>
|
||||
<xsl:call-template name="do_ol_li"/>
|
||||
</fo:list-item>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="do_ol_li">
|
||||
<fo:list-item-label end-indent="label-end()">
|
||||
<fo:block>
|
||||
<xsl:variable name="value-attr">
|
||||
<xsl:choose>
|
||||
<xsl:when test="../@type='i'">
|
||||
<xsl:value-of select="../@labelprefix"/>
|
||||
<xsl:number value="$value-attr" format="i. "/>
|
||||
</xsl:when>
|
||||
<xsl:when test="../@type='I'">
|
||||
<xsl:value-of select="../@labelprefix"/>
|
||||
<xsl:number value="$value-attr" format="I. "/>
|
||||
</xsl:when>
|
||||
<xsl:when test="../@type='a'">
|
||||
<xsl:value-of select="../@labelprefix"/>
|
||||
<xsl:number value="$value-attr" format="a. "/>
|
||||
</xsl:when>
|
||||
<xsl:when test="../@type='A'">
|
||||
<xsl:value-of select="../@labelprefix"/>
|
||||
<xsl:number value="$value-attr" format="A. "/>
|
||||
<xsl:when test="../@start">
|
||||
<xsl:number value="position() + ../@start - 1"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="../@labelprefix"/>
|
||||
<xsl:number value="$value-attr" format="1. "/>
|
||||
<xsl:number value="position()"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</fo:block>
|
||||
</fo:list-item-label>
|
||||
<fo:list-item-body start-indent="body-start()">
|
||||
<fo:block>
|
||||
<xsl:apply-templates select="*|text()"/>
|
||||
</fo:block>
|
||||
</fo:list-item-body>
|
||||
</fo:list-item>
|
||||
</xsl:variable>
|
||||
<xsl:choose>
|
||||
<xsl:when test="../@type = 'i'">
|
||||
<xsl:value-of select="../@labelprefix"/>
|
||||
<xsl:number value="$value-attr" format="i. "/>
|
||||
</xsl:when>
|
||||
<xsl:when test="../@type = 'I'">
|
||||
<xsl:value-of select="../@labelprefix"/>
|
||||
<xsl:number value="$value-attr" format="I. "/>
|
||||
</xsl:when>
|
||||
<xsl:when test="../@type = 'a'">
|
||||
<xsl:value-of select="../@labelprefix"/>
|
||||
<xsl:number value="$value-attr" format="a. "/>
|
||||
</xsl:when>
|
||||
<xsl:when test="../@type = 'A'">
|
||||
<xsl:value-of select="../@labelprefix"/>
|
||||
<xsl:number value="$value-attr" format="A. "/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="../@labelprefix"/>
|
||||
<xsl:number value="$value-attr" format="1. "/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</fo:block>
|
||||
</fo:list-item-label>
|
||||
<fo:list-item-body start-indent="body-start()">
|
||||
<fo:block>
|
||||
<xsl:apply-templates select="* | text()"/>
|
||||
</fo:block>
|
||||
</fo:list-item-body>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
|
||||
<xsl:template match="biblioentries"><!-- div doesn't do anything, it's just there to make snippets more flexible -->
|
||||
<fo:list-block provisional-distance-between-starts="0.75cm"
|
||||
provisional-label-separation="2.5mm" space-after="12pt">
|
||||
<fo:list-block xsl:use-attribute-sets="list" space-after="12pt">
|
||||
<xsl:call-template name="checkIfLast"/>
|
||||
<xsl:apply-templates select="biblioentry"/>
|
||||
</fo:list-block>
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
exclude-result-prefixes="xs" xmlns:fo="http://www.w3.org/1999/XSL/Format"
|
||||
version="2.0">
|
||||
|
||||
<xsl:template match="meta">
|
||||
<xsl:param name="execsummary" tunnel="yes"/>
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs my"
|
||||
xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:my="http://www.radical.sexy" version="2.0">
|
||||
|
||||
<xsl:template match="meta" mode="frontmatter">
|
||||
<xsl:param name="execsummary" tunnel="yes"/>
|
||||
<xsl:variable name="latestVersionNumber">
|
||||
<xsl:for-each select="version_history/version">
|
||||
<xsl:sort select="xs:dateTime(@date)" order="descending"/>
|
||||
@@ -16,51 +15,90 @@
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:variable>
|
||||
<fo:block xsl:use-attribute-sets="graphics-block">
|
||||
<fo:external-graphic xsl:use-attribute-sets="logo"/>
|
||||
</fo:block>
|
||||
<fo:block xsl:use-attribute-sets="title-0">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$execsummary=true()">
|
||||
<xsl:text>PENETRATION TEST MANAGEMENT SUMMARY</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select="upper-case(title)"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</fo:block>
|
||||
<fo:block xsl:use-attribute-sets="for">
|
||||
<xsl:text>for</xsl:text>
|
||||
</fo:block>
|
||||
<fo:block xsl:use-attribute-sets="title-client">
|
||||
<xsl:value-of select="//client/full_name"/>
|
||||
</fo:block>
|
||||
<fo:block break-after="page">
|
||||
<fo:table width="100%" table-layout="fixed">
|
||||
<fo:table-column column-width="proportional-column-width(66)"/>
|
||||
<fo:table-column column-width="proportional-column-width(33)"/>
|
||||
<fo:table-body>
|
||||
<fo:table-row>
|
||||
<fo:table-cell>
|
||||
<fo:block/>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell text-align="left">
|
||||
<fo:block> V<xsl:value-of select="$latestVersionNumber"/>
|
||||
</fo:block>
|
||||
<fo:block>
|
||||
<xsl:text>Amsterdam</xsl:text>
|
||||
</fo:block>
|
||||
<fo:block>
|
||||
<xsl:value-of select="$latestVersionDate"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
</fo:table-body>
|
||||
</fo:table>
|
||||
|
||||
<fo:block xsl:use-attribute-sets="frontpagetext">
|
||||
<fo:block xsl:use-attribute-sets="frontlogo">
|
||||
<fo:external-graphic src="../graphics/logo_large.png" width="17cm"
|
||||
content-height="scale-to-fit"/>
|
||||
</fo:block>
|
||||
<fo:footnote>
|
||||
<fo:inline/>
|
||||
<fo:footnote-body xsl:use-attribute-sets="front-titleblock-container">
|
||||
<fo:block xsl:use-attribute-sets="front-titleblock">
|
||||
<xsl:call-template name="front"/>
|
||||
</fo:block>
|
||||
</fo:footnote-body>
|
||||
</fo:footnote>
|
||||
</fo:block>
|
||||
|
||||
<xsl:call-template name="DocProperties"/>
|
||||
<xsl:call-template name="VersionControl"/>
|
||||
<xsl:call-template name="Contact"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="front">
|
||||
<xsl:param name="execsummary" tunnel="yes"/>
|
||||
<fo:table table-layout="fixed" width="10cm" border-after-color="black"
|
||||
border-after-width="2mm" border-after-style="solid" margin-left="0cm" margin-right="0cm">
|
||||
<fo:table-column column-width="10cm"/>
|
||||
<fo:table-body>
|
||||
<fo:table-row>
|
||||
<fo:table-cell xsl:use-attribute-sets="front-titlerow">
|
||||
<fo:block xsl:use-attribute-sets="title-0">
|
||||
<xsl:sequence
|
||||
select="
|
||||
string-join(for $x in tokenize(normalize-space(title), ' ')
|
||||
return
|
||||
my:titleCase($x), ' ')"
|
||||
/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
<fo:table-row>
|
||||
<fo:table-cell xsl:use-attribute-sets="front-subtitlerow">
|
||||
<fo:block xsl:use-attribute-sets="title-client">
|
||||
<xsl:value-of select="//client/full_name"/>
|
||||
</fo:block>
|
||||
<xsl:if test="/offerte">
|
||||
<fo:block xsl:use-attribute-sets="title-sub">
|
||||
<xsl:sequence
|
||||
select="
|
||||
string-join(for $x in tokenize(normalize-space(//meta/offered_service_long), ' ')
|
||||
return
|
||||
my:titleCase($x), ' ')"
|
||||
/>
|
||||
</fo:block>
|
||||
</xsl:if>
|
||||
<xsl:if test="normalize-space(//meta/subtitle) or //meta/subtitle/*">
|
||||
<fo:block xsl:use-attribute-sets="title-sub">
|
||||
<xsl:apply-templates select="subtitle"/>
|
||||
</fo:block>
|
||||
</xsl:if>
|
||||
<xsl:if test="$execsummary = true()">
|
||||
<fo:block xsl:use-attribute-sets="title-sub">
|
||||
<xsl:text>Management Summary</xsl:text>
|
||||
</fo:block>
|
||||
</xsl:if>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
<fo:table-row>
|
||||
<fo:table-cell xsl:use-attribute-sets="front-metarow">
|
||||
<fo:block>
|
||||
<fo:block>V <xsl:value-of select="$latestVersionNumber"/></fo:block>
|
||||
<fo:block>
|
||||
<xsl:value-of select="//meta/company/city"/>, <xsl:value-of
|
||||
select="$latestVersionDate"/>
|
||||
</fo:block>
|
||||
<fo:block>
|
||||
<xsl:value-of select="//meta/classification"/>
|
||||
</fo:block>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
</fo:table-body>
|
||||
</fo:table>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="DocProperties">
|
||||
<xsl:param name="execsummary" tunnel="yes"/>
|
||||
<xsl:variable name="latestVersionNumber">
|
||||
@@ -73,16 +111,16 @@
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="authors" select="version_history/version/v_author[not(.=../preceding::version/v_author)]" />
|
||||
<xsl:variable name="authors"
|
||||
select="version_history/version/v_author[not(. = ../preceding::version/v_author)]"/>
|
||||
<fo:block xsl:use-attribute-sets="title-4">Document Properties</fo:block>
|
||||
<fo:block margin-bottom="{$very-large-space}">
|
||||
<fo:table width="100%" table-layout="fixed" xsl:use-attribute-sets="borders">
|
||||
<fo:table-column column-width="proportional-column-width(25)"
|
||||
xsl:use-attribute-sets="bg-orange borders"/>
|
||||
<fo:table-column column-width="proportional-column-width(25)"/>
|
||||
<fo:table-column column-width="proportional-column-width(75)"/>
|
||||
<fo:table-body>
|
||||
<fo:table-row xsl:use-attribute-sets="borders">
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
<fo:table-cell xsl:use-attribute-sets="th">
|
||||
<fo:block>Client</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
@@ -92,22 +130,31 @@
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
<fo:table-row xsl:use-attribute-sets="borders">
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
<fo:table-cell xsl:use-attribute-sets="th">
|
||||
<fo:block>Title</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
<fo:block>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$execsummary=true()">
|
||||
<xsl:text>PENETRATION TEST MANAGEMENT SUMMARY</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select="upper-case(title)"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</fo:block>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$execsummary = true()">
|
||||
<fo:block>Penetration Test Report Management Summary</fo:block>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<fo:block>
|
||||
<xsl:sequence
|
||||
select="
|
||||
concat(upper-case(substring(title, 1, 1)),
|
||||
substring(title, 2),
|
||||
' '[not(last())]
|
||||
)
|
||||
"
|
||||
/>
|
||||
</fo:block>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
<fo:table-row xsl:use-attribute-sets="borders">
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
<fo:table-cell xsl:use-attribute-sets="th">
|
||||
<fo:block>Target<xsl:if test="targets/target[2]">s</xsl:if>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
@@ -116,11 +163,11 @@
|
||||
<xsl:choose>
|
||||
<xsl:when test="targets/target[2]">
|
||||
<!-- more than one target -->
|
||||
<xsl:for-each select="targets/target">
|
||||
<fo:block>
|
||||
<xsl:value-of select="."/>
|
||||
</fo:block>
|
||||
</xsl:for-each>
|
||||
<xsl:for-each select="targets/target">
|
||||
<fo:block>
|
||||
<xsl:value-of select="."/>
|
||||
</fo:block>
|
||||
</xsl:for-each>
|
||||
<!-- end list -->
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
@@ -132,7 +179,7 @@
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
<fo:table-row xsl:use-attribute-sets="borders">
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
<fo:table-cell xsl:use-attribute-sets="th">
|
||||
<fo:block>Version</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
@@ -142,7 +189,7 @@
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
<fo:table-row xsl:use-attribute-sets="borders">
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
<fo:table-cell xsl:use-attribute-sets="th">
|
||||
<fo:block>Pentester<xsl:if test="collaborators/pentesters/pentester[2]"
|
||||
>s</xsl:if></fo:block>
|
||||
</fo:table-cell>
|
||||
@@ -160,9 +207,8 @@
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
<fo:table-row xsl:use-attribute-sets="borders">
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
<fo:block>Author<xsl:if test="$authors[2]"
|
||||
>s</xsl:if></fo:block>
|
||||
<fo:table-cell xsl:use-attribute-sets="th">
|
||||
<fo:block>Author<xsl:if test="$authors[2]">s</xsl:if></fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
<fo:block>
|
||||
@@ -170,13 +216,15 @@
|
||||
<xsl:if test="preceding::v_author">
|
||||
<xsl:text>, </xsl:text>
|
||||
</xsl:if>
|
||||
<fo:inline><xsl:value-of select="."/></fo:inline>
|
||||
<fo:inline>
|
||||
<xsl:value-of select="."/>
|
||||
</fo:inline>
|
||||
</xsl:for-each>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
<fo:table-row xsl:use-attribute-sets="borders">
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
<fo:table-cell xsl:use-attribute-sets="th">
|
||||
<fo:block>Reviewed by</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
@@ -190,7 +238,7 @@
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
<fo:table-row xsl:use-attribute-sets="borders">
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
<fo:table-cell xsl:use-attribute-sets="th">
|
||||
<fo:block>Approved by</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
@@ -218,24 +266,27 @@
|
||||
<fo:table-column column-width="proportional-column-width(25)"
|
||||
xsl:use-attribute-sets="borders"/>
|
||||
<fo:table-body>
|
||||
<fo:table-row xsl:use-attribute-sets="bg-orange borders">
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
<fo:table-row>
|
||||
<fo:table-cell xsl:use-attribute-sets="th">
|
||||
<fo:block>Version</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
<fo:table-cell xsl:use-attribute-sets="th">
|
||||
<fo:block>Date</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
<fo:table-cell xsl:use-attribute-sets="th">
|
||||
<fo:block>Author</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
<fo:table-cell xsl:use-attribute-sets="th">
|
||||
<fo:block>Description</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
<xsl:for-each select="$versions">
|
||||
<!-- todo: guard date format in schema -->
|
||||
<xsl:sort select="xs:dateTime(@date)" order="ascending"/>
|
||||
<fo:table-row xsl:use-attribute-sets="borders">
|
||||
<fo:table-row>
|
||||
<xsl:if test="position() mod 2 != 0">
|
||||
<xsl:attribute name="background-color">#ededed</xsl:attribute>
|
||||
</xsl:if>
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
<fo:block>
|
||||
<xsl:call-template name="VersionNumber">
|
||||
@@ -253,7 +304,9 @@
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
<fo:block>
|
||||
<xsl:for-each select="v_author">
|
||||
<fo:inline><xsl:value-of select="."/></fo:inline>
|
||||
<fo:inline>
|
||||
<xsl:value-of select="."/>
|
||||
</fo:inline>
|
||||
<xsl:if test="following-sibling::v_author">
|
||||
<xsl:text>, </xsl:text>
|
||||
</xsl:if>
|
||||
@@ -276,8 +329,8 @@
|
||||
<xsl:param name="number" select="@number"/>
|
||||
<xsl:choose>
|
||||
<!-- if value is auto, do some autonumbering magic -->
|
||||
<xsl:when test="string(@number)='auto'"> 0.<xsl:number count="version" level="multiple"
|
||||
format="{$AUTO_NUMBERING_FORMAT}"/>
|
||||
<xsl:when test="string(@number) = 'auto'"> 0.<xsl:number count="version"
|
||||
level="multiple" format="{$AUTO_NUMBERING_FORMAT}"/>
|
||||
<!-- this is really unrobust :D - todo: follow fixed numbering if provided -->
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
@@ -290,17 +343,17 @@
|
||||
|
||||
<xsl:template name="Contact">
|
||||
<fo:block xsl:use-attribute-sets="title-4">Contact</fo:block>
|
||||
<fo:block xsl:use-attribute-sets="p">For more information about this Document and its
|
||||
contents please contact <xsl:value-of select="company/full_name"/>
|
||||
<xsl:if test="not(company/full_name[ends-with(.,'.')])"><xsl:text>.</xsl:text></xsl:if></fo:block>
|
||||
<fo:block break-after="page">
|
||||
<fo:block xsl:use-attribute-sets="p" margin-left="0">For more information about this
|
||||
document and its contents please contact <xsl:value-of select="company/full_name"/>
|
||||
<xsl:if test="not(company/full_name[ends-with(., '.')])"
|
||||
><xsl:text>.</xsl:text></xsl:if></fo:block>
|
||||
<fo:block>
|
||||
<fo:table width="100%" table-layout="fixed" xsl:use-attribute-sets="borders">
|
||||
<fo:table-column column-width="proportional-column-width(25)"
|
||||
xsl:use-attribute-sets="bg-orange borders"/>
|
||||
<fo:table-column column-width="proportional-column-width(25)"/>
|
||||
<fo:table-column column-width="proportional-column-width(75)"/>
|
||||
<fo:table-body xsl:use-attribute-sets="borders">
|
||||
<fo:table-row>
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
<fo:table-cell xsl:use-attribute-sets="th">
|
||||
<fo:block>Name</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
@@ -310,7 +363,7 @@
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
<fo:table-row xsl:use-attribute-sets="borders">
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
<fo:table-cell xsl:use-attribute-sets="th">
|
||||
<fo:block>Address</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
@@ -318,7 +371,8 @@
|
||||
<xsl:apply-templates select="company/address"/>
|
||||
</fo:block>
|
||||
<fo:block>
|
||||
<xsl:value-of select="company/postal_code"/> <xsl:value-of select="company/city"/>
|
||||
<xsl:value-of select="company/postal_code"/> <xsl:value-of
|
||||
select="company/city"/>
|
||||
</fo:block>
|
||||
<fo:block>
|
||||
<xsl:value-of select="company/country"/>
|
||||
@@ -326,7 +380,7 @@
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
<fo:table-row xsl:use-attribute-sets="borders">
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
<fo:table-cell xsl:use-attribute-sets="th">
|
||||
<fo:block>Phone</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
@@ -336,7 +390,7 @@
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
<fo:table-row xsl:use-attribute-sets="borders">
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
<fo:table-cell xsl:use-attribute-sets="th">
|
||||
<fo:block>Email</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
@@ -348,6 +402,15 @@
|
||||
</fo:table-body>
|
||||
</fo:table>
|
||||
</fo:block>
|
||||
<fo:block xsl:use-attribute-sets="coc" break-after="page">
|
||||
<xsl:value-of select="company/full_name"/> is registered at the trade register of the
|
||||
Dutch chamber of commerce under number <xsl:value-of select="company/coc"/>. </fo:block>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="subtitle">
|
||||
<xsl:apply-templates/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
||||
@@ -95,9 +95,9 @@
|
||||
</fo:inline>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="prependNumber">
|
||||
<xsl:template name="prependId">
|
||||
<xsl:choose>
|
||||
<xsl:when test="parent::finding">
|
||||
<xsl:when test="parent::finding or parent::non-finding">
|
||||
<!-- prepend finding id (XXX-NNN) -->
|
||||
<xsl:apply-templates select=".." mode="number"/>
|
||||
<xsl:text> — </xsl:text>
|
||||
|
||||
@@ -48,6 +48,8 @@
|
||||
/>-<xsl:call-template name="getString"><xsl:with-param name="stringID" select="'invoice_days'"/></xsl:call-template> <xsl:value-of select="/offerte/meta/offered_service_short"
|
||||
/> <xsl:value-of
|
||||
select="/offerte/meta/permission_parties/client/short_name"/>
|
||||
<xsl:if test="/offerte/meta/client_reference"><xsl:text> </xsl:text>(<xsl:value-of
|
||||
select="/offerte/meta/client_reference"/>)</xsl:if>
|
||||
</description>
|
||||
<fee vat="yes">
|
||||
<xsl:value-of select="/offerte/meta/activityinfo/fee"/>
|
||||
|
||||
@@ -82,7 +82,8 @@
|
||||
<title>Executive Summary</title>
|
||||
<section id="introduction">
|
||||
<title>Introduction</title>
|
||||
<p>Between <p_startdate/> and <p_enddate/>, <company_long/> carried out a penetration test for <client_long/></p>
|
||||
<p>Between <p_startdate/> and <p_enddate/>, <company_long/> carried out a
|
||||
penetration test for <client_long/></p>
|
||||
<p>This report contains our findings as well as detailed explanations of exactly
|
||||
how <company_short/> performed the penetration test.</p>
|
||||
</section>
|
||||
@@ -152,32 +153,28 @@
|
||||
</section>
|
||||
</section>
|
||||
|
||||
<section id="techSummary" inexecsummary="no">
|
||||
<title>Pentest Technical Summary</title>
|
||||
<section id="findings">
|
||||
<title>Findings</title>
|
||||
<section id="findings">
|
||||
<title>Findings</title>
|
||||
|
||||
<p>We have identified the following issues:</p>
|
||||
<xsl:comment> Listing of Findings (written by pentesters) </xsl:comment>
|
||||
<xsl:comment> Extreme </xsl:comment>
|
||||
|
||||
<xsl:comment> High </xsl:comment>
|
||||
|
||||
<xsl:comment> Elevated </xsl:comment>
|
||||
|
||||
<xsl:comment> Moderate </xsl:comment>
|
||||
|
||||
|
||||
<xsl:comment> Low </xsl:comment>
|
||||
</section>
|
||||
|
||||
<section id="nonFindings">
|
||||
<title>Non-Findings</title>
|
||||
<p>In this section we list some of the things that were tried but turned out to
|
||||
be dead ends.</p>
|
||||
<xsl:comment> Listing of Non-Findings (written by pentesters) </xsl:comment>
|
||||
</section>
|
||||
<p>We have identified the following issues:</p>
|
||||
<xsl:comment> Listing of Findings (written by pentesters) </xsl:comment>
|
||||
|
||||
<xsl:comment> Extreme </xsl:comment>
|
||||
|
||||
<xsl:comment> High </xsl:comment>
|
||||
|
||||
<xsl:comment> Elevated </xsl:comment>
|
||||
|
||||
<xsl:comment> Moderate </xsl:comment>
|
||||
|
||||
<xsl:comment> Low </xsl:comment>
|
||||
</section>
|
||||
|
||||
<section id="nonFindings">
|
||||
<title>Non-Findings</title>
|
||||
<p>In this section we list some of the things that were tried but turned out to be
|
||||
dead ends.</p>
|
||||
<xsl:comment> Listing of Non-Findings (written by pentesters) </xsl:comment>
|
||||
</section>
|
||||
|
||||
<xsl:element name="xi:include">
|
||||
|
||||
@@ -7,101 +7,175 @@
|
||||
<xsl:template name="layout-master-set">
|
||||
<!-- Main Page layout structure -->
|
||||
<fo:layout-master-set>
|
||||
<!-- first page -->
|
||||
<fo:simple-page-master master-name="Cover" xsl:use-attribute-sets="PortraitPage">
|
||||
<fo:region-body region-name="region-body" xsl:use-attribute-sets="region-body-cover"/>
|
||||
<fo:region-before region-name="region-before-cover" xsl:use-attribute-sets="region-before-cover"/>
|
||||
<fo:region-after region-name="region-after-cover" xsl:use-attribute-sets="region-after-cover"/>
|
||||
<!-- Cover page -->
|
||||
<fo:simple-page-master master-name="Front-Cover" xsl:use-attribute-sets="PortraitPage">
|
||||
<fo:region-body region-name="cover-flow" xsl:use-attribute-sets="region-body-cover"
|
||||
/>
|
||||
</fo:simple-page-master>
|
||||
<!-- all other pages -->
|
||||
<fo:simple-page-master master-name="Content" xsl:use-attribute-sets="PortraitPage">
|
||||
<fo:region-body region-name="region-body" xsl:use-attribute-sets="region-body-content"/>
|
||||
<fo:region-before region-name="region-before-content" xsl:use-attribute-sets="region-before-content"/>
|
||||
<fo:region-after region-name="region-after-content" xsl:use-attribute-sets="region-after-content"/>
|
||||
<!-- FrontMatter Content Pages (Odd) -->
|
||||
<fo:simple-page-master master-name="Front-Content-odd"
|
||||
xsl:use-attribute-sets="PortraitPage">
|
||||
<fo:region-body region-name="cover-flow"
|
||||
xsl:use-attribute-sets="region-body-content-odd"/>
|
||||
<fo:region-before region-name="region-before-cover"
|
||||
xsl:use-attribute-sets="region-before-content"/>
|
||||
<fo:region-after region-name="region-after-meta"
|
||||
xsl:use-attribute-sets="region-after-content"/>
|
||||
</fo:simple-page-master>
|
||||
<!-- FrontMatter Content Pages (Even) -->
|
||||
<fo:simple-page-master master-name="Front-Content-even"
|
||||
xsl:use-attribute-sets="PortraitPage">
|
||||
<fo:region-body region-name="cover-flow"
|
||||
xsl:use-attribute-sets="region-body-content-even"/>
|
||||
<fo:region-before region-name="region-before-cover"
|
||||
xsl:use-attribute-sets="region-before-content"/>
|
||||
<fo:region-after region-name="region-after-meta"
|
||||
xsl:use-attribute-sets="region-after-content"/>
|
||||
</fo:simple-page-master>
|
||||
<!-- Section Content Pages (Odd) -->
|
||||
<fo:simple-page-master master-name="Section-Content-odd"
|
||||
xsl:use-attribute-sets="PortraitPage">
|
||||
<fo:region-body region-name="region-body"
|
||||
xsl:use-attribute-sets="region-body-content-odd"/>
|
||||
<fo:region-before region-name="region-before-content-odd"
|
||||
xsl:use-attribute-sets="region-before-content-odd"/>
|
||||
<fo:region-after region-name="region-after-content-odd"
|
||||
xsl:use-attribute-sets="region-after-content"/>
|
||||
<fo:region-start region-name="region-start-content-odd"
|
||||
xsl:use-attribute-sets="region-start-content-odd"/>
|
||||
</fo:simple-page-master>
|
||||
<!-- Section Content Pages (Even) (just a change in the margins and footer) -->
|
||||
<fo:simple-page-master master-name="Section-Content-even"
|
||||
xsl:use-attribute-sets="PortraitPage">
|
||||
<fo:region-body region-name="region-body"
|
||||
xsl:use-attribute-sets="region-body-content-even"/>
|
||||
<fo:region-before region-name="region-before-content-even"
|
||||
xsl:use-attribute-sets="region-before-content-even"/>
|
||||
<fo:region-after region-name="region-after-content-even"
|
||||
xsl:use-attribute-sets="region-after-content"/>
|
||||
<fo:region-end region-name="region-end-content-even"
|
||||
xsl:use-attribute-sets="region-end-content-even"/>
|
||||
</fo:simple-page-master>
|
||||
<!-- sequence master -->
|
||||
<fo:page-sequence-master master-name="Report">
|
||||
<fo:page-sequence-master master-name="Cover">
|
||||
<fo:repeatable-page-master-alternatives>
|
||||
<fo:conditional-page-master-reference master-reference="Cover"
|
||||
blank-or-not-blank="not-blank" page-position="first"/>
|
||||
<fo:conditional-page-master-reference master-reference="Content"
|
||||
blank-or-not-blank="not-blank"/>
|
||||
<fo:conditional-page-master-reference master-reference="Front-Cover"
|
||||
page-position="first"/>
|
||||
<fo:conditional-page-master-reference master-reference="Front-Content-odd"
|
||||
page-position="any" odd-or-even="odd"/>
|
||||
<fo:conditional-page-master-reference master-reference="Front-Content-even"
|
||||
page-position="any" odd-or-even="even"/>
|
||||
</fo:repeatable-page-master-alternatives>
|
||||
</fo:page-sequence-master>
|
||||
<fo:page-sequence-master master-name="Sections">
|
||||
<fo:repeatable-page-master-alternatives>
|
||||
<fo:conditional-page-master-reference master-reference="Section-Content-odd"
|
||||
page-position="any" odd-or-even="odd"/>
|
||||
<fo:conditional-page-master-reference master-reference="Section-Content-even"
|
||||
page-position="any" odd-or-even="even"/>
|
||||
</fo:repeatable-page-master-alternatives>
|
||||
</fo:page-sequence-master>
|
||||
</fo:layout-master-set>
|
||||
</xsl:template>
|
||||
|
||||
<!--<xsl:template name="layout-master-set-invoice">
|
||||
<!-\- Main Page layout structure -\->
|
||||
<fo:layout-master-set>
|
||||
<fo:simple-page-master master-name="Content" xsl:use-attribute-sets="PortraitPage">
|
||||
<fo:region-body region-name="region-body" xsl:use-attribute-sets="region-body-content"/>
|
||||
<fo:region-before region-name="region-before-content" xsl:use-attribute-sets="region-before-content"/>
|
||||
<fo:region-after region-name="region-after-content" xsl:use-attribute-sets="region-after-content"/>
|
||||
</fo:simple-page-master>
|
||||
<!-\- sequence master -\->
|
||||
<fo:page-sequence-master master-name="Invoice">
|
||||
<fo:repeatable-page-master-alternatives>
|
||||
<fo:conditional-page-master-reference master-reference="Content"
|
||||
blank-or-not-blank="not-blank"/>
|
||||
</fo:repeatable-page-master-alternatives>
|
||||
</fo:page-sequence-master>
|
||||
</fo:layout-master-set>
|
||||
</xsl:template>-->
|
||||
|
||||
<xsl:template name="page_header">
|
||||
<fo:static-content flow-name="region-before-cover" xsl:use-attribute-sets="HeaderFont">
|
||||
<fo:block xsl:use-attribute-sets="header">
|
||||
<xsl:value-of select="/pentest_report/meta/classification"/>
|
||||
</fo:block>
|
||||
</fo:static-content>
|
||||
<fo:static-content flow-name="region-before-content" xsl:use-attribute-sets="HeaderFont">
|
||||
<fo:block xsl:use-attribute-sets="header">
|
||||
<xsl:value-of select="/pentest_report/meta/classification"/>
|
||||
</fo:block>
|
||||
</fo:static-content>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template name="page_footer">
|
||||
<fo:static-content flow-name="region-after-cover" xsl:use-attribute-sets="FooterFont">
|
||||
<fo:block xsl:use-attribute-sets="footer">
|
||||
<fo:page-number/>/<fo:page-number-citation ref-id="EndOfDoc"/>
|
||||
<fo:static-content flow-name="region-after-content-odd" xsl:use-attribute-sets="FooterFont">
|
||||
<fo:block xsl:use-attribute-sets="footer-odd">
|
||||
<fo:retrieve-marker retrieve-class-name="tab"/>
|
||||
<fo:leader leader-pattern="space"/>
|
||||
<fo:inline xsl:use-attribute-sets="TinyFont"><xsl:value-of
|
||||
select="*/meta/company/full_name"/><xsl:text> - </xsl:text>
|
||||
<xsl:call-template name="getString">
|
||||
<xsl:with-param name="stringID" select="'page_kvk'"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="*/meta/company/coc"/></fo:inline>
|
||||
<fo:inline>
|
||||
<fo:page-number/>
|
||||
</fo:inline>
|
||||
</fo:block>
|
||||
</fo:static-content>
|
||||
<fo:static-content flow-name="region-after-content" xsl:use-attribute-sets="FooterFont">
|
||||
<fo:block xsl:use-attribute-sets="footer">
|
||||
<fo:page-number/>/<fo:page-number-citation ref-id="EndOfDoc"/>
|
||||
<fo:static-content flow-name="region-after-content-even" xsl:use-attribute-sets="FooterFont">
|
||||
<fo:block xsl:use-attribute-sets="footer-even">
|
||||
<fo:inline>
|
||||
<fo:page-number/>
|
||||
</fo:inline>
|
||||
<fo:leader leader-pattern="space"/>
|
||||
<fo:inline xsl:use-attribute-sets="TinyFont"><xsl:value-of
|
||||
select="*/meta/company/full_name"/><xsl:text> - </xsl:text>
|
||||
<xsl:call-template name="getString">
|
||||
<xsl:with-param name="stringID" select="'page_kvk'"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="*/meta/company/coc"/></fo:inline>
|
||||
<xsl:value-of select="//meta/company/full_name"/>
|
||||
</fo:block>
|
||||
</fo:static-content>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="Content">
|
||||
<fo:page-sequence master-reference="Report">
|
||||
|
||||
<xsl:template name="meta_footer">
|
||||
<fo:static-content flow-name="region-after-meta" xsl:use-attribute-sets="FooterFont">
|
||||
<fo:block> </fo:block>
|
||||
</fo:static-content>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="page_header">
|
||||
<fo:static-content flow-name="region-before-content-odd" xsl:use-attribute-sets="FooterFont">
|
||||
<fo:block xsl:use-attribute-sets="header-odd"><xsl:value-of select="//meta/classification"/>
|
||||
</fo:block>
|
||||
</fo:static-content>
|
||||
|
||||
<fo:static-content flow-name="region-before-content-even" xsl:use-attribute-sets="FooterFont">
|
||||
<fo:block>
|
||||
</fo:block>
|
||||
</fo:static-content>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="footerlogo">
|
||||
<fo:static-content flow-name="region-start-content-odd">
|
||||
<fo:block>
|
||||
<fo:block-container xsl:use-attribute-sets="footerlogo">
|
||||
<fo:block>
|
||||
<fo:external-graphic src="../graphics/logo_footer.png"/>
|
||||
</fo:block>
|
||||
</fo:block-container>
|
||||
</fo:block>
|
||||
</fo:static-content>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="FrontMatter">
|
||||
<xsl:param name="execsummary" tunnel="yes"/>
|
||||
<fo:page-sequence master-reference="Cover">
|
||||
<xsl:call-template name="page_header"/>
|
||||
<xsl:call-template name="page_footer"/>
|
||||
<fo:flow flow-name="region-body" xsl:use-attribute-sets="DefaultFont">
|
||||
<xsl:call-template name="meta_footer"/>
|
||||
<fo:flow flow-name="cover-flow" xsl:use-attribute-sets="DefaultFont">
|
||||
<fo:block>
|
||||
<xsl:apply-templates select="pentest_report|offerte|quickscope|generic_document|contract"/>
|
||||
<xsl:apply-templates select="/*/meta" mode="frontmatter"/>
|
||||
<xsl:apply-templates select="/*/generate_index"/>
|
||||
</fo:block>
|
||||
<fo:block id="EndOfDoc"/>
|
||||
</fo:flow>
|
||||
</fo:page-sequence>
|
||||
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="Content">
|
||||
<xsl:param name="execsummary" tunnel="yes"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$execsummary = true()">
|
||||
<xsl:for-each
|
||||
select="/*/section[@inexecsummary = 'yes'] | /*/appendix[@inexecsummary = 'yes']">
|
||||
<xsl:call-template name="generate_pages"/>
|
||||
</xsl:for-each>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:for-each select="/*/section | /*/appendix">
|
||||
<xsl:call-template name="generate_pages"/>
|
||||
</xsl:for-each>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="generate_pages">
|
||||
<xsl:param name="execsummary" tunnel="yes"/>
|
||||
<fo:page-sequence master-reference="Sections">
|
||||
<xsl:call-template name="page_header"/>
|
||||
<xsl:call-template name="page_footer"/>
|
||||
<xsl:call-template name="footerlogo"/>
|
||||
<fo:flow flow-name="region-body" xsl:use-attribute-sets="DefaultFont">
|
||||
<fo:block>
|
||||
<xsl:apply-templates select="."/>
|
||||
</fo:block>
|
||||
<xsl:if test="not(following-sibling::*)">
|
||||
<fo:block id="EndOfDoc"/>
|
||||
</xsl:if>
|
||||
</fo:flow>
|
||||
</fo:page-sequence>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
||||
135
xml/xslt/pages_flimsy.xslt
Normal file
@@ -0,0 +1,135 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fo="http://www.w3.org/1999/XSL/Format"
|
||||
exclude-result-prefixes="xs" version="2.0">
|
||||
|
||||
<xsl:template name="layout-master-set-flimsy">
|
||||
<!-- Invoices, Ratecards and Contracts need their own page layout; quite different from other docs so just create a different set -->
|
||||
<fo:layout-master-set>
|
||||
<!-- first page -->
|
||||
<fo:simple-page-master master-name="Flimsy-First" xsl:use-attribute-sets="PortraitPage">
|
||||
<fo:region-body region-name="region-body" xsl:use-attribute-sets="region-body-first"/>
|
||||
<fo:region-before region-name="region-before-first"
|
||||
xsl:use-attribute-sets="region-before-first"/>
|
||||
<fo:region-after region-name="region-after-first"
|
||||
xsl:use-attribute-sets="region-after-first"/>
|
||||
</fo:simple-page-master>
|
||||
<!-- all other pages -->
|
||||
<fo:simple-page-master master-name="Flimsy-Rest" xsl:use-attribute-sets="PortraitPage">
|
||||
<fo:region-body region-name="region-body" xsl:use-attribute-sets="region-body-rest"/>
|
||||
<fo:region-before region-name="region-before-rest"
|
||||
xsl:use-attribute-sets="region-before-rest"/>
|
||||
<fo:region-after region-name="region-after-rest"
|
||||
xsl:use-attribute-sets="region-after-rest"/>
|
||||
</fo:simple-page-master>
|
||||
<!-- sequence master -->
|
||||
<fo:page-sequence-master master-name="Flimsy">
|
||||
<fo:repeatable-page-master-alternatives>
|
||||
<fo:conditional-page-master-reference master-reference="Flimsy-First"
|
||||
blank-or-not-blank="not-blank" page-position="first"/>
|
||||
<fo:conditional-page-master-reference master-reference="Flimsy-Rest"
|
||||
blank-or-not-blank="not-blank"/>
|
||||
</fo:repeatable-page-master-alternatives>
|
||||
</fo:page-sequence-master>
|
||||
</fo:layout-master-set>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="page_header">
|
||||
<fo:static-content flow-name="region-before-first" xsl:use-attribute-sets="HeaderFont">
|
||||
<fo:block>
|
||||
<fo:table width="100%" table-layout="fixed">
|
||||
<fo:table-column column-width="proportional-column-width(40)"/>
|
||||
<fo:table-column column-width="proportional-column-width(20)"/>
|
||||
<fo:table-column column-width="proportional-column-width(40)"/>
|
||||
<fo:table-body>
|
||||
<fo:table-row>
|
||||
<fo:table-cell text-align="right" display-align="after"
|
||||
padding-bottom="5mm">
|
||||
<fo:block xsl:use-attribute-sets="TinyFont">
|
||||
<fo:block xsl:use-attribute-sets="bold main-color">
|
||||
<xsl:value-of select="/*/meta/company/full_name"/>
|
||||
</fo:block>
|
||||
<fo:block>
|
||||
<xsl:value-of select="/*/meta/company/address"/>
|
||||
</fo:block>
|
||||
<fo:block><xsl:value-of select="/*/meta/company/postal_code"
|
||||
/> <xsl:value-of select="/*/meta/company/city"
|
||||
/></fo:block>
|
||||
<fo:block>
|
||||
<xsl:value-of select="/*/meta/company/country"/>
|
||||
</fo:block>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell text-align="center">
|
||||
<fo:block>
|
||||
<fo:external-graphic xsl:use-attribute-sets="logo"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell display-align="after" padding-bottom="5mm">
|
||||
<fo:block xsl:use-attribute-sets="TinyFont">
|
||||
<fo:block xsl:use-attribute-sets="bold main-color">
|
||||
<xsl:value-of select="/*/meta/company/website"/>
|
||||
</fo:block>
|
||||
<fo:block>
|
||||
<xsl:value-of select="/*/meta/company/email"/>
|
||||
</fo:block>
|
||||
<fo:block>
|
||||
<xsl:call-template name="getString">
|
||||
<xsl:with-param name="stringID" select="'page_kvk'"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="/*/meta/company/coc"/>
|
||||
</fo:block>
|
||||
<fo:block>
|
||||
<xsl:call-template name="getString">
|
||||
<xsl:with-param name="stringID" select="'invoice_vatno'"
|
||||
/>
|
||||
</xsl:call-template>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="/*/meta/company/vat_no"/>
|
||||
</fo:block>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
</fo:table-body>
|
||||
</fo:table>
|
||||
</fo:block>
|
||||
</fo:static-content>
|
||||
<fo:static-content flow-name="region-before-rest" xsl:use-attribute-sets="HeaderFont">
|
||||
<fo:block xsl:use-attribute-sets="header"/>
|
||||
</fo:static-content>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="page_footer">
|
||||
<fo:static-content flow-name="region-after-first" xsl:use-attribute-sets="FooterFont">
|
||||
<fo:block xsl:use-attribute-sets="footer">
|
||||
<fo:inline xsl:use-attribute-sets="TinyFont main-color">
|
||||
<xsl:call-template name="getString">
|
||||
<xsl:with-param name="stringID" select="'invoice_yaygreen'"/>
|
||||
</xsl:call-template>
|
||||
</fo:inline>
|
||||
<fo:block/>
|
||||
<fo:inline xsl:use-attribute-sets="TinyFont main-color">
|
||||
<xsl:call-template name="getString">
|
||||
<xsl:with-param name="stringID" select="'invoice_terms'"/>
|
||||
</xsl:call-template>
|
||||
</fo:inline>
|
||||
</fo:block>
|
||||
</fo:static-content>
|
||||
<fo:static-content flow-name="region-after-rest" xsl:use-attribute-sets="FooterFont">
|
||||
<fo:block xsl:use-attribute-sets="footer">
|
||||
<fo:inline xsl:use-attribute-sets="TinyFont main-color">
|
||||
<xsl:call-template name="getString">
|
||||
<xsl:with-param name="stringID" select="'invoice_yaygreen'"/>
|
||||
</xsl:call-template>
|
||||
</fo:inline>
|
||||
<fo:block/>
|
||||
<fo:inline xsl:use-attribute-sets="TinyFont main-color">
|
||||
<xsl:call-template name="getString">
|
||||
<xsl:with-param name="stringID" select="'invoice_terms'"/>
|
||||
</xsl:call-template>
|
||||
</fo:inline>
|
||||
</fo:block>
|
||||
</fo:static-content>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
686
xml/xslt/piecharts.xslt
Normal file
@@ -0,0 +1,686 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fo="http://www.w3.org/1999/XSL/Format"
|
||||
xmlns:svg="http://www.w3.org/2000/svg" xmlns:math="http://www.w3.org/2005/xpath-functions/math"
|
||||
xmlns:my="http://www.radical.sexy" exclude-result-prefixes="xs math" version="2.0">
|
||||
<xsl:template match="generate_piechart">
|
||||
<xsl:choose>
|
||||
<xsl:when test="//finding">
|
||||
<!-- only generate pie chart if there are findings in the report - otherwise we get into trouble with empty percentages and divisions by zero -->
|
||||
<xsl:call-template name="do_generate_piechart">
|
||||
<xsl:with-param name="pieAttr" select="@pieAttr"/>
|
||||
<xsl:with-param name="pieElem" select="@pieElem"/>
|
||||
<xsl:with-param name="pieHeight" select="@pieHeight"/>
|
||||
<xsl:with-param name="status" select="@status"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<fo:block xsl:use-attribute-sets="errortext">Pie chart can only be generated when
|
||||
there are findings in the report. Get to work! ;)</fo:block>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="do_generate_piechart">
|
||||
<!-- Get the numbers -->
|
||||
<!-- generate_piechart @type="type" or "threatLevel" -->
|
||||
<xsl:param name="pieAttr" select="@pieAttr"/>
|
||||
<xsl:param name="pieElem" select="@pieElem"/>
|
||||
<xsl:param name="pieHeight" as="xs:integer" select="@pieHeight"/>
|
||||
<xsl:param name="status" select="@status"/>
|
||||
<xsl:variable name="statusSequence" as="item()*">
|
||||
<xsl:for-each select="$status">
|
||||
<xsl:for-each select="tokenize(., ' ')">
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:for-each>
|
||||
</xsl:for-each>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="pieTotal">
|
||||
<xsl:choose>
|
||||
<xsl:when test="not(@status)">
|
||||
<xsl:value-of select="count(//*[local-name() = $pieElem])"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of
|
||||
select="count(//*[local-name() = $pieElem][@status = $statusSequence])"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<!-- Create generic nodeset with values -->
|
||||
<xsl:variable name="unsortedPieTable">
|
||||
<xsl:choose>
|
||||
<xsl:when test="not(@status)">
|
||||
<xsl:for-each-group select="//*[local-name() = $pieElem]"
|
||||
group-by="@*[name() = $pieAttr]">
|
||||
<pieEntry>
|
||||
<pieEntryLabel>
|
||||
<xsl:value-of select="current-grouping-key()"/>
|
||||
</pieEntryLabel>
|
||||
<pieEntryCount>
|
||||
<xsl:value-of
|
||||
select="count(//*[local-name() = $pieElem][@*[name() = $pieAttr]][@* = current-grouping-key()])"
|
||||
/>
|
||||
</pieEntryCount>
|
||||
</pieEntry>
|
||||
</xsl:for-each-group>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:for-each-group
|
||||
select="//*[local-name() = $pieElem][@status = $statusSequence]"
|
||||
group-by="@*[name() = $pieAttr]">
|
||||
<pieEntry>
|
||||
<pieEntryLabel>
|
||||
<xsl:value-of select="current-grouping-key()"/>
|
||||
</pieEntryLabel>
|
||||
<pieEntryCount>
|
||||
<xsl:value-of
|
||||
select="count(//*[local-name() = $pieElem][@*[name() = $pieAttr]][@status = $statusSequence][@* = current-grouping-key()])"
|
||||
/>
|
||||
</pieEntryCount>
|
||||
</pieEntry>
|
||||
</xsl:for-each-group>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="pieHeightHalf" as="xs:double" select="$pieHeight div 2"/>
|
||||
<!-- Now we need to sort that pieTable - custom order for threat levels, 'count' descending order for all other types -->
|
||||
<xsl:variable name="pieTable">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$pieElem = 'finding' and $pieAttr = 'threatLevel'">
|
||||
<xsl:for-each select="$unsortedPieTable/pieEntry">
|
||||
<xsl:sort data-type="number" order="descending"
|
||||
select="
|
||||
(number(pieEntryLabel = 'Extreme') * 10)
|
||||
+ (number(pieEntryLabel = 'High') * 9)
|
||||
+ (number(pieEntryLabel = 'Elevated') * 8)
|
||||
+ (number(pieEntryLabel = 'Moderate') * 7)
|
||||
+ (number(pieEntryLabel = 'Low') * 6)
|
||||
+ (number(pieEntryLabel = 'Unknown') * 3)
|
||||
+ (number(pieEntryLabel = 'N/A') * 1)"/>
|
||||
<pieEntry>
|
||||
<pieEntryLabel>
|
||||
<xsl:value-of select="pieEntryLabel"/>
|
||||
</pieEntryLabel>
|
||||
<pieEntryCount>
|
||||
<xsl:value-of select="pieEntryCount"/>
|
||||
</pieEntryCount>
|
||||
</pieEntry>
|
||||
</xsl:for-each>
|
||||
</xsl:when>
|
||||
<xsl:when test="$pieElem = 'finding' and $pieAttr = 'status'">
|
||||
<xsl:for-each select="$unsortedPieTable/pieEntry">
|
||||
<xsl:sort data-type="number" order="descending"
|
||||
select="
|
||||
(number(pieEntryLabel = 'new') * 10)
|
||||
+ (number(pieEntryLabel = 'unresolved') * 9)
|
||||
+ (number(pieEntryLabel = 'not_retested') * 8)
|
||||
+ (number(pieEntryLabel = 'resolved') * 7)"/>
|
||||
<pieEntry>
|
||||
<pieEntryLabel>
|
||||
<xsl:value-of select="pieEntryLabel"/>
|
||||
</pieEntryLabel>
|
||||
<pieEntryCount>
|
||||
<xsl:value-of select="pieEntryCount"/>
|
||||
</pieEntryCount>
|
||||
</pieEntry>
|
||||
</xsl:for-each>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:for-each select="$unsortedPieTable/pieEntry">
|
||||
<xsl:sort data-type="number" order="descending" select="pieEntryCount"/>
|
||||
<pieEntry>
|
||||
<pieEntryLabel>
|
||||
<xsl:value-of select="pieEntryLabel"/>
|
||||
</pieEntryLabel>
|
||||
<pieEntryCount>
|
||||
<xsl:value-of select="pieEntryCount"/>
|
||||
</pieEntryCount>
|
||||
</pieEntry>
|
||||
</xsl:for-each>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
</xsl:variable>
|
||||
<xsl:variable name="no_entries" select="count($pieTable/pieEntry)"/>
|
||||
<xsl:for-each select="$pieTable">
|
||||
<fo:block xsl:use-attribute-sets="p">
|
||||
<fo:table margin-top="15px" xsl:use-attribute-sets="fwtable">
|
||||
<!-- need some margin to make space for percentages that can't fit in the pie... -->
|
||||
<fo:table-column column-width="{$pieHeight + 50}px"/>
|
||||
<fo:table-column column-width="proportional-column-width(1)"/>
|
||||
<fo:table-body>
|
||||
<fo:table-row keep-together.within-column="always">
|
||||
<fo:table-cell xsl:use-attribute-sets="td indent_reset">
|
||||
<fo:block>
|
||||
<fo:instream-foreign-object
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<!--set the display-->
|
||||
<svg:svg>
|
||||
<!-- width and height of the viewport -->
|
||||
<xsl:attribute name="width">
|
||||
<xsl:value-of select="$pieHeight + 15"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="height">
|
||||
<xsl:value-of select="$pieHeight + 15"/>
|
||||
</xsl:attribute>
|
||||
<!-- viewBox to scale -->
|
||||
<xsl:attribute name="viewBox">
|
||||
<!-- start viewbox 15px to the left and make it 15px larger to catch svg's cutoff text -->
|
||||
<xsl:value-of
|
||||
select="concat('-15 0 ', $pieHeight + 15 + 15, ' ', $pieHeight + 15)"
|
||||
/>
|
||||
</xsl:attribute>
|
||||
<!--call the template starting at the last slice-->
|
||||
<xsl:call-template name="pie_chart_slice">
|
||||
<xsl:with-param name="pieTotal" select="$pieTotal"/>
|
||||
<xsl:with-param name="no_entries"
|
||||
select="$no_entries"/>
|
||||
<xsl:with-param name="position" select="$no_entries"/>
|
||||
<xsl:with-param name="middle_x"
|
||||
select="$pieHeightHalf"/>
|
||||
<xsl:with-param name="middle_y"
|
||||
select="$pieHeightHalf"/>
|
||||
<xsl:with-param name="move_x" select="0"/>
|
||||
<xsl:with-param name="radius"
|
||||
select="$pieHeightHalf div 100 * 85"/>
|
||||
</xsl:call-template>
|
||||
</svg:svg>
|
||||
</fo:instream-foreign-object>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<!-- PIE CHART LEGEND -->
|
||||
<fo:table-cell>
|
||||
<fo:block>
|
||||
<fo:table xsl:use-attribute-sets="pieLegendTable fwtable">
|
||||
<fo:table-column column-width="22px"/>
|
||||
<fo:table-column column-width="proportional-column-width(1)"/>
|
||||
<fo:table-body>
|
||||
<xsl:for-each select="$pieTable/pieEntry">
|
||||
<xsl:variable name="pieEntryLabelClean"
|
||||
select="translate(pieEntryLabel, '/', '_')"/>
|
||||
<xsl:variable name="pieEntryLabel">
|
||||
<xsl:sequence
|
||||
select="
|
||||
string-join(for $x in tokenize(pieEntryLabel, '_')
|
||||
return
|
||||
my:titleCase($x), ' ')"
|
||||
/>
|
||||
</xsl:variable>
|
||||
<fo:table-row>
|
||||
<fo:table-cell
|
||||
xsl:use-attribute-sets="pieLegendTableCell">
|
||||
<fo:block>
|
||||
<fo:instream-foreign-object>
|
||||
<svg:svg height="13" width="13">
|
||||
<svg:rect stroke="#706f6f" stroke-width="1"
|
||||
stroke-linejoin="round" height="11" width="11">
|
||||
<xsl:attribute name="fill">
|
||||
<xsl:call-template name="selectColor">
|
||||
<xsl:with-param name="position"
|
||||
select="position()"/>
|
||||
<xsl:with-param name="label"
|
||||
select="pieEntryLabel"/>
|
||||
</xsl:call-template>
|
||||
</xsl:attribute>
|
||||
</svg:rect>
|
||||
</svg:svg>
|
||||
</fo:instream-foreign-object>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell
|
||||
xsl:use-attribute-sets="pieLegendTableCell">
|
||||
<fo:block>
|
||||
<xsl:value-of select="$pieEntryLabel"/>
|
||||
<xsl:text> (</xsl:text>
|
||||
<!-- for threatLevel legend, link to finding summary table -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="$pieAttr = 'threatLevel'">
|
||||
<fo:basic-link xsl:use-attribute-sets="link">
|
||||
<xsl:attribute name="internal-destination"
|
||||
>summaryTableThreatLevel<xsl:value-of
|
||||
select="$pieEntryLabelClean"/></xsl:attribute>
|
||||
<xsl:value-of select="pieEntryCount"/>
|
||||
</fo:basic-link>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="pieEntryCount"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:text>)</xsl:text>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
</xsl:for-each>
|
||||
</fo:table-body>
|
||||
</fo:table>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
</fo:table-body>
|
||||
</fo:table>
|
||||
|
||||
</fo:block>
|
||||
</xsl:for-each>
|
||||
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="pie_chart_slice">
|
||||
<xsl:param name="pieTotal"/>
|
||||
<xsl:param name="position"/>
|
||||
<xsl:param name="no_entries"/>
|
||||
<xsl:param name="middle_x"/>
|
||||
<xsl:param name="middle_y"/>
|
||||
<xsl:param name="move_x"/>
|
||||
<xsl:param name="radius"/>
|
||||
<!--prepare the middle part of the arc command-->
|
||||
<xsl:variable name="middle" select="concat('M', ' ', $middle_x, ',', $middle_y)"/>
|
||||
<xsl:variable name="part" as="xs:double"
|
||||
select="sum(//pieEntry[position() <= $position]/pieEntryCount)"/>
|
||||
<!-- sum of pieEntryCounts up to this point -->
|
||||
<xsl:variable name="angle" select="($part div $pieTotal) * 360"/>
|
||||
<xsl:variable name="x" select="math:sin(3.1415292 * $angle div 180.0) * $radius"/>
|
||||
<xsl:variable name="y" select="math:cos(3.1415292 * $angle div 180.0) * $radius"/>
|
||||
<xsl:variable name="move_y" select="-$radius"/>
|
||||
<xsl:variable name="first_line" select="concat('l', ' ', $move_x, ',', $move_y)"/>
|
||||
<xsl:variable name="arc_move1" select="'0'"/>
|
||||
<xsl:variable name="arc_move2">
|
||||
<xsl:choose>
|
||||
<!--check the direction of the arc: inward or outward-->
|
||||
<xsl:when test="$angle <= 180">0</xsl:when>
|
||||
<xsl:otherwise>1</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="arc_move3" select="'1'"/>
|
||||
<xsl:variable name="arc_move" select="concat($arc_move1, ' ', $arc_move2, ',', $arc_move3)"/>
|
||||
<xsl:variable name="d"
|
||||
select="concat($middle, ' ', $first_line, ' ', 'a ', $radius, ',', $radius, ' ', $arc_move, ' ', $x, ',', $radius - $y, ' ', 'z')"/>
|
||||
<!--put it all together-->
|
||||
<svg:path stroke="white" stroke-width="1" stroke-linejoin="round">
|
||||
<xsl:attribute name="fill">
|
||||
<xsl:call-template name="selectColor">
|
||||
<xsl:with-param name="position" select="$position"/>
|
||||
<xsl:with-param name="label"
|
||||
select="//pieEntry[position() = $position]/pieEntryLabel"/>
|
||||
</xsl:call-template>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="d">
|
||||
<xsl:value-of select="$d"/>
|
||||
</xsl:attribute>
|
||||
</svg:path>
|
||||
<!--now the percentage-->
|
||||
<xsl:variable name="percentage" as="xs:double"
|
||||
select="(//pieEntry[position() = $position]/pieEntryCount div sum(//pieEntry/pieEntryCount)) * 100"/>
|
||||
<xsl:variable name="part_half" as="xs:double"
|
||||
select="(//pieEntry[position() = $position]/pieEntryCount div sum(//pieEntry/pieEntryCount)) div 2 * 360"/>
|
||||
<xsl:variable name="text_angle" as="xs:double"
|
||||
select="$angle - $part_half"/>
|
||||
<xsl:variable name="text_x"
|
||||
select="math:sin(3.1415292 * (($angle - $part_half) div 180.0)) * ($radius * 0.8)"/>
|
||||
<xsl:variable name="text_y"
|
||||
select="math:cos(3.1415292 * (($angle - $part_half) div 180.0)) * ($radius * 0.8)"/>
|
||||
<xsl:variable name="text_line_x"
|
||||
select="math:sin(3.1415292 * (($angle - $part_half) div 180.0)) * ($radius * 1.15)"/>
|
||||
<xsl:variable name="text_line_y"
|
||||
select="math:cos(3.1415292 * (($angle - $part_half) div 180.0)) * ($radius * 1.15)"/>
|
||||
<!--we either put it on the edge of the pie directly or have a line pointing into the slice, depending on how thick the slice is-->
|
||||
<xsl:choose>
|
||||
<xsl:when test="$percentage >= 3.5">
|
||||
<!--on the edge-->
|
||||
<svg:text xsl:use-attribute-sets="PieFont">
|
||||
<xsl:attribute name="x">
|
||||
<xsl:choose>
|
||||
<!-- try for some better placement of percentages than the standard -->
|
||||
<xsl:when test="$text_angle <= 22.5"><xsl:value-of select="$middle_x + $text_line_x"/>
|
||||
<xsl:call-template name="piechartdebug">
|
||||
<xsl:with-param name="text_angle" select="$text_angle"></xsl:with-param>
|
||||
<xsl:with-param name="percentage" select="$percentage"></xsl:with-param>
|
||||
<xsl:with-param name="part_half" select="$part_half"></xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:when test="$text_angle <= 45 and $text_angle > 22.5"><xsl:value-of select="$middle_x + $text_line_x"/>
|
||||
<xsl:call-template name="piechartdebug">
|
||||
<xsl:with-param name="text_angle" select="$text_angle"></xsl:with-param>
|
||||
<xsl:with-param name="percentage" select="$percentage"></xsl:with-param>
|
||||
<xsl:with-param name="part_half" select="$part_half"></xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:when test="$text_angle <= 67.5 and $text_angle > 45"><xsl:value-of select="$middle_x + $text_line_x -8"/>
|
||||
<xsl:call-template name="piechartdebug">
|
||||
<xsl:with-param name="text_angle" select="$text_angle"></xsl:with-param>
|
||||
<xsl:with-param name="percentage" select="$percentage"></xsl:with-param>
|
||||
<xsl:with-param name="part_half" select="$part_half"></xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:when test="$text_angle <= 85 and $text_angle > 67.5"><xsl:value-of select="$middle_x + $text_line_x -8"/>
|
||||
<xsl:call-template name="piechartdebug">
|
||||
<xsl:with-param name="text_angle" select="$text_angle"></xsl:with-param>
|
||||
<xsl:with-param name="percentage" select="$percentage"></xsl:with-param>
|
||||
<xsl:with-param name="part_half" select="$part_half"></xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:when test="$text_angle <= 95 and $text_angle > 85"><xsl:value-of select="$middle_x + $text_line_x -8"/>
|
||||
<xsl:call-template name="piechartdebug">
|
||||
<xsl:with-param name="text_angle" select="$text_angle"></xsl:with-param>
|
||||
<xsl:with-param name="percentage" select="$percentage"></xsl:with-param>
|
||||
<xsl:with-param name="part_half" select="$part_half"></xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:when test="$text_angle <= 112.5 and $text_angle > 95"><xsl:value-of select="$middle_x + $text_line_x -8"/>
|
||||
<xsl:call-template name="piechartdebug">
|
||||
<xsl:with-param name="text_angle" select="$text_angle"></xsl:with-param>
|
||||
<xsl:with-param name="percentage" select="$percentage"></xsl:with-param>
|
||||
<xsl:with-param name="part_half" select="$part_half"></xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:when test="$text_angle <= 135 and $text_angle > 112.5"><xsl:value-of select="$middle_x + $text_line_x -8"/>
|
||||
<xsl:call-template name="piechartdebug">
|
||||
<xsl:with-param name="text_angle" select="$text_angle"></xsl:with-param>
|
||||
<xsl:with-param name="percentage" select="$percentage"></xsl:with-param>
|
||||
<xsl:with-param name="part_half" select="$part_half"></xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:when test="$text_angle <= 157.5 and $text_angle > 135"><xsl:value-of select="$middle_x + $text_line_x"/>
|
||||
<xsl:call-template name="piechartdebug">
|
||||
<xsl:with-param name="text_angle" select="$text_angle"></xsl:with-param>
|
||||
<xsl:with-param name="percentage" select="$percentage"></xsl:with-param>
|
||||
<xsl:with-param name="part_half" select="$part_half"></xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:when test="$text_angle <= 180 and $text_angle > 157.5"><xsl:value-of select="$middle_x + $text_line_x"/>
|
||||
<xsl:call-template name="piechartdebug">
|
||||
<xsl:with-param name="text_angle" select="$text_angle"></xsl:with-param>
|
||||
<xsl:with-param name="percentage" select="$percentage"></xsl:with-param>
|
||||
<xsl:with-param name="part_half" select="$part_half"></xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:when test="$text_angle <= 202.5 and $text_angle > 180"><xsl:value-of select="$middle_x + $text_line_x"/>
|
||||
<xsl:call-template name="piechartdebug">
|
||||
<xsl:with-param name="text_angle" select="$text_angle"></xsl:with-param>
|
||||
<xsl:with-param name="percentage" select="$percentage"></xsl:with-param>
|
||||
<xsl:with-param name="part_half" select="$part_half"></xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:when test="$text_angle <= 225 and $text_angle > 202.5"><xsl:value-of select="$middle_x + $text_line_x"/>
|
||||
<xsl:call-template name="piechartdebug">
|
||||
<xsl:with-param name="text_angle" select="$text_angle"></xsl:with-param>
|
||||
<xsl:with-param name="percentage" select="$percentage"></xsl:with-param>
|
||||
<xsl:with-param name="part_half" select="$part_half"></xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:when test="$text_angle <= 247.5 and $text_angle > 225"><xsl:value-of select="$middle_x + $text_line_x +8"/>
|
||||
<xsl:call-template name="piechartdebug">
|
||||
<xsl:with-param name="text_angle" select="$text_angle"></xsl:with-param>
|
||||
<xsl:with-param name="percentage" select="$percentage"></xsl:with-param>
|
||||
<xsl:with-param name="part_half" select="$part_half"></xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:when test="$text_angle <= 265 and $text_angle > 247.5"><xsl:value-of select="$middle_x + $text_line_x +8"/>
|
||||
<xsl:call-template name="piechartdebug">
|
||||
<xsl:with-param name="text_angle" select="$text_angle"></xsl:with-param>
|
||||
<xsl:with-param name="percentage" select="$percentage"></xsl:with-param>
|
||||
<xsl:with-param name="part_half" select="$part_half"></xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:when test="$text_angle <= 275 and $text_angle > 265"><xsl:value-of select="$middle_x + $text_line_x +8"/>
|
||||
<xsl:call-template name="piechartdebug">
|
||||
<xsl:with-param name="text_angle" select="$text_angle"></xsl:with-param>
|
||||
<xsl:with-param name="percentage" select="$percentage"></xsl:with-param>
|
||||
<xsl:with-param name="part_half" select="$part_half"></xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:when test="$text_angle <= 292.5 and $text_angle > 275"><xsl:value-of select="$middle_x + $text_line_x +8"/>
|
||||
<xsl:call-template name="piechartdebug">
|
||||
<xsl:with-param name="text_angle" select="$text_angle"></xsl:with-param>
|
||||
<xsl:with-param name="percentage" select="$percentage"></xsl:with-param>
|
||||
<xsl:with-param name="part_half" select="$part_half"></xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:when test="$text_angle <= 315 and $text_angle > 292.5"><xsl:value-of select="$middle_x + $text_line_x +6"/>
|
||||
<xsl:call-template name="piechartdebug">
|
||||
<xsl:with-param name="text_angle" select="$text_angle"></xsl:with-param>
|
||||
<xsl:with-param name="percentage" select="$percentage"></xsl:with-param>
|
||||
<xsl:with-param name="part_half" select="$part_half"></xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:when test="$text_angle <= 337.5 and $text_angle > 315"><xsl:value-of select="$middle_x + $text_line_x"/>
|
||||
<xsl:call-template name="piechartdebug">
|
||||
<xsl:with-param name="text_angle" select="$text_angle"></xsl:with-param>
|
||||
<xsl:with-param name="percentage" select="$percentage"></xsl:with-param>
|
||||
<xsl:with-param name="part_half" select="$part_half"></xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:when test="$text_angle <= 360 and $text_angle > 337.5"><xsl:value-of select="$middle_x + $text_line_x"/>
|
||||
<xsl:call-template name="piechartdebug">
|
||||
<xsl:with-param name="text_angle" select="$text_angle"></xsl:with-param>
|
||||
<xsl:with-param name="percentage" select="$percentage"></xsl:with-param>
|
||||
<xsl:with-param name="part_half" select="$part_half"></xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select="$middle_x + $text_line_x"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="y">
|
||||
<xsl:choose>
|
||||
<!-- when in top right/bottom left quarters of circle, bring percentage text a bit closer to the circle -->
|
||||
<xsl:when test="$text_angle <= 22.5"><xsl:value-of select="$middle_y - $text_line_y +5"/></xsl:when>
|
||||
<xsl:when test="$text_angle <= 45 and $text_angle > 22.5"><xsl:value-of select="$middle_y - $text_line_y +4"/></xsl:when>
|
||||
<xsl:when test="$text_angle <= 67.5 and $text_angle > 45"><xsl:value-of select="$middle_y - $text_line_y +3"/></xsl:when>
|
||||
<xsl:when test="$text_angle <= 90 and $text_angle > 67.5"><xsl:value-of select="$middle_y - $text_line_y +2"/></xsl:when>
|
||||
<xsl:when test="$text_angle <= 112.5 and $text_angle > 90"><xsl:value-of select="$middle_y - $text_line_y +1"/></xsl:when>
|
||||
<xsl:when test="$text_angle <= 135 and $text_angle > 112.5"><xsl:value-of select="$middle_y - $text_line_y -1"/></xsl:when>
|
||||
<xsl:when test="$text_angle <= 157.5 and $text_angle > 135"><xsl:value-of select="$middle_y - $text_line_y +1"/></xsl:when>
|
||||
<xsl:when test="$text_angle <= 180 and $text_angle > 157.5"><xsl:value-of select="$middle_y - $text_line_y -0"/></xsl:when>
|
||||
<xsl:when test="$text_angle <= 202.5 and $text_angle > 180"><xsl:value-of select="$middle_y - $text_line_y -0"/></xsl:when>
|
||||
<xsl:when test="$text_angle <= 225 and $text_angle > 202.5"><xsl:value-of select="$middle_y - $text_line_y +1"/></xsl:when>
|
||||
<xsl:when test="$text_angle <= 247.5 and $text_angle > 225"><xsl:value-of select="$middle_y - $text_line_y -1"/></xsl:when>
|
||||
<xsl:when test="$text_angle <= 270 and $text_angle > 247.5"><xsl:value-of select="$middle_y - $text_line_y +1"/></xsl:when>
|
||||
<xsl:when test="$text_angle <= 292.5 and $text_angle > 270"><xsl:value-of select="$middle_y - $text_line_y +2"/></xsl:when>
|
||||
<xsl:when test="$text_angle <= 315 and $text_angle > 292.5"><xsl:value-of select="$middle_y - $text_line_y +3"/></xsl:when>
|
||||
<xsl:when test="$text_angle <= 337.5 and $text_angle > 315"><xsl:value-of select="$middle_y - $text_line_y +4"/></xsl:when>
|
||||
<xsl:when test="$text_angle <= 360 and $text_angle > 337.5"><xsl:value-of select="$middle_y - $text_line_y +5"/></xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select="$middle_y - $text_line_y"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="text-anchor">
|
||||
<xsl:choose>
|
||||
<!-- when in top/bottom quarters of circle, text is anchored in the middle, when left on end, when right on start -->
|
||||
<xsl:when
|
||||
test="($text_angle >= 315 or $text_angle <= 45) or ($text_angle <= 225 and $text_angle >= 135)"
|
||||
>middle</xsl:when>
|
||||
<xsl:when test="$text_angle < 135 and $text_angle > 45">start</xsl:when>
|
||||
<xsl:when test="$text_angle < 315 and $text_angle > 225">end</xsl:when>
|
||||
<xsl:otherwise>middle</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="format-number($percentage, '##,##0.0')"/>
|
||||
<xsl:text>%</xsl:text>
|
||||
</svg:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<!--extra line pointing into the slice-->
|
||||
<xsl:variable name="line_dir">
|
||||
<xsl:choose>
|
||||
<!--when in the first half of the pie, have the line point to the right, otherwise to the left -->
|
||||
<xsl:when test="$angle <= 180">+10</xsl:when>
|
||||
<xsl:otherwise>-10</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="text_x_relative_to_line">
|
||||
<xsl:choose>
|
||||
<!--when in the first half of the pie, have the text be on the right of the line, otherwise on the left -->
|
||||
<xsl:when test="$angle <= 180">
|
||||
<xsl:value-of select="$middle_x + $text_line_x + $line_dir * 2 + 11"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$middle_x + $text_line_x - 11"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<svg:path stroke="black" stroke-width="1" stroke-linejoin="round">
|
||||
<xsl:attribute name="fill">none</xsl:attribute>
|
||||
<xsl:attribute name="d">
|
||||
<xsl:value-of
|
||||
select="concat('M', ' ', $middle_x + $text_x, ',', $middle_y - $text_y, ' ', 'L', ' ', $middle_x + $text_line_x, ',', $middle_y - $text_line_y, ' ', 'H', ' ', $middle_x + $text_line_x + $line_dir)"
|
||||
/>
|
||||
</xsl:attribute>
|
||||
</svg:path>
|
||||
<svg:text text-anchor="end" xsl:use-attribute-sets="PieFont">
|
||||
<xsl:attribute name="x">
|
||||
<!-- placement of text depends on where extra line is pointing -->
|
||||
<xsl:value-of select="$text_x_relative_to_line"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="y">
|
||||
<xsl:value-of select="$middle_y - $text_line_y + 1"/>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="format-number($percentage, '##,##0.0')"/>
|
||||
<xsl:text>%</xsl:text>
|
||||
</svg:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<!--<svg:text text-anchor="middle" xsl:use-attribute-sets="DefaultFont">
|
||||
<xsl:attribute name="x">
|
||||
<xsl:value-of select="$middle_x + $text_line_x"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="y">
|
||||
<xsl:value-of select="$middle_y - $text_line_y"/>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="format-number($percentage, '##,##0.0')"/>
|
||||
<xsl:text>%</xsl:text>
|
||||
</svg:text>-->
|
||||
<!--loop until we reach the first part-->
|
||||
<xsl:if test="$position > 1">
|
||||
<xsl:call-template name="pie_chart_slice">
|
||||
<xsl:with-param name="pieTotal" select="$pieTotal"/>
|
||||
<xsl:with-param name="position" select="$position - 1"/>
|
||||
<xsl:with-param name="no_entries" select="$no_entries"/>
|
||||
<xsl:with-param name="middle_x" select="$middle_x"/>
|
||||
<xsl:with-param name="middle_y" select="$middle_y"/>
|
||||
<xsl:with-param name="move_x" select="$move_x"/>
|
||||
<xsl:with-param name="radius" select="$radius"/>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="piechartdebug">
|
||||
<xsl:param name="text_angle"/>
|
||||
<xsl:param name="part_half"/>
|
||||
<xsl:param name="percentage"/>
|
||||
<!--<xsl:message>PERCENTAGE: <xsl:value-of select="$percentage"/></xsl:message>
|
||||
<xsl:message>TEXT ANGLE: <xsl:value-of select="$text_angle"/></xsl:message>-->
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="selectColor">
|
||||
<xsl:param name="label"/>
|
||||
<xsl:param name="position"/>
|
||||
<xsl:choose>
|
||||
<!-- specific cases -->
|
||||
<!-- threat level -->
|
||||
<xsl:when test="$label = 'Extreme'">
|
||||
<xsl:value-of select="$color_extreme"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$label = 'High'">
|
||||
<xsl:value-of select="$color_high"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$label = 'Elevated'">
|
||||
<xsl:value-of select="$color_elevated"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$label = 'Moderate'">
|
||||
<xsl:value-of select="$color_moderate"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$label = 'Low'">
|
||||
<xsl:value-of select="$color_low"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$label = 'N/A'">
|
||||
<xsl:value-of select="$color_na"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$label = 'Unknown'">
|
||||
<xsl:value-of select="$color_unknown"/>
|
||||
</xsl:when>
|
||||
<!-- status -->
|
||||
<xsl:when test="$label = 'new'">
|
||||
<xsl:value-of select="$color_new"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$label = 'unresolved'">
|
||||
<xsl:value-of select="$color_unresolved"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$label = 'not_retested'">
|
||||
<xsl:value-of select="$color_notretested"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$label = 'resolved'">
|
||||
<xsl:value-of select="$color_resolved"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<!-- generic pie chart -->
|
||||
<xsl:choose>
|
||||
<!-- Going with shades of green, yellow and blue/purple in all cases here so as not to imply severity levels -->
|
||||
<xsl:when test="$position = 1">
|
||||
<xsl:value-of select="$generic_piecolor_1"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$position = 2">
|
||||
<xsl:value-of select="$generic_piecolor_2"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$position = 3">
|
||||
<xsl:value-of select="$generic_piecolor_3"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$position = 4">
|
||||
<xsl:value-of select="$generic_piecolor_4"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$position = 5">
|
||||
<xsl:value-of select="$generic_piecolor_5"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$position = 6">
|
||||
<xsl:value-of select="$generic_piecolor_6"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$position = 7">
|
||||
<xsl:value-of select="$generic_piecolor_7"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$position = 8">
|
||||
<xsl:value-of select="$generic_piecolor_8"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$position = 9">
|
||||
<xsl:value-of select="$generic_piecolor_9"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$position = 10">
|
||||
<xsl:value-of select="$generic_piecolor_10"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$position = 11">
|
||||
<xsl:value-of select="$generic_piecolor_11"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$position = 12">
|
||||
<xsl:value-of select="$generic_piecolor_12"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$position = 13">
|
||||
<xsl:value-of select="$generic_piecolor_13"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$position = 14">
|
||||
<xsl:value-of select="$generic_piecolor_14"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$position = 15">
|
||||
<xsl:value-of select="$generic_piecolor_15"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$position = 16">
|
||||
<xsl:value-of select="$generic_piecolor_16"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$position = 17">
|
||||
<xsl:value-of select="$generic_piecolor_17"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$position = 18">
|
||||
<xsl:value-of select="$generic_piecolor_18"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$position = 19">
|
||||
<xsl:value-of select="$generic_piecolor_19"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$position = 20">
|
||||
<xsl:value-of select="$generic_piecolor_20"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$position = 21">
|
||||
<xsl:value-of select="$generic_piecolor_21"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$generic_piecolor_other"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
@@ -2,22 +2,23 @@
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fo="http://www.w3.org/1999/XSL/Format"
|
||||
xmlns:my="http://radical.sexy" exclude-result-prefixes="xs my" version="2.0">
|
||||
|
||||
|
||||
<xsl:template name="getDenomination">
|
||||
<xsl:param name="placeholderElement" as="node()" select="/"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$placeholderElement/ancestor-or-self::*/@denomination = 'eur'">€</xsl:when>
|
||||
<xsl:when test="$placeholderElement/ancestor-or-self::*/@denomination = 'usd'">$</xsl:when>
|
||||
<xsl:when test="$placeholderElement/ancestor-or-self::*/@denomination = 'gbp'">£</xsl:when>
|
||||
<!--<xsl:otherwise>
|
||||
<xsl:when test="$placeholderElement/ancestor::*/@denomination = 'eur'">€</xsl:when>
|
||||
<xsl:when test="$placeholderElement/ancestor::*/@denomination = 'usd'">$</xsl:when>
|
||||
<xsl:when test="$placeholderElement/ancestor::*/@denomination = 'gbp'">£</xsl:when>
|
||||
</xsl:otherwise>-->
|
||||
<xsl:otherwise><fo:inline xsl:use-attribute-sets="errortext">WARNING: NO DENOMINATION FOUND</fo:inline></xsl:otherwise>
|
||||
<xsl:when test="$placeholderElement/ancestor-or-self::*/@denomination = 'eur'"
|
||||
>€</xsl:when>
|
||||
<xsl:when test="$placeholderElement/ancestor-or-self::*/@denomination = 'usd'"
|
||||
>$</xsl:when>
|
||||
<xsl:when test="$placeholderElement/ancestor-or-self::*/@denomination = 'gbp'"
|
||||
>£</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<fo:inline xsl:use-attribute-sets="errortext">WARNING: NO DENOMINATION
|
||||
FOUND</fo:inline>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- PLACEHOLDERS -->
|
||||
<xsl:template match="client_long">
|
||||
<xsl:param name="placeholderElement" select="/*/meta//client/full_name"/>
|
||||
@@ -79,6 +80,12 @@
|
||||
<xsl:with-param name="placeholderElement" select="$placeholderElement"/>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
<xsl:template match="client_ref">
|
||||
<xsl:param name="placeholderElement" select="/*/meta/client_reference"/>
|
||||
<xsl:call-template name="checkPlaceholder">
|
||||
<xsl:with-param name="placeholderElement" select="$placeholderElement"/>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
<xsl:template match="client_rate">
|
||||
<xsl:param name="roleTitle" select="@title"/>
|
||||
<xsl:param name="placeholderElement"
|
||||
@@ -378,9 +385,10 @@
|
||||
<xsl:with-param name="placeholderElement" select="$placeholderElement"/>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="ir_ora_rate">
|
||||
<xsl:param name="placeholderElement" select="/*/meta/activityinfo/organizational_readiness_assessment/rate"/>
|
||||
<xsl:param name="placeholderElement"
|
||||
select="/*/meta/activityinfo/organizational_readiness_assessment/rate"/>
|
||||
<xsl:call-template name="getDenomination">
|
||||
<xsl:with-param name="placeholderElement" select="$placeholderElement"/>
|
||||
</xsl:call-template>
|
||||
@@ -390,7 +398,8 @@
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
<xsl:template match="ir_sim_rate">
|
||||
<xsl:param name="placeholderElement" select="/*/meta/activityinfo/security_incident_management/rate"/>
|
||||
<xsl:param name="placeholderElement"
|
||||
select="/*/meta/activityinfo/security_incident_management/rate"/>
|
||||
<xsl:call-template name="getDenomination">
|
||||
<xsl:with-param name="placeholderElement" select="$placeholderElement"/>
|
||||
</xsl:call-template>
|
||||
@@ -400,7 +409,8 @@
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
<xsl:template match="ir_taa_rate">
|
||||
<xsl:param name="placeholderElement" select="/*/meta/activityinfo/technical_artefact_analysis/rate"/>
|
||||
<xsl:param name="placeholderElement"
|
||||
select="/*/meta/activityinfo/technical_artefact_analysis/rate"/>
|
||||
<xsl:call-template name="getDenomination">
|
||||
<xsl:with-param name="placeholderElement" select="$placeholderElement"/>
|
||||
</xsl:call-template>
|
||||
@@ -423,14 +433,16 @@
|
||||
<xsl:when test="@threatLevel">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$statusSequence">
|
||||
<xsl:value-of select="count(//finding[@threatLevel =
|
||||
$threatLevel][@status =
|
||||
$statusSequence])"/>
|
||||
<xsl:value-of
|
||||
select="
|
||||
count(//finding[@threatLevel =
|
||||
$threatLevel][@status =
|
||||
$statusSequence])"
|
||||
/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="count(//finding[@threatLevel =
|
||||
$threatLevel])"/>
|
||||
</xsl:otherwise>
|
||||
<xsl:value-of select="count(//finding[@threatLevel = $threatLevel])"/>
|
||||
$threatLevel])"/> </xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
@@ -439,6 +451,10 @@
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="todo">
|
||||
<fo:inline xsl:use-attribute-sets="errortext">###TODO###</fo:inline>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="checkPlaceholder">
|
||||
<xsl:param name="placeholderElement" select="/"/>
|
||||
<xsl:param name="caps" select="'none'"/>
|
||||
@@ -448,13 +464,14 @@
|
||||
<xsl:choose>
|
||||
<xsl:when test="self::client_rate">
|
||||
<xsl:call-template name="getDenomination">
|
||||
<xsl:with-param name="placeholderElement" select="$placeholderElement"/>
|
||||
</xsl:call-template>
|
||||
<xsl:with-param name="placeholderElement" select="$placeholderElement"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="$placeholderElement"/>
|
||||
</xsl:when>
|
||||
<!-- PRETTY FORMATTING FOR AMOUNTS OF MONEY -->
|
||||
<xsl:when test="(self::p_fee or self::contractor_hourly_fee or self::ir_ora_rate) and string($placeholderElement) castable as xs:float">
|
||||
<xsl:when
|
||||
test="(self::p_fee or self::contractor_hourly_fee or self::ir_ora_rate) and string($placeholderElement) castable as xs:float">
|
||||
<xsl:variable name="fee" select="$placeholderElement * 1"/>
|
||||
<xsl:number value="$fee" grouping-separator="," grouping-size="3"/>
|
||||
</xsl:when>
|
||||
@@ -466,6 +483,11 @@
|
||||
select="format-date($placeholderElement, '[MNn] [D1], [Y]', 'en', (), ())"
|
||||
/>
|
||||
</xsl:when>
|
||||
<xsl:when
|
||||
test="(self::contract_end_date or self::contract_start_date or self::generate_raterevisiondate or self::p_startdate or self::p_enddate) and normalize-space(.) = 'TBD'">
|
||||
<!-- actual TBD, don't mess with it -->
|
||||
<fo:text>TBD</fo:text>
|
||||
</xsl:when>
|
||||
<xsl:when
|
||||
test="(self::contract_end_date or self::contract_start_date or self::generate_raterevisiondate or self::p_startdate or self::p_enddate) and not(string($placeholderElement) castable as xs:date)">
|
||||
<!-- pretty printing for date -->
|
||||
@@ -553,30 +575,38 @@
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<fo:inline xsl:use-attribute-sets="errortext">[ <fo:inline xsl:use-attribute-sets="bold">WARNING</fo:inline>: Cannot resolve placeholder <fo:inline xsl:use-attribute-sets="bold"><xsl:value-of select="name()"/></fo:inline> in <xsl:value-of select="base-uri()"/> - <xsl:call-template name="getReason"><xsl:with-param name="placeholderElement" select="$placeholderElement"/></xsl:call-template> ]</fo:inline>
|
||||
<fo:inline xsl:use-attribute-sets="errortext">[ <fo:inline
|
||||
xsl:use-attribute-sets="bold">WARNING</fo:inline>: Cannot resolve
|
||||
placeholder <fo:inline xsl:use-attribute-sets="bold"><xsl:value-of
|
||||
select="name()"/></fo:inline> in <xsl:value-of select="base-uri()"/> -
|
||||
<xsl:call-template name="getReason"><xsl:with-param
|
||||
name="placeholderElement" select="$placeholderElement"
|
||||
/></xsl:call-template> ]</fo:inline>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template name="getReason">
|
||||
<xsl:param name="placeholderElement" select="."/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="/$placeholderElement">
|
||||
element <fo:inline xsl:use-attribute-sets="bold">"<xsl:value-of select="name($placeholderElement)"/>"</fo:inline> (<xsl:call-template name="getXPath"><xsl:with-param name="element" select="$placeholderElement"/></xsl:call-template>) is empty
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
referenced element not found
|
||||
</xsl:otherwise>
|
||||
<xsl:when test="/$placeholderElement"> element <fo:inline xsl:use-attribute-sets="bold"
|
||||
>"<xsl:value-of select="name($placeholderElement)"/>"</fo:inline>
|
||||
(<xsl:call-template name="getXPath"><xsl:with-param name="element"
|
||||
select="$placeholderElement"/></xsl:call-template>) is empty </xsl:when>
|
||||
<xsl:otherwise> referenced element not found </xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template name="getXPath">
|
||||
<xsl:param name="element" select="."/>
|
||||
<xsl:for-each select="$element/ancestor-or-self::*">
|
||||
<xsl:value-of select="concat('/',local-name())"/>
|
||||
<xsl:value-of select="concat('/', local-name())"/>
|
||||
<!--Predicate is only output when needed.-->
|
||||
<xsl:if test="(preceding-sibling::*|following-sibling::*)[local-name()=local-name(current())]">
|
||||
<xsl:value-of select="concat('[',count(preceding-sibling::*[local-name()=local-name(current())])+1,']')"/>
|
||||
<xsl:if
|
||||
test="(preceding-sibling::* | following-sibling::*)[local-name() = local-name(current())]">
|
||||
<xsl:value-of
|
||||
select="concat('[', count(preceding-sibling::*[local-name() = local-name(current())]) + 1, ']')"
|
||||
/>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs"
|
||||
xmlns:fo="http://www.w3.org/1999/XSL/Format" version="2.0">
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:my="http://www.radical.sexy"
|
||||
exclude-result-prefixes="xs my" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="2.0">
|
||||
|
||||
<xsl:variable name="c_main">#e2632a</xsl:variable>
|
||||
<xsl:variable name="c_support_light">#ededed</xsl:variable>
|
||||
<xsl:variable name="c_support_dark">#414241</xsl:variable>
|
||||
|
||||
<xsl:template match="section | appendix | finding | non-finding | annex">
|
||||
<xsl:param name="execsummary" tunnel="yes"/>
|
||||
@@ -31,76 +35,226 @@
|
||||
|
||||
<xsl:template match="title[not(parent::biblioentry)]">
|
||||
<xsl:param name="execsummary" tunnel="yes"/>
|
||||
<xsl:variable name="LEVEL" select="count(ancestor::*) - 1"/>
|
||||
<xsl:variable name="CLASS">
|
||||
<!-- use title-x for all levels -->
|
||||
<xsl:text>title-</xsl:text>
|
||||
<xsl:value-of select="$LEVEL"/>
|
||||
</xsl:variable>
|
||||
|
||||
<fo:block>
|
||||
<xsl:call-template name="use-att-set">
|
||||
<xsl:with-param name="CLASS" select="$CLASS"/>
|
||||
</xsl:call-template>
|
||||
<xsl:variable name="LEVEL">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$execsummary = true()">
|
||||
<xsl:choose>
|
||||
<xsl:when test="self::title[parent::appendix]">
|
||||
<fo:inline> Appendix <xsl:number
|
||||
count="appendix[not(@visibility = 'hidden')][@inexecsummary = 'yes']"
|
||||
level="multiple" format="{$AUTO_NUMBERING_FORMAT}"/>
|
||||
</fo:inline>
|
||||
</xsl:when>
|
||||
<xsl:when test="ancestor::appendix and not(self::title[parent::appendix])">
|
||||
<fo:inline> App <xsl:number
|
||||
count="appendix[not(@visibility = 'hidden')][@inexecsummary = 'yes']"
|
||||
level="multiple" format="{$AUTO_NUMBERING_FORMAT}"/>.<xsl:number
|
||||
count="section[ancestor::appendix][not(@visibility = 'hidden')][@inexecsummary = 'yes']"
|
||||
level="multiple" format="{$AUTO_NUMBERING_FORMAT}"/>
|
||||
</fo:inline>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<fo:inline>
|
||||
<xsl:number
|
||||
count="section[not(@visibility = 'hidden')][ancestor-or-self::*/@inexecsummary = 'yes'] | finding | non-finding"
|
||||
level="multiple" format="{$AUTO_NUMBERING_FORMAT}"/>
|
||||
</fo:inline>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<!-- waivers are special and get a hard-coded level -->
|
||||
<xsl:when test="local-name(ancestor::*[2]) = 'waivers'">1</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:choose>
|
||||
<xsl:when test="self::title[parent::appendix]">
|
||||
<fo:inline> Appendix <xsl:number
|
||||
count="appendix[not(@visibility = 'hidden')]" level="multiple"
|
||||
format="{$AUTO_NUMBERING_FORMAT}"/>
|
||||
</fo:inline>
|
||||
</xsl:when>
|
||||
<xsl:when test="ancestor::appendix and not(self::title[parent::appendix])">
|
||||
<fo:inline> App <xsl:number
|
||||
count="appendix[not(@visibility = 'hidden')]" level="multiple"
|
||||
format="{$AUTO_NUMBERING_FORMAT}"/>.<xsl:number
|
||||
count="section[ancestor::appendix][not(@visibility = 'hidden')]"
|
||||
level="multiple" format="{$AUTO_NUMBERING_FORMAT}"/>
|
||||
</fo:inline>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<fo:inline>
|
||||
<xsl:number
|
||||
count="section[not(@visibility = 'hidden')] | finding | non-finding"
|
||||
level="multiple" format="{$AUTO_NUMBERING_FORMAT}"/>
|
||||
</fo:inline>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:value-of select="count(ancestor::*) - 1"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:text>   </xsl:text>
|
||||
<xsl:call-template name="prependNumber"/>
|
||||
<xsl:apply-templates/>
|
||||
</fo:block>
|
||||
</xsl:variable>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$LEVEL = 0">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$NUMBERING">
|
||||
<fo:list-block xsl:use-attribute-sets="title-0">
|
||||
<xsl:call-template name="titleLogic"/>
|
||||
</fo:list-block>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<fo:block xsl:use-attribute-sets="title-0">
|
||||
<xsl:call-template name="titleLogic"/>
|
||||
</fo:block>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:when test="$LEVEL = 1">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$NUMBERING = true()">
|
||||
<fo:list-block xsl:use-attribute-sets="title-1 numbered-title">
|
||||
<xsl:call-template name="titleLogic"/>
|
||||
</fo:list-block>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<fo:block xsl:use-attribute-sets="title-1">
|
||||
<xsl:call-template name="titleLogic"/>
|
||||
</fo:block>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:when test="$LEVEL = 2">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$NUMBERING">
|
||||
<fo:list-block xsl:use-attribute-sets="title-2 numbered-title">
|
||||
<xsl:call-template name="titleLogic"/>
|
||||
</fo:list-block>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<fo:block xsl:use-attribute-sets="title-2">
|
||||
<xsl:call-template name="titleLogic"/>
|
||||
</fo:block>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:when test="$LEVEL = 3">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$NUMBERING">
|
||||
<fo:list-block xsl:use-attribute-sets="title-3 numbered-title">
|
||||
<xsl:call-template name="titleLogic"/>
|
||||
</fo:list-block>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<fo:block xsl:use-attribute-sets="title-3">
|
||||
<xsl:call-template name="titleLogic"/>
|
||||
</fo:block>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:when test="$LEVEL = 4">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$NUMBERING">
|
||||
<fo:list-block xsl:use-attribute-sets="title-4 numbered-title">
|
||||
<xsl:call-template name="titleLogic"/>
|
||||
</fo:list-block>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<fo:block xsl:use-attribute-sets="title-4">
|
||||
<xsl:call-template name="titleLogic"/>
|
||||
</fo:block>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
<xsl:if test="parent::finding">
|
||||
<!-- display meta box after title -->
|
||||
<xsl:apply-templates select=".." mode="meta"/>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="titleLogic">
|
||||
<xsl:param name="execsummary" tunnel="yes"/>
|
||||
<xsl:param name="AUTO_NUMBERING_FORMAT" tunnel="yes"/>
|
||||
<!-- Give somewhat larger separation to Appendix because of the long string; if everything gets 3cm it looks horrible -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="$NUMBERING">
|
||||
<xsl:attribute name="provisional-distance-between-starts">
|
||||
<xsl:choose>
|
||||
<xsl:when test="self::title[parent::appendix]">3.5cm</xsl:when>
|
||||
<xsl:otherwise>1.5cm</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<fo:list-item>
|
||||
<fo:list-item-label end-indent="label-end()">
|
||||
<fo:block line-height="0.7cm">
|
||||
<xsl:if test="../.. = /">
|
||||
<!-- Titles that appear on a section cover need to have a marker attached -->
|
||||
<xsl:call-template name="getTabMarker"/>
|
||||
</xsl:if>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$execsummary = true()">
|
||||
<xsl:choose>
|
||||
<xsl:when test="self::title[parent::appendix]">
|
||||
<fo:inline> Appendix <xsl:number
|
||||
count="appendix[not(@visibility = 'hidden')][@inexecsummary = 'yes']"
|
||||
level="multiple" format="{$AUTO_NUMBERING_FORMAT}"
|
||||
/>
|
||||
</fo:inline>
|
||||
</xsl:when>
|
||||
<xsl:when
|
||||
test="ancestor::appendix and not(self::title[parent::appendix])">
|
||||
<fo:inline> App <xsl:number
|
||||
count="appendix[not(@visibility = 'hidden')][@inexecsummary = 'yes']"
|
||||
level="multiple" format="{$AUTO_NUMBERING_FORMAT}"
|
||||
/>.<xsl:number
|
||||
count="section[ancestor::appendix][not(@visibility = 'hidden')][@inexecsummary = 'yes']"
|
||||
level="multiple" format="{$AUTO_NUMBERING_FORMAT}"
|
||||
/>
|
||||
</fo:inline>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:if test="not(../.. = /)">
|
||||
<!-- no numbering for top-level sections -->
|
||||
<fo:inline>
|
||||
<xsl:number
|
||||
count="section[not(@visibility = 'hidden')][ancestor-or-self::*/@inexecsummary = 'yes'] | finding | non-finding"
|
||||
level="multiple" format="{$AUTO_NUMBERING_FORMAT}"
|
||||
/>
|
||||
</fo:inline>
|
||||
</xsl:if>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:choose>
|
||||
<xsl:when test="self::title[parent::appendix]">
|
||||
<fo:inline> Appendix <xsl:number
|
||||
count="appendix[not(@visibility = 'hidden')]"
|
||||
level="multiple" format="{$AUTO_NUMBERING_FORMAT}"
|
||||
/>
|
||||
</fo:inline>
|
||||
</xsl:when>
|
||||
<xsl:when
|
||||
test="ancestor::appendix and not(self::title[parent::appendix])">
|
||||
<fo:inline> App <xsl:number
|
||||
count="appendix[not(@visibility = 'hidden')]"
|
||||
level="multiple" format="{$AUTO_NUMBERING_FORMAT}"
|
||||
/>.<xsl:number
|
||||
count="section[ancestor::appendix][not(@visibility = 'hidden')]"
|
||||
level="multiple" format="{$AUTO_NUMBERING_FORMAT}"
|
||||
/>
|
||||
</fo:inline>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<fo:inline>
|
||||
<xsl:number
|
||||
count="section[not(@visibility = 'hidden')] | finding | non-finding"
|
||||
level="multiple" format="{$AUTO_NUMBERING_FORMAT}"
|
||||
/>
|
||||
</fo:inline>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</fo:block>
|
||||
</fo:list-item-label>
|
||||
<fo:list-item-body start-indent="body-start()">
|
||||
<xsl:call-template name="titleContent"/>
|
||||
</fo:list-item-body>
|
||||
</fo:list-item>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:call-template name="titleContent"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="titleContent">
|
||||
<xsl:param name="client" tunnel="yes"/>
|
||||
<xsl:variable name="titleText_raw">
|
||||
<xsl:apply-templates/>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="titleText">
|
||||
<xsl:sequence
|
||||
select="
|
||||
string-join(for $x in tokenize(normalize-space($titleText_raw), ' ')
|
||||
return
|
||||
my:titleCase($x), ' ')"
|
||||
/>
|
||||
</xsl:variable>
|
||||
<fo:block line-height="0.7cm">
|
||||
<xsl:if test="parent::finding">
|
||||
<xsl:call-template name="prependId"/>
|
||||
</xsl:if>
|
||||
<!-- some hard waiver logic here (unfortunately): if we're still in the quote, the waiver is an annex and should be numbered as such... -->
|
||||
<xsl:if test="local-name(ancestor::*[2]) = 'waivers' and $client = true()">Annex
|
||||
<xsl:value-of select="ancestor::*[2]/@annex_number"/> - </xsl:if>
|
||||
<xsl:choose>
|
||||
<!-- (...continued) and the waiver title should have capitalized first letters (for all waivers, annexed or standalone) -->
|
||||
<xsl:when test="local-name(ancestor::*[2]) = 'waivers'">
|
||||
<xsl:value-of select="$titleText"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:apply-templates/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</fo:block>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="getTabMarker">
|
||||
<fo:marker marker-class-name="tab">
|
||||
<xsl:value-of select="text()"/>
|
||||
</fo:marker>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
||||
@@ -1,43 +1,54 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
exclude-result-prefixes="xs" xmlns:fo="http://www.w3.org/1999/XSL/Format"
|
||||
version="2.0">
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs"
|
||||
xmlns:fo="http://www.w3.org/1999/XSL/Format" version="2.0">
|
||||
|
||||
|
||||
<!-- color scheme, just change these to change colors throughout the suite -->
|
||||
<xsl:variable name="c_main">#e2632a</xsl:variable>
|
||||
<xsl:variable name="c_support_light">#ededed</xsl:variable>
|
||||
<xsl:variable name="c_support_subtlydarkerlight">#e4e4e4</xsl:variable><!-- used for subtle light border around support_light background -->
|
||||
<xsl:variable name="c_support_medium">#999999</xsl:variable><!-- used for subtle light border around support_light background -->
|
||||
<xsl:variable name="c_support_dark">#444444</xsl:variable>
|
||||
<xsl:variable name="c_main_contrast">white</xsl:variable>
|
||||
|
||||
<xsl:variable name="border-color">#444444</xsl:variable>
|
||||
<!-- Note: pie chart colors can be customized in functions_params_vars.xslt -->
|
||||
|
||||
<!-- variables -->
|
||||
<xsl:variable name="border-width">1pt</xsl:variable>
|
||||
<xsl:variable name="border-style">solid</xsl:variable>
|
||||
<xsl:variable name="border-color">black</xsl:variable>
|
||||
<xsl:variable name="tabbed-numbering-tabwidth">20mm</xsl:variable>
|
||||
<xsl:variable name="small-space">5pt</xsl:variable>
|
||||
<xsl:variable name="medium-space">4mm</xsl:variable>
|
||||
<xsl:variable name="large-space">8mm</xsl:variable>
|
||||
<xsl:variable name="very-large-space">1.5cm</xsl:variable>
|
||||
|
||||
<xsl:variable name="very-large-space">1.3cm</xsl:variable>
|
||||
|
||||
<!-- User-accessible classes -->
|
||||
<xsl:attribute-set name="keep-together">
|
||||
<xsl:attribute name="keep-together">always</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
|
||||
<!-- Common settings -->
|
||||
<xsl:attribute-set name="root-common">
|
||||
<xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
|
||||
<!-- Text -->
|
||||
<xsl:attribute-set name="DefaultFont">
|
||||
<xsl:attribute name="color"><xsl:value-of select="$c_support_dark"/></xsl:attribute>
|
||||
<xsl:attribute name="font-family">LiberationSansNarrow</xsl:attribute>
|
||||
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
||||
<xsl:attribute name="color">black</xsl:attribute>
|
||||
<xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
|
||||
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="HeaderFont" use-attribute-sets="DefaultFont"/>
|
||||
<xsl:attribute-set name="FooterFont" use-attribute-sets="DefaultFont"/>
|
||||
<xsl:attribute-set name="TableFont" use-attribute-sets="DefaultFont">
|
||||
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
||||
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="PieFont">
|
||||
<xsl:attribute name="font-family">LiberationSansNarrow</xsl:attribute>
|
||||
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
||||
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
||||
<xsl:attribute name="color">black</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="TinyFont" use-attribute-sets="DefaultFont">
|
||||
@@ -46,56 +57,81 @@
|
||||
<xsl:attribute-set name="PreFont" use-attribute-sets="DefaultFont">
|
||||
<xsl:attribute name="font-family">LiberationMono</xsl:attribute>
|
||||
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
||||
</xsl:attribute-set><!--
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:attribute-set name="errortext">
|
||||
<xsl:attribute name="background-color">black</xsl:attribute>
|
||||
<xsl:attribute name="color"><xsl:value-of select="$color_moderate"/></xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
|
||||
<xsl:attribute-set name="title">
|
||||
<xsl:attribute name="keep-with-next.within-page">always</xsl:attribute>
|
||||
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
||||
</xsl:attribute-set>-->
|
||||
<xsl:attribute-set name="errortext">
|
||||
<xsl:attribute name="color">orange</xsl:attribute>
|
||||
<xsl:attribute name="background-color">black</xsl:attribute>
|
||||
<xsl:attribute name="color">black</xsl:attribute>
|
||||
<xsl:attribute name="font-family">OpenSans</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="numbered-title">
|
||||
<xsl:attribute name="provisional-label-separation">3mm</xsl:attribute>
|
||||
<xsl:attribute name="padding-left">2mm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="title-0" use-attribute-sets="title">
|
||||
<xsl:attribute name="text-align">center</xsl:attribute>
|
||||
<xsl:attribute name="font-size">16pt</xsl:attribute>
|
||||
<xsl:attribute name="margin-bottom">1cm</xsl:attribute>
|
||||
<xsl:attribute name="background-color">orange</xsl:attribute>
|
||||
<xsl:attribute name="color"><xsl:value-of select="$c_main_contrast"/></xsl:attribute>
|
||||
<xsl:attribute name="margin-top">0.4cm</xsl:attribute>
|
||||
<xsl:attribute name="margin-bottom">0.4cm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="title-1" use-attribute-sets="title">
|
||||
<xsl:attribute name="color"><xsl:value-of select="$c_main"/></xsl:attribute>
|
||||
<xsl:attribute name="font-size">16pt</xsl:attribute>
|
||||
<xsl:attribute name="margin-bottom">1cm</xsl:attribute>
|
||||
<xsl:attribute name="background-color">orange</xsl:attribute>
|
||||
<xsl:attribute name="margin-bottom">0.6cm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="title-2" use-attribute-sets="title">
|
||||
<xsl:attribute name="font-style">italic</xsl:attribute>
|
||||
<xsl:attribute name="font-size">14pt</xsl:attribute>
|
||||
<xsl:attribute name="margin-bottom">0.8cm</xsl:attribute>
|
||||
<xsl:attribute name="background-color">silver</xsl:attribute>
|
||||
<xsl:attribute name="color"><xsl:value-of select="$c_support_dark"/></xsl:attribute>
|
||||
<xsl:attribute name="font-size">13pt</xsl:attribute>
|
||||
<xsl:attribute name="margin-bottom">0.5cm</xsl:attribute>
|
||||
<xsl:attribute name="margin-top">0.4cm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="title-3" use-attribute-sets="title">
|
||||
<xsl:attribute name="font-size">14pt</xsl:attribute>
|
||||
<xsl:attribute name="margin-bottom">0.8cm</xsl:attribute>
|
||||
<xsl:attribute name="background-color">silver</xsl:attribute>
|
||||
<xsl:attribute name="color"><xsl:value-of select="$c_support_dark"/></xsl:attribute>
|
||||
<xsl:attribute name="font-size">13pt</xsl:attribute>
|
||||
<xsl:attribute name="margin-bottom">0.5cm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="title-4" use-attribute-sets="title">
|
||||
<xsl:attribute name="margin-bottom">5pt</xsl:attribute>
|
||||
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
||||
<xsl:attribute name="margin-bottom">0.5cm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="title-client" use-attribute-sets="title-0">
|
||||
<xsl:attribute name="background-color">silver</xsl:attribute>
|
||||
<xsl:attribute name="margin-bottom">6cm</xsl:attribute>
|
||||
<xsl:attribute name="text-transform">capitalize</xsl:attribute>
|
||||
<xsl:attribute-set name="title-client" use-attribute-sets="title">
|
||||
<xsl:attribute name="font-size">16pt</xsl:attribute>
|
||||
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="for">
|
||||
<xsl:attribute name="text-align">center</xsl:attribute>
|
||||
<xsl:attribute-set name="title-sub" use-attribute-sets="title">
|
||||
<xsl:attribute name="color"><xsl:value-of select="$c_support_dark"/></xsl:attribute>
|
||||
<xsl:attribute name="font-size">13pt</xsl:attribute>
|
||||
<xsl:attribute name="margin-bottom">0.5cm</xsl:attribute>
|
||||
<xsl:attribute name="margin-top">0.4cm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="title-toc" use-attribute-sets="title">
|
||||
<xsl:attribute name="color"><xsl:value-of select="$c_main"/></xsl:attribute>
|
||||
<xsl:attribute name="font-size">18pt</xsl:attribute>
|
||||
<xsl:attribute name="margin-bottom">0.7cm</xsl:attribute>
|
||||
<xsl:attribute name="font-family">OpenSans</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="title-waiver" use-attribute-sets="title">
|
||||
<xsl:attribute name="color"><xsl:value-of select="$c_main"/></xsl:attribute>
|
||||
<xsl:attribute name="font-size">16pt</xsl:attribute>
|
||||
<xsl:attribute name="margin-bottom">1cm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="title-toc" use-attribute-sets="title-1">
|
||||
<xsl:attribute name="margin-bottom">0cm</xsl:attribute>
|
||||
<xsl:attribute name="text-transform">capitalize</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="img-title">
|
||||
<xsl:attribute name="font-style">italic</xsl:attribute>
|
||||
<xsl:attribute name="text-align">center</xsl:attribute>
|
||||
<xsl:attribute name="keep-with-previous.within-column">always</xsl:attribute>
|
||||
<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
|
||||
<xsl:attribute name="margin-left">1cm</xsl:attribute>
|
||||
<xsl:attribute name="margin-right">1cm</xsl:attribute>
|
||||
<xsl:attribute name="margin-top">0.5cm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="title-findingsection" use-attribute-sets="title-4 indent"/>
|
||||
<xsl:attribute-set name="section">
|
||||
<xsl:attribute name="margin-bottom">
|
||||
<xsl:value-of select="$very-large-space"/>
|
||||
@@ -112,21 +148,27 @@
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="code" use-attribute-sets="DefaultFont">
|
||||
<xsl:attribute name="font-family">LiberationMono</xsl:attribute>
|
||||
<xsl:attribute name="font-size">90%</xsl:attribute>
|
||||
<xsl:attribute name="font-size">85%</xsl:attribute>
|
||||
<xsl:attribute name="background-color">#eeeeee</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="code-title" use-attribute-sets="DefaultFont">
|
||||
<xsl:attribute name="font-family">LiberationMono</xsl:attribute>
|
||||
<xsl:attribute name="font-size">90%</xsl:attribute>
|
||||
<xsl:attribute name="color">inherit</xsl:attribute>
|
||||
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
||||
<xsl:attribute name="font-size">85%</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="sup" use-attribute-sets="DefaultFont">
|
||||
<xsl:attribute name="font-size">60%</xsl:attribute>
|
||||
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
||||
<xsl:attribute name="font-size">60%</xsl:attribute>
|
||||
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="sub" use-attribute-sets="DefaultFont">
|
||||
<xsl:attribute name="font-size">60%</xsl:attribute>
|
||||
<xsl:attribute name="vertical-align">sub</xsl:attribute>
|
||||
<xsl:attribute name="font-size">60%</xsl:attribute>
|
||||
<xsl:attribute name="vertical-align">sub</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="link">
|
||||
<xsl:attribute name="color"><xsl:value-of select="$c_main"/></xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!-- bibliography -->
|
||||
<xsl:attribute-set name="title.book" use-attribute-sets="italic"/>
|
||||
<xsl:attribute-set name="title.article"/>
|
||||
@@ -135,29 +177,31 @@
|
||||
<xsl:attribute-set name="info"/>
|
||||
<xsl:attribute-set name="publisher"/>
|
||||
<xsl:attribute-set name="pubdate"/>
|
||||
|
||||
<!-- blocks -->
|
||||
<xsl:attribute-set name="p">
|
||||
<xsl:attribute-set name="indent"/>
|
||||
<xsl:attribute-set name="p" use-attribute-sets="indent">
|
||||
<xsl:attribute name="margin-bottom">
|
||||
<xsl:value-of select="$small-space"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="line-height">6mm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="biblioentry" use-attribute-sets="indent">
|
||||
<xsl:attribute name="margin-bottom">
|
||||
<xsl:value-of select="$small-space"/>
|
||||
</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="biblioentry">
|
||||
<xsl:attribute name="margin-bottom">
|
||||
<xsl:value-of select="$small-space"/>
|
||||
</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="list" use-attribute-sets="p"/>
|
||||
<xsl:attribute-set name="last">
|
||||
<xsl:attribute name="margin-bottom">
|
||||
<xsl:value-of select="$very-large-space"/>
|
||||
</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="pre" use-attribute-sets="borders PreFont">
|
||||
<xsl:attribute name="border-style">double</xsl:attribute>
|
||||
<xsl:attribute name="border-width">2pt</xsl:attribute>
|
||||
<xsl:attribute name="margin-bottom">
|
||||
<xsl:value-of select="$medium-space"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute-set name="pre" use-attribute-sets="PreFont indent">
|
||||
<xsl:attribute name="background-color"><xsl:value-of select="$c_support_light"/></xsl:attribute>
|
||||
<xsl:attribute name="border-color"><xsl:value-of select="$c_support_subtlydarkerlight"/></xsl:attribute>
|
||||
<xsl:attribute name="border-style">solid</xsl:attribute>
|
||||
<xsl:attribute name="border-width">1pt</xsl:attribute>
|
||||
<xsl:attribute name="margin-bottom" select="$medium-space"/>
|
||||
<xsl:attribute name="white-space-collapse">false</xsl:attribute>
|
||||
<xsl:attribute name="linefeed-treatment">preserve</xsl:attribute>
|
||||
<xsl:attribute name="white-space-treatment">preserve</xsl:attribute>
|
||||
@@ -167,114 +211,237 @@
|
||||
<xsl:attribute-set name="finding-meta">
|
||||
<xsl:attribute name="margin-bottom" select="$small-space"/>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:attribute-set name="finding-content" use-attribute-sets="p">
|
||||
<xsl:attribute name="margin-bottom" select="$large-space"/>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!-- Pages -->
|
||||
<xsl:attribute-set name="PortraitPage">
|
||||
<xsl:attribute name="margin-top">2cm</xsl:attribute>
|
||||
<xsl:attribute name="margin-bottom">1.8cm</xsl:attribute>
|
||||
<xsl:attribute name="margin-left">2cm</xsl:attribute>
|
||||
<xsl:attribute name="margin-right">2cm</xsl:attribute>
|
||||
<xsl:attribute name="margin-top">0cm</xsl:attribute>
|
||||
<xsl:attribute name="margin-bottom">0cm</xsl:attribute>
|
||||
<xsl:attribute name="margin-left">0cm</xsl:attribute>
|
||||
<xsl:attribute name="margin-right">0cm</xsl:attribute>
|
||||
<xsl:attribute name="page-height">29.7cm</xsl:attribute>
|
||||
<xsl:attribute name="page-width">21.0cm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="region-body-cover">
|
||||
<xsl:attribute name="margin-top">1cm</xsl:attribute>
|
||||
<xsl:attribute name="margin-bottom">1cm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="region-before-cover">
|
||||
<xsl:attribute name="precedence">true</xsl:attribute>
|
||||
<xsl:attribute name="extent">0.6cm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="region-after-cover">
|
||||
<xsl:attribute name="precedence">true</xsl:attribute>
|
||||
<xsl:attribute name="extent">0.6cm</xsl:attribute>
|
||||
<xsl:attribute name="padding">0</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<!-- Front Matter (Cover, Meta, ToC) -->
|
||||
<!-- Flow -->
|
||||
<xsl:attribute-set name="cover-flow"/>
|
||||
|
||||
<!-- Regions -->
|
||||
<xsl:attribute-set name="region-before-cover"/>
|
||||
<xsl:attribute-set name="region-after-cover"/>
|
||||
|
||||
<!-- Content Matter -->
|
||||
<!-- Flow -->
|
||||
<!-- Regions -->
|
||||
<xsl:attribute-set name="region-body-content">
|
||||
<xsl:attribute name="margin-top">1cm</xsl:attribute>
|
||||
<xsl:attribute name="margin-bottom">1cm</xsl:attribute>
|
||||
<xsl:attribute name="margin-top">2.5cm</xsl:attribute>
|
||||
<xsl:attribute name="margin-bottom">2.5cm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="region-body-content-odd" use-attribute-sets="region-body-content">
|
||||
<xsl:attribute name="margin-right">2cm</xsl:attribute>
|
||||
<xsl:attribute name="margin-left">2cm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="region-body-content-even" use-attribute-sets="region-body-content">
|
||||
<xsl:attribute name="margin-left">2cm</xsl:attribute>
|
||||
<xsl:attribute name="margin-right">2cm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="region-before-content">
|
||||
<xsl:attribute name="precedence">true</xsl:attribute>
|
||||
<xsl:attribute name="extent">0.6cm</xsl:attribute>
|
||||
<xsl:attribute name="extent">4.6cm</xsl:attribute><!-- overlaps body since it's empty anyway and we need to push down the tab in region-end -->
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="region-before-content-odd" use-attribute-sets="region-before-content"/>
|
||||
<xsl:attribute-set name="region-before-content-even" use-attribute-sets="region-before-content"/>
|
||||
<xsl:attribute-set name="region-after-content">
|
||||
<xsl:attribute name="precedence">true</xsl:attribute>
|
||||
<xsl:attribute name="extent">0.6cm</xsl:attribute>
|
||||
<xsl:attribute name="padding">0</xsl:attribute>
|
||||
<xsl:attribute name="extent">2.1cm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="header">
|
||||
<xsl:attribute name="text-align">right</xsl:attribute>
|
||||
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
||||
<xsl:attribute-set name="region-start-content-odd">
|
||||
<xsl:attribute name="extent">2cm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="region-end-content-even">
|
||||
<xsl:attribute name="extent">2cm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="footer">
|
||||
<xsl:attribute name="color"><xsl:value-of select="$c_support_medium"/></xsl:attribute>
|
||||
<xsl:attribute name="border-color"><xsl:value-of select="$c_support_dark"/></xsl:attribute>
|
||||
<xsl:attribute name="padding-top">0.7cm</xsl:attribute>
|
||||
<xsl:attribute name="border-before-width">1px</xsl:attribute>
|
||||
<xsl:attribute name="border-before-style">solid</xsl:attribute>
|
||||
<xsl:attribute name="text-align-last">justify</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!-- colors -->
|
||||
<xsl:attribute-set name="bg-orange">
|
||||
<xsl:attribute name="background-color">orange</xsl:attribute>
|
||||
<xsl:attribute-set name="header-odd">
|
||||
<xsl:attribute name="color"><xsl:value-of select="$c_support_medium"/></xsl:attribute>
|
||||
<xsl:attribute name="border-color"><xsl:value-of select="$c_support_dark"/></xsl:attribute>
|
||||
<xsl:attribute name="padding-top">1cm</xsl:attribute>
|
||||
<xsl:attribute name="border-before-width">1px</xsl:attribute>
|
||||
<xsl:attribute name="border-before-style">solid</xsl:attribute>
|
||||
<xsl:attribute name="text-align">right</xsl:attribute>
|
||||
<!-- need to set margin-right to 0cm to force block to accept padding -->
|
||||
<xsl:attribute name="margin-right">0cm</xsl:attribute>
|
||||
<xsl:attribute name="padding-right">2cm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:attribute-set name="footer-odd" use-attribute-sets="footer">
|
||||
<!-- need to set margin-right to 0cm to force block to accept padding -->
|
||||
<xsl:attribute name="margin-right">0cm</xsl:attribute>
|
||||
<xsl:attribute name="padding-right">2cm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="footer-even" use-attribute-sets="footer">
|
||||
<!-- need to set margin-right to 0cm to force block to accept padding -->
|
||||
<xsl:attribute name="margin-left">0cm</xsl:attribute>
|
||||
<xsl:attribute name="padding-left">2cm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="footerlogo">
|
||||
<xsl:attribute name="padding-top">23.3cm</xsl:attribute>
|
||||
<xsl:attribute name="margin-left">0.2cm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="frontlogo">
|
||||
<xsl:attribute name="margin-left">2cm</xsl:attribute>
|
||||
<xsl:attribute name="margin-top">3cm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="front-titleblock-container">
|
||||
<!-- fo:footnote-body element -->
|
||||
<xsl:attribute name="font-family">LiberationSansNarrow</xsl:attribute>
|
||||
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
||||
<xsl:attribute name="color">black</xsl:attribute>
|
||||
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
||||
<xsl:attribute name="text-align">left</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="front-titleblock">
|
||||
<xsl:attribute name="margin-right">2cm</xsl:attribute>
|
||||
<xsl:attribute name="margin-left">9cm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="frontrows">
|
||||
<!-- because block margins are inherited... why? -->
|
||||
<xsl:attribute name="margin-left">0cm</xsl:attribute>
|
||||
<xsl:attribute name="margin-right">0cm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="front-titlerow" use-attribute-sets="frontrows">
|
||||
<xsl:attribute name="background-color"><xsl:value-of select="$c_main"/></xsl:attribute>
|
||||
<xsl:attribute name="text-align">center</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="front-subtitlerow" use-attribute-sets="frontrows">
|
||||
<xsl:attribute name="background-color"><xsl:value-of select="$c_main_contrast"/></xsl:attribute>
|
||||
<xsl:attribute name="padding-left">0.5cm</xsl:attribute>
|
||||
<xsl:attribute name="padding-top">0.7cm</xsl:attribute>
|
||||
<xsl:attribute name="padding-bottom">0.4cm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="front-metarow" use-attribute-sets="frontrows">
|
||||
<xsl:attribute name="background-color"><xsl:value-of select="$c_main_contrast"/></xsl:attribute>
|
||||
<xsl:attribute name="padding-left">0.5cm</xsl:attribute>
|
||||
<xsl:attribute name="padding-top">0.5cm</xsl:attribute>
|
||||
<xsl:attribute name="padding-bottom">1.2cm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!-- graphics -->
|
||||
<xsl:attribute-set name="frontpagetext">
|
||||
<xsl:attribute name="break-after">page</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="graphics-block">
|
||||
<xsl:attribute name="text-align">center</xsl:attribute>
|
||||
<xsl:attribute name="margin-bottom" select="$small-space"/>
|
||||
</xsl:attribute-set>
|
||||
|
||||
|
||||
<!-- tables -->
|
||||
<xsl:attribute-set name="borders">
|
||||
<xsl:attribute name="border-color"><xsl:value-of select="$c_support_dark"/></xsl:attribute>
|
||||
<xsl:attribute name="border-width">
|
||||
<xsl:value-of select="$border-width"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="border-style">
|
||||
<xsl:value-of select="$border-style"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="border-color">
|
||||
<xsl:value-of select="$border-color"/>
|
||||
</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="th" use-attribute-sets="td bg-orange"/>
|
||||
<xsl:attribute-set name="td">
|
||||
<xsl:attribute name="padding">2pt</xsl:attribute>
|
||||
<xsl:attribute-set name="th" use-attribute-sets="td indent_reset">
|
||||
<xsl:attribute name="background-color"><xsl:value-of select="$c_main"/></xsl:attribute>
|
||||
<xsl:attribute name="color"><xsl:value-of select="$c_main_contrast"/></xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="table">
|
||||
<xsl:attribute-set name="td" use-attribute-sets="indent_reset">
|
||||
<xsl:attribute name="padding-left">4pt</xsl:attribute>
|
||||
<xsl:attribute name="padding-right">4pt</xsl:attribute>
|
||||
<xsl:attribute name="padding-top">3pt</xsl:attribute>
|
||||
<xsl:attribute name="padding-bottom">3pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="fwtable">
|
||||
<xsl:attribute name="table-layout">fixed</xsl:attribute>
|
||||
<xsl:attribute name="width">100%</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="table" use-attribute-sets="indent">
|
||||
<xsl:attribute name="margin-bottom" select="$small-space"/>
|
||||
<xsl:attribute name="border-after-width.conditionality">retain</xsl:attribute>
|
||||
<xsl:attribute name="border-before-width.conditionality">retain</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="pieLegendTable">
|
||||
<xsl:attribute name="background-color">#eeeeee</xsl:attribute>
|
||||
<xsl:attribute-set name="th-row">
|
||||
<xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
|
||||
<!-- lists -->
|
||||
<xsl:attribute-set name="list">
|
||||
<xsl:attribute name="provisional-distance-between-starts">0.7cm</xsl:attribute>
|
||||
<xsl:attribute name="provisional-label-separation">2mm</xsl:attribute>
|
||||
<xsl:attribute name="start-indent">2mm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="li">
|
||||
<xsl:attribute name="line-height">5.5mm</xsl:attribute>
|
||||
<xsl:attribute name="keep-together.within-page">always</xsl:attribute>
|
||||
<xsl:attribute name="margin-bottom" select="$small-space"/>
|
||||
</xsl:attribute-set>
|
||||
|
||||
|
||||
<!-- ToC -->
|
||||
<xsl:attribute-set name="index">
|
||||
<xsl:attribute name="break-after">page</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:attribute-set name="tocCell" use-attribute-sets="indent_reset">
|
||||
<xsl:attribute name="padding-bottom">1.5mm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="section-tocblock">
|
||||
<xsl:attribute name="margin-left">8cm</xsl:attribute>
|
||||
<xsl:attribute name="background-color">white</xsl:attribute>
|
||||
<xsl:attribute name="padding-left">1cm</xsl:attribute>
|
||||
<xsl:attribute name="padding-top">0.7cm</xsl:attribute>
|
||||
<xsl:attribute name="padding-bottom">2cm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="section-toc-footnote">
|
||||
<xsl:attribute name="font-family">LiberationSansNarrow</xsl:attribute>
|
||||
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
||||
<xsl:attribute name="color">black</xsl:attribute>
|
||||
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
||||
<xsl:attribute name="text-align">left</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!-- Contact -->
|
||||
<xsl:attribute-set name="Contact">
|
||||
<xsl:attribute name="keep-together.within-page">always</xsl:attribute>
|
||||
<xsl:attribute name="margin-left" select="$very-large-space"/>
|
||||
<xsl:attribute name="line-height">18pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:attribute-set name="coc">
|
||||
<xsl:attribute name="font-size">9pt</xsl:attribute>
|
||||
<xsl:attribute name="text-align">center</xsl:attribute>
|
||||
<xsl:attribute name="margin-top">15px</xsl:attribute>
|
||||
<xsl:attribute name="color"><xsl:value-of select="$c_support_medium"/></xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!-- Signature boxes -->
|
||||
<xsl:attribute-set name="signaturebox">
|
||||
<xsl:attribute name="margin-top" select="$very-large-space"/>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!-- Misc (invoice) -->
|
||||
<xsl:attribute-set name="orange-text"><!-- 'silver' is #c0c0c0 -->
|
||||
<xsl:attribute name="color">#FF5C00</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="align-right">
|
||||
|
||||
<!-- Misc -->
|
||||
<xsl:attribute-set name="align-right">
|
||||
<xsl:attribute name="text-align">right</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="big-space-below">
|
||||
<xsl:attribute name="margin-bottom">8mm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="important">
|
||||
<xsl:attribute name="text-align">center</xsl:attribute>
|
||||
<xsl:attribute name="font-size">16pt</xsl:attribute>
|
||||
<xsl:attribute name="margin-top">1cm</xsl:attribute>
|
||||
<xsl:attribute name="margin-bottom">1cm</xsl:attribute>
|
||||
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="indent_reset">
|
||||
<xsl:attribute name="start-indent">0</xsl:attribute>
|
||||
<xsl:attribute name="end-indent">0</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
</xsl:stylesheet>
|
||||
|
||||
@@ -1,69 +1,44 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
exclude-result-prefixes="xs"
|
||||
version="2.0">
|
||||
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs" version="2.0">
|
||||
|
||||
<xsl:import href="styles.xslt"/>
|
||||
|
||||
<!-- variables -->
|
||||
|
||||
<xsl:variable name="medium-space">10pt</xsl:variable>
|
||||
|
||||
<xsl:attribute-set name="title" use-attribute-sets="bold">
|
||||
<xsl:attribute name="keep-with-next.within-page">always</xsl:attribute>
|
||||
<xsl:attribute name="text-align">center</xsl:attribute>
|
||||
<xsl:attribute name="color">white</xsl:attribute>
|
||||
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
||||
<!-- letter spacing is dodgy in fop when there are certain characters in the string (e.g. a 'V'); commenting this out until that is fixed -->
|
||||
<!-- it's also dodgy in combination with centered text, btw -->
|
||||
<!--<xsl:attribute name="letter-spacing.precedence">0</xsl:attribute>
|
||||
<xsl:attribute name="letter-spacing.optimum">3mm</xsl:attribute>
|
||||
<xsl:attribute name="letter-spacing.minimum">3mm</xsl:attribute>
|
||||
<xsl:attribute name="letter-spacing.maximum">3mm</xsl:attribute>-->
|
||||
</xsl:attribute-set>
|
||||
|
||||
|
||||
<xsl:attribute-set name="PortraitPage">
|
||||
<xsl:attribute name="margin-top">0.5cm</xsl:attribute>
|
||||
<xsl:attribute name="margin-bottom">1.5cm</xsl:attribute>
|
||||
<xsl:attribute name="margin-left">1.5cm</xsl:attribute>
|
||||
<xsl:attribute name="margin-right">1.5cm</xsl:attribute>
|
||||
<xsl:attribute name="margin-left">2cm</xsl:attribute>
|
||||
<xsl:attribute name="margin-right">2cm</xsl:attribute>
|
||||
<xsl:attribute name="page-height">29.7cm</xsl:attribute>
|
||||
<xsl:attribute name="page-width">21.0cm</xsl:attribute>
|
||||
<xsl:attribute name="line-height">5.5mm</xsl:attribute>
|
||||
<xsl:attribute name="text-align-last">right</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="region-body-cover">
|
||||
<xsl:attribute name="margin-top">3.6cm</xsl:attribute>
|
||||
<xsl:attribute name="margin-bottom">1cm</xsl:attribute>
|
||||
<xsl:attribute-set name="region-body-first">
|
||||
<xsl:attribute name="margin-top">3.7cm</xsl:attribute>
|
||||
<xsl:attribute name="margin-bottom">2.1cm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="region-before-cover">
|
||||
<xsl:attribute-set name="region-before-first">
|
||||
<xsl:attribute name="precedence">true</xsl:attribute>
|
||||
<xsl:attribute name="extent">2.7cm</xsl:attribute>
|
||||
<xsl:attribute name="extent">3.6cm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="region-after-cover">
|
||||
<xsl:attribute-set name="region-after-first">
|
||||
<xsl:attribute name="precedence">true</xsl:attribute>
|
||||
<xsl:attribute name="extent">0.6cm</xsl:attribute>
|
||||
<xsl:attribute name="extent">2cm</xsl:attribute>
|
||||
<xsl:attribute name="padding">0</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="region-body-content">
|
||||
<xsl:attribute-set name="region-body-rest">
|
||||
<xsl:attribute name="margin-top">2cm</xsl:attribute>
|
||||
<xsl:attribute name="margin-bottom">1cm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="region-before-content">
|
||||
<xsl:attribute-set name="region-before-rest">
|
||||
<xsl:attribute name="precedence">true</xsl:attribute>
|
||||
<xsl:attribute name="extent">0.6cm</xsl:attribute>
|
||||
<xsl:attribute name="extent">1cm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="region-after-content">
|
||||
<xsl:attribute-set name="region-after-rest">
|
||||
<xsl:attribute name="precedence">true</xsl:attribute>
|
||||
<xsl:attribute name="extent">0.6cm</xsl:attribute>
|
||||
<xsl:attribute name="extent">2cm</xsl:attribute>
|
||||
<xsl:attribute name="padding">0</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="header">
|
||||
<xsl:attribute name="text-align">right</xsl:attribute>
|
||||
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="footer">
|
||||
<xsl:attribute name="text-align">center</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="logo">
|
||||
<xsl:attribute name="padding-top">0cm</xsl:attribute>
|
||||
<xsl:attribute name="padding-bottom">0cm</xsl:attribute>
|
||||
@@ -73,14 +48,11 @@
|
||||
<xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
|
||||
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="title-0" use-attribute-sets="title">
|
||||
<xsl:attribute name="font-size">18pt</xsl:attribute>
|
||||
<xsl:attribute name="background-color">#FF5C00</xsl:attribute>
|
||||
<xsl:attribute name="margin-top">1cm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="title-2" use-attribute-sets="title">
|
||||
<xsl:attribute name="font-style">normal</xsl:attribute>
|
||||
<xsl:attribute name="font-size">18pt</xsl:attribute>
|
||||
<xsl:attribute-set name="title-1" use-attribute-sets="title">
|
||||
<xsl:attribute name="text-align">right</xsl:attribute>
|
||||
<xsl:attribute name="color"><xsl:value-of select="$c_main"/></xsl:attribute>
|
||||
<xsl:attribute name="padding-top">1cm</xsl:attribute>
|
||||
<xsl:attribute name="padding-bottom">1cm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="border-top">
|
||||
<xsl:attribute name="border-before-width">
|
||||
@@ -90,9 +62,12 @@
|
||||
<xsl:value-of select="$border-style"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="border-before-color">
|
||||
<xsl:value-of select="$border-color"/>
|
||||
<xsl:value-of select="$c_support_dark"/>
|
||||
</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="main-color">
|
||||
<xsl:attribute name="color"><xsl:value-of select="$c_main"/></xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="td">
|
||||
<xsl:attribute name="border-collapse">separate</xsl:attribute>
|
||||
<xsl:attribute name="border-spacing">5mm</xsl:attribute>
|
||||
@@ -102,6 +77,28 @@
|
||||
<xsl:attribute name="padding-top">5pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="table-shading">
|
||||
<xsl:attribute name="background-color">#EEEEEE</xsl:attribute>
|
||||
<xsl:attribute name="background-color"><xsl:value-of select="$c_support_light"/></xsl:attribute>
|
||||
<xsl:attribute name="border-color"><xsl:value-of select="$c_support_subtlydarkerlight"/></xsl:attribute>
|
||||
<xsl:attribute name="margin-bottom" select="$large-space"/>
|
||||
<xsl:attribute name="padding-left">-8pt</xsl:attribute>
|
||||
<xsl:attribute name="border-style">solid</xsl:attribute>
|
||||
<xsl:attribute name="border-width">1px</xsl:attribute>
|
||||
<xsl:attribute name="table-layout">fixed</xsl:attribute>
|
||||
<xsl:attribute name="width">100%</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="footer">
|
||||
<xsl:attribute name="text-align-last">center</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="header">
|
||||
<xsl:attribute name="color"><xsl:value-of select="$c_support_medium"/></xsl:attribute>
|
||||
<xsl:attribute name="border-color"><xsl:value-of select="$c_support_dark"/></xsl:attribute>
|
||||
<xsl:attribute name="padding-top">1cm</xsl:attribute>
|
||||
<xsl:attribute name="border-before-width">1px</xsl:attribute>
|
||||
<xsl:attribute name="border-before-style">solid</xsl:attribute>
|
||||
<xsl:attribute name="text-align">right</xsl:attribute>
|
||||
<!-- need to set margin-right to 0cm to force block to accept padding -->
|
||||
<xsl:attribute name="margin-right">0cm</xsl:attribute>
|
||||
<xsl:attribute name="padding-right">2cm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
||||
@@ -8,184 +8,19 @@
|
||||
|
||||
<!-- variables -->
|
||||
|
||||
<xsl:variable name="medium-space">10pt</xsl:variable>
|
||||
|
||||
|
||||
<xsl:variable name="medium-space">8pt</xsl:variable>
|
||||
|
||||
<!-- Text -->
|
||||
|
||||
<xsl:attribute-set name="title" use-attribute-sets="bold">
|
||||
<xsl:attribute name="keep-with-next.within-page">always</xsl:attribute>
|
||||
<xsl:attribute name="text-align">center</xsl:attribute>
|
||||
<xsl:attribute name="color">white</xsl:attribute>
|
||||
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
||||
<xsl:attribute name="text-transform">uppercase</xsl:attribute>
|
||||
<!-- letter spacing is dodgy in fop when there are certain characters in the string (e.g. a 'V'); commenting this out until that is fixed -->
|
||||
<!-- it's also dodgy in combination with centered text, btw -->
|
||||
<!--<xsl:attribute name="letter-spacing.precedence">0</xsl:attribute>
|
||||
<xsl:attribute name="letter-spacing.optimum">3mm</xsl:attribute>
|
||||
<xsl:attribute name="letter-spacing.minimum">3mm</xsl:attribute>
|
||||
<xsl:attribute name="letter-spacing.maximum">3mm</xsl:attribute>-->
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="title-0" use-attribute-sets="title">
|
||||
<xsl:attribute name="font-size">18pt</xsl:attribute>
|
||||
<xsl:attribute name="margin-bottom">1cm</xsl:attribute>
|
||||
<xsl:attribute name="background-color">#FF5C00</xsl:attribute>
|
||||
<xsl:attribute name="text-transform">uppercase</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="title-1" use-attribute-sets="title">
|
||||
<xsl:attribute name="font-size">18pt</xsl:attribute>
|
||||
<xsl:attribute name="margin-bottom">1cm</xsl:attribute>
|
||||
<xsl:attribute name="background-color">#FF5C00</xsl:attribute>
|
||||
<xsl:attribute name="text-transform">uppercase</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="title-2" use-attribute-sets="title">
|
||||
<xsl:attribute name="font-style">italic</xsl:attribute>
|
||||
<xsl:attribute name="font-size">14pt</xsl:attribute>
|
||||
<xsl:attribute name="margin-bottom">0.8cm</xsl:attribute>
|
||||
<xsl:attribute name="background-color">#999999</xsl:attribute>
|
||||
<xsl:attribute name="text-transform">uppercase</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="title-3" use-attribute-sets="title">
|
||||
<xsl:attribute name="font-size">14pt</xsl:attribute>
|
||||
<xsl:attribute name="margin-bottom">0.8cm</xsl:attribute>
|
||||
<xsl:attribute name="background-color">#999999</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="title-4" use-attribute-sets="title">
|
||||
<xsl:attribute name="margin-bottom">5pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="title-client" use-attribute-sets="title-0">
|
||||
<xsl:attribute name="background-color">#999999</xsl:attribute>
|
||||
<xsl:attribute name="text-transform">uppercase</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="for">
|
||||
<xsl:attribute name="font-size">16pt</xsl:attribute>
|
||||
<xsl:attribute name="text-align">center</xsl:attribute>
|
||||
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
||||
<xsl:attribute name="margin-bottom">1cm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="p">
|
||||
<xsl:attribute name="margin-bottom">
|
||||
<xsl:value-of select="$medium-space"/>
|
||||
<xsl:value-of select="$small-space"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="line-height">18pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="list" use-attribute-sets="p"/>
|
||||
<xsl:attribute-set name="last">
|
||||
<xsl:attribute name="margin-bottom">
|
||||
<xsl:value-of select="$very-large-space"/>
|
||||
</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="pre" use-attribute-sets="borders TableFont">
|
||||
<xsl:attribute name="border-style">double</xsl:attribute>
|
||||
<xsl:attribute name="border-width">2pt</xsl:attribute>
|
||||
<xsl:attribute name="margin-bottom">
|
||||
<xsl:value-of select="$medium-space"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="white-space-collapse">false</xsl:attribute>
|
||||
<xsl:attribute name="linefeed-treatment">preserve</xsl:attribute>
|
||||
<xsl:attribute name="white-space-treatment">preserve</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="finding-meta">
|
||||
<xsl:attribute name="margin-bottom" select="$small-space"/>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!-- Pages -->
|
||||
<xsl:attribute-set name="PortraitPage">
|
||||
<xsl:attribute name="margin-top">2cm</xsl:attribute>
|
||||
<xsl:attribute name="margin-bottom">1.8cm</xsl:attribute>
|
||||
<xsl:attribute name="margin-left">2cm</xsl:attribute>
|
||||
<xsl:attribute name="margin-right">2cm</xsl:attribute>
|
||||
<xsl:attribute name="page-height">29.7cm</xsl:attribute>
|
||||
<xsl:attribute name="page-width">21.0cm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="region-body-cover">
|
||||
<xsl:attribute name="margin-top">1cm</xsl:attribute>
|
||||
<xsl:attribute name="margin-bottom">1cm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="region-before-cover">
|
||||
<xsl:attribute name="precedence">true</xsl:attribute>
|
||||
<xsl:attribute name="extent">0.6cm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="region-after-cover">
|
||||
<xsl:attribute name="precedence">true</xsl:attribute>
|
||||
<xsl:attribute name="extent">0.6cm</xsl:attribute>
|
||||
<xsl:attribute name="padding">0</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="region-body-content">
|
||||
<xsl:attribute name="margin-top">1cm</xsl:attribute>
|
||||
<xsl:attribute name="margin-bottom">1cm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="region-before-content">
|
||||
<xsl:attribute name="precedence">true</xsl:attribute>
|
||||
<xsl:attribute name="extent">0.6cm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="region-after-content">
|
||||
<xsl:attribute name="precedence">true</xsl:attribute>
|
||||
<xsl:attribute name="extent">0.6cm</xsl:attribute>
|
||||
<xsl:attribute name="padding">0</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="header">
|
||||
<xsl:attribute name="text-align">right</xsl:attribute>
|
||||
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="footer">
|
||||
<xsl:attribute name="text-align-last">justify</xsl:attribute>
|
||||
<xsl:attribute name="background-image"
|
||||
>url(../graphics/frontpage_quote.jpg)</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!-- colors -->
|
||||
<xsl:attribute-set name="bg-orange">
|
||||
<xsl:attribute name="background-color">#FF5C00</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!-- graphics -->
|
||||
<xsl:attribute-set name="graphics-block">
|
||||
<xsl:attribute name="text-align">center</xsl:attribute>
|
||||
<xsl:attribute name="margin-bottom" select="$small-space"/>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="logo">
|
||||
<xsl:attribute name="padding-top">2cm</xsl:attribute>
|
||||
<xsl:attribute name="padding-bottom">3cm</xsl:attribute>
|
||||
<xsl:attribute name="src">url(../graphics/logo.png)</xsl:attribute>
|
||||
<xsl:attribute name="width">70mm</xsl:attribute>
|
||||
<xsl:attribute name="content-width">scale-to-fit</xsl:attribute>
|
||||
<xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
|
||||
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!-- tables -->
|
||||
<xsl:attribute-set name="borders">
|
||||
<xsl:attribute name="border-width">
|
||||
<xsl:value-of select="$border-width"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="border-style">
|
||||
<xsl:value-of select="$border-style"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="border-color">
|
||||
<xsl:value-of select="$border-color"/>
|
||||
</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="th" use-attribute-sets="td bg-orange"/>
|
||||
<xsl:attribute-set name="td">
|
||||
<xsl:attribute name="padding">2pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="table">
|
||||
<xsl:attribute name="margin-bottom" select="$small-space"/>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!-- lists -->
|
||||
<xsl:attribute-set name="li">
|
||||
<xsl:attribute name="margin-bottom" select="$small-space"/>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!-- ToC -->
|
||||
<xsl:attribute-set name="index" use-attribute-sets="break-after"/>
|
||||
|
||||
<!-- Breaks -->
|
||||
<xsl:attribute-set name="break-before">
|
||||
<xsl:attribute name="break-before">page</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="break-after">
|
||||
<xsl:attribute name="break-after">page</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
</xsl:stylesheet>
|
||||
@@ -1,70 +1,44 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
exclude-result-prefixes="xs"
|
||||
version="2.0">
|
||||
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs" version="2.0">
|
||||
|
||||
<xsl:import href="styles.xslt"/>
|
||||
|
||||
<!-- variables -->
|
||||
|
||||
<xsl:variable name="medium-space">12pt</xsl:variable>
|
||||
|
||||
<xsl:attribute-set name="title" use-attribute-sets="bold">
|
||||
<xsl:attribute name="keep-with-next.within-page">always</xsl:attribute>
|
||||
<xsl:attribute name="text-align">center</xsl:attribute>
|
||||
<xsl:attribute name="color">white</xsl:attribute>
|
||||
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
||||
<xsl:attribute name="text-transform">uppercase</xsl:attribute>
|
||||
<!-- letter spacing is dodgy in fop when there are certain characters in the string (e.g. a 'V'); commenting this out until that is fixed -->
|
||||
<!-- it's also dodgy in combination with centered text, btw -->
|
||||
<!--<xsl:attribute name="letter-spacing.precedence">0</xsl:attribute>
|
||||
<xsl:attribute name="letter-spacing.optimum">3mm</xsl:attribute>
|
||||
<xsl:attribute name="letter-spacing.minimum">3mm</xsl:attribute>
|
||||
<xsl:attribute name="letter-spacing.maximum">3mm</xsl:attribute>-->
|
||||
</xsl:attribute-set>
|
||||
|
||||
|
||||
<xsl:attribute-set name="PortraitPage">
|
||||
<xsl:attribute name="margin-top">0.5cm</xsl:attribute>
|
||||
<xsl:attribute name="margin-bottom">1.5cm</xsl:attribute>
|
||||
<xsl:attribute name="margin-left">1.5cm</xsl:attribute>
|
||||
<xsl:attribute name="margin-right">1.5cm</xsl:attribute>
|
||||
<xsl:attribute name="margin-left">2cm</xsl:attribute>
|
||||
<xsl:attribute name="margin-right">2cm</xsl:attribute>
|
||||
<xsl:attribute name="page-height">29.7cm</xsl:attribute>
|
||||
<xsl:attribute name="page-width">21.0cm</xsl:attribute>
|
||||
<xsl:attribute name="line-height">5.5mm</xsl:attribute>
|
||||
<xsl:attribute name="text-align-last">right</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="region-body-cover">
|
||||
<xsl:attribute name="margin-top">3.6cm</xsl:attribute>
|
||||
<xsl:attribute name="margin-bottom">1cm</xsl:attribute>
|
||||
<xsl:attribute-set name="region-body-first">
|
||||
<xsl:attribute name="margin-top">3.7cm</xsl:attribute>
|
||||
<xsl:attribute name="margin-bottom">2.8cm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="region-before-cover">
|
||||
<xsl:attribute-set name="region-before-first">
|
||||
<xsl:attribute name="precedence">true</xsl:attribute>
|
||||
<xsl:attribute name="extent">2.7cm</xsl:attribute>
|
||||
<xsl:attribute name="extent">3.6cm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="region-after-cover">
|
||||
<xsl:attribute-set name="region-after-first">
|
||||
<xsl:attribute name="precedence">true</xsl:attribute>
|
||||
<xsl:attribute name="extent">0.6cm</xsl:attribute>
|
||||
<xsl:attribute name="extent">2cm</xsl:attribute>
|
||||
<xsl:attribute name="padding">0</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="region-body-content">
|
||||
<xsl:attribute-set name="region-body-rest">
|
||||
<xsl:attribute name="margin-top">2cm</xsl:attribute>
|
||||
<xsl:attribute name="margin-bottom">1cm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="region-before-content">
|
||||
<xsl:attribute-set name="region-before-rest">
|
||||
<xsl:attribute name="precedence">true</xsl:attribute>
|
||||
<xsl:attribute name="extent">0.6cm</xsl:attribute>
|
||||
<xsl:attribute name="extent">1cm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="region-after-content">
|
||||
<xsl:attribute-set name="region-after-rest">
|
||||
<xsl:attribute name="precedence">true</xsl:attribute>
|
||||
<xsl:attribute name="extent">0.6cm</xsl:attribute>
|
||||
<xsl:attribute name="extent">2cm</xsl:attribute>
|
||||
<xsl:attribute name="padding">0</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="header">
|
||||
<xsl:attribute name="text-align">right</xsl:attribute>
|
||||
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="footer">
|
||||
<xsl:attribute name="text-align">center</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="logo">
|
||||
<xsl:attribute name="padding-top">0cm</xsl:attribute>
|
||||
<xsl:attribute name="padding-bottom">0cm</xsl:attribute>
|
||||
@@ -74,14 +48,18 @@
|
||||
<xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
|
||||
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="title-0" use-attribute-sets="title">
|
||||
<xsl:attribute-set name="title-0" use-attribute-sets="title bg-orange">
|
||||
<xsl:attribute name="font-size">18pt</xsl:attribute>
|
||||
<xsl:attribute name="background-color">#FF5C00</xsl:attribute>
|
||||
<xsl:attribute name="margin-top">1cm</xsl:attribute>
|
||||
<xsl:attribute name="margin-right">0cm</xsl:attribute>
|
||||
<xsl:attribute name="padding-right">0.3cm</xsl:attribute>
|
||||
<xsl:attribute name="text-align">center</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="title-2" use-attribute-sets="title">
|
||||
<xsl:attribute name="font-style">normal</xsl:attribute>
|
||||
<xsl:attribute name="font-size">18pt</xsl:attribute>
|
||||
<xsl:attribute name="margin-left">0cm</xsl:attribute>
|
||||
<xsl:attribute name="padding-left">0.3cm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="border-top">
|
||||
<xsl:attribute name="border-before-width">
|
||||
@@ -97,23 +75,21 @@
|
||||
<xsl:attribute-set name="td">
|
||||
<xsl:attribute name="border-collapse">separate</xsl:attribute>
|
||||
<xsl:attribute name="border-spacing">5mm</xsl:attribute>
|
||||
<xsl:attribute name="padding-bottom"><xsl:value-of select="$medium-space"/></xsl:attribute>
|
||||
<xsl:attribute name="padding-top">2pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="padding-top">
|
||||
<xsl:attribute name="padding-top">5pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="table-shading">
|
||||
<xsl:attribute name="background-color">#EEEEEE</xsl:attribute>
|
||||
<xsl:attribute-set name="table-shading" use-attribute-sets="findingTable">
|
||||
<xsl:attribute name="border-left">1px solid #e4e4e4</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="important">
|
||||
<xsl:attribute name="text-align">center</xsl:attribute>
|
||||
<xsl:attribute name="font-size">16pt</xsl:attribute>
|
||||
<xsl:attribute name="margin-top">1cm</xsl:attribute>
|
||||
<xsl:attribute name="margin-bottom">1cm</xsl:attribute>
|
||||
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
||||
<xsl:attribute-set name="footer">
|
||||
<xsl:attribute name="text-align-last">center</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="p">
|
||||
<xsl:attribute name="padding-bottom"><xsl:value-of select="$medium-space"/></xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
|
||||
<xsl:attribute-set name="sidetab"/>
|
||||
<xsl:attribute-set name="sidetab-textblock"/>
|
||||
<xsl:attribute-set name="for"/>
|
||||
<xsl:attribute-set name="coverfooter"/>
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
||||
@@ -6,79 +6,7 @@
|
||||
|
||||
<xsl:import href="styles.xslt"/>
|
||||
|
||||
<!-- variables -->
|
||||
|
||||
<xsl:variable name="medium-space">8pt</xsl:variable>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Text -->
|
||||
|
||||
<xsl:attribute-set name="title">
|
||||
<xsl:attribute name="keep-with-next.within-page">always</xsl:attribute>
|
||||
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="title-0" use-attribute-sets="title">
|
||||
<xsl:attribute name="text-align">center</xsl:attribute>
|
||||
<xsl:attribute name="font-size">16pt</xsl:attribute>
|
||||
<xsl:attribute name="margin-bottom">1cm</xsl:attribute>
|
||||
<xsl:attribute name="background-color">orange</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="title-1" use-attribute-sets="title">
|
||||
<xsl:attribute name="font-size">16pt</xsl:attribute>
|
||||
<xsl:attribute name="margin-bottom">1cm</xsl:attribute>
|
||||
<xsl:attribute name="background-color">orange</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="title-2" use-attribute-sets="title">
|
||||
<xsl:attribute name="font-style">italic</xsl:attribute>
|
||||
<xsl:attribute name="font-size">14pt</xsl:attribute>
|
||||
<xsl:attribute name="margin-bottom">0.8cm</xsl:attribute>
|
||||
<xsl:attribute name="background-color">silver</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="title-3" use-attribute-sets="title">
|
||||
<xsl:attribute name="font-size">14pt</xsl:attribute>
|
||||
<xsl:attribute name="margin-bottom">0.8cm</xsl:attribute>
|
||||
<xsl:attribute name="background-color">silver</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="title-4" use-attribute-sets="title">
|
||||
<xsl:attribute name="margin-bottom">5pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="title-client" use-attribute-sets="title-0">
|
||||
<xsl:attribute name="background-color">silver</xsl:attribute>
|
||||
<xsl:attribute name="margin-bottom">6cm</xsl:attribute>
|
||||
<xsl:attribute name="text-transform">capitalize</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="for">
|
||||
<xsl:attribute name="text-align">center</xsl:attribute>
|
||||
<xsl:attribute name="margin-bottom">1cm</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="p">
|
||||
<xsl:attribute name="margin-bottom">
|
||||
<xsl:value-of select="$small-space"/>
|
||||
</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="toc-block">
|
||||
<xsl:attribute name="background-color">orange</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="logo">
|
||||
<xsl:attribute name="padding-top">2cm</xsl:attribute>
|
||||
<xsl:attribute name="padding-bottom">3cm</xsl:attribute>
|
||||
<xsl:attribute name="src">url(../graphics/logo.png)</xsl:attribute>
|
||||
<xsl:attribute name="width">70mm</xsl:attribute>
|
||||
<xsl:attribute name="content-width">scale-to-fit</xsl:attribute>
|
||||
<xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
|
||||
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
|
||||
|
||||
<!-- colors -->
|
||||
<xsl:attribute-set name="bg-orange">
|
||||
<xsl:attribute name="background-color">orange</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
|
||||
<!-- Retest status colors -->
|
||||
<xsl:attribute-set name="status-new"><!-- also used by unresolved -->
|
||||
<xsl:attribute name="color">#CC4900</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
@@ -88,7 +16,45 @@
|
||||
<xsl:attribute-set name="status-not_retested">
|
||||
<xsl:attribute name="color">#FE9920</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!-- Text -->
|
||||
<xsl:attribute-set name="p">
|
||||
<xsl:attribute name="margin-bottom">
|
||||
<xsl:value-of select="$small-space"/>
|
||||
</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!-- Pages -->
|
||||
<xsl:attribute-set name="region-body-cover">
|
||||
<xsl:attribute name="background-image"
|
||||
>url(../graphics/frontpage_report.jpg)</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!-- Findings -->
|
||||
<xsl:attribute-set name="findingTable">
|
||||
<xsl:attribute name="background-color"><xsl:value-of select="$c_support_light"/></xsl:attribute>
|
||||
<xsl:attribute name="border-color"><xsl:value-of select="$c_support_subtlydarkerlight"/></xsl:attribute>
|
||||
<xsl:attribute name="margin-bottom" select="$large-space"/>
|
||||
<xsl:attribute name="padding-left">-8pt</xsl:attribute>
|
||||
<xsl:attribute name="border-style">solid</xsl:attribute>
|
||||
<xsl:attribute name="border-left-width">1px</xsl:attribute>
|
||||
<xsl:attribute name="border-right-width">1px</xsl:attribute>
|
||||
<xsl:attribute name="border-bottom-width">1px</xsl:attribute>
|
||||
<xsl:attribute name="table-layout">fixed</xsl:attribute>
|
||||
<xsl:attribute name="width">100%</xsl:attribute>
|
||||
<xsl:attribute name="keep-together.within-page">always</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!-- Charts -->
|
||||
<xsl:attribute-set name="pieChartTable" use-attribute-sets="indent">
|
||||
<xsl:attribute name="table-layout">fixed</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="pieLegendTable">
|
||||
<xsl:attribute name="background-color"><xsl:value-of select="$c_support_light"/></xsl:attribute>
|
||||
<xsl:attribute name="border-color"><xsl:value-of select="$c_support_subtlydarkerlight"/></xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="pieLegendTableCell" use-attribute-sets="indent_reset">
|
||||
<xsl:attribute name="padding-left">4pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
</xsl:stylesheet>
|
||||
</xsl:stylesheet>
|
||||
|
||||
@@ -1,32 +1,79 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
exclude-result-prefixes="xs" xmlns:fo="http://www.w3.org/1999/XSL/Format"
|
||||
version="2.0">
|
||||
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs"
|
||||
xmlns:fo="http://www.w3.org/1999/XSL/Format" version="2.0">
|
||||
|
||||
<xsl:template match="table">
|
||||
<fo:block xsl:use-attribute-sets="p"><fo:table table-layout="fixed" width="100%" xsl:use-attribute-sets="table">
|
||||
<xsl:call-template name="checkIfLast"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="@cols">
|
||||
<xsl:call-template name="build-columns">
|
||||
<xsl:with-param name="cols" select="concat(@cols, ' ')"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when><!--
|
||||
<xsl:otherwise>
|
||||
<fo:table-column column-width="100%"/>
|
||||
</xsl:otherwise>-->
|
||||
</xsl:choose>
|
||||
<fo:table-body>
|
||||
<xsl:apply-templates select="*"/>
|
||||
</fo:table-body>
|
||||
</fo:table></fo:block>
|
||||
<!-- calculate total width of columns (if any) -->
|
||||
<xsl:variable name="colnumbers" select="replace(@cols, 'cm', '')"/>
|
||||
<xsl:variable name="coltotalwidth" select="sum(for $s in tokenize($colnumbers, '\s') return number($s))"/>
|
||||
<fo:block xsl:use-attribute-sets="table">
|
||||
<fo:table table-layout="fixed" width="100%"><!-- outer table to center the inner one (thanks, FOP :/) -->
|
||||
<fo:table-column column-width="proportional-column-width(1)"/>
|
||||
<fo:table-column>
|
||||
<xsl:choose>
|
||||
<xsl:when test="@cols"><!-- user's table has a cols attr, so we can set the middle column to be as wide as the total column width of her table -->
|
||||
<xsl:attribute name="column-width" select="concat($coltotalwidth, 'cm')"></xsl:attribute>
|
||||
</xsl:when>
|
||||
<xsl:when test="@width"><!-- user's table has a width attr, so we can set the middle column to be that width -->
|
||||
<xsl:attribute name="column-width" select="@width"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise><!-- if not, we got to take a gamble -->
|
||||
<xsl:attribute name="column-width" select="'proportional-column-width(2)'"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</fo:table-column>
|
||||
<fo:table-column column-width="proportional-column-width(1)"/>
|
||||
<fo:table-body>
|
||||
<fo:table-row>
|
||||
<fo:table-cell column-number="2"><!-- positioning our content in the middle cell -->
|
||||
<fo:block>
|
||||
<!-- this is the start of the actual table the user has created -->
|
||||
<fo:table table-layout="fixed"
|
||||
xsl:use-attribute-sets="table">
|
||||
<xsl:call-template name="checkIfLast"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="@cols">
|
||||
<xsl:attribute name="width" select="concat($coltotalwidth, 'cm')"/>
|
||||
<xsl:call-template name="build-columns">
|
||||
<xsl:with-param name="cols"
|
||||
select="concat(@cols, ' ')"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:when test="@width">
|
||||
<xsl:attribute name="width"><xsl:value-of select="@width"/></xsl:attribute>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:attribute name="width">100%</xsl:attribute>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<fo:table-body>
|
||||
<xsl:if test="@border = '1'">
|
||||
<xsl:attribute name="border-style">
|
||||
<xsl:text>solid</xsl:text>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="border-color">
|
||||
<xsl:text>black</xsl:text>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="border-width">
|
||||
<xsl:text>1pt</xsl:text>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:apply-templates select="*"/>
|
||||
</fo:table-body>
|
||||
</fo:table>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
</fo:table-body>
|
||||
</fo:table>
|
||||
</fo:block>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template name="build-columns">
|
||||
<xsl:param name="cols"/>
|
||||
|
||||
<xsl:if test="string-length(normalize-space($cols))">
|
||||
|
||||
<xsl:if test="string-length(normalize-space($cols))"><!-- check if @cols has content -->
|
||||
<xsl:variable name="next-col">
|
||||
<xsl:value-of select="substring-before($cols, ' ')"/>
|
||||
</xsl:variable>
|
||||
@@ -34,23 +81,23 @@
|
||||
<xsl:value-of select="substring-after($cols, ' ')"/>
|
||||
</xsl:variable>
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($next-col, 'mm')">
|
||||
<xsl:when test="contains($next-col, 'cm')">
|
||||
<fo:table-column column-width="{$next-col}"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="number($next-col) > 0">
|
||||
<fo:table-column column-width="{concat($next-col, 'mm')}"/>
|
||||
<fo:table-column column-width="{concat($next-col, 'cm')}"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<fo:table-column column-width="100%"/>
|
||||
<fo:table-column column-width="proportional-column-width(1)"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
|
||||
<xsl:call-template name="build-columns">
|
||||
<xsl:with-param name="cols" select="concat($remaining-cols, ' ')"/>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="td">
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
<xsl:if test="@colspan">
|
||||
@@ -64,17 +111,19 @@
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:if
|
||||
test="@border='1' or
|
||||
ancestor::tr[@border='1'] or
|
||||
ancestor::thead[@border='1'] or
|
||||
ancestor::table[@border='1']">
|
||||
<xsl:attribute name="border-style">
|
||||
test="
|
||||
(@border = '1' or
|
||||
ancestor::tr[@border = '1'] or
|
||||
ancestor::thead[@border = '1'] or
|
||||
ancestor::table[@border = '1']) and
|
||||
following-sibling::*">
|
||||
<xsl:attribute name="border-end-style">
|
||||
<xsl:text>solid</xsl:text>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="border-color">
|
||||
<xsl:text>black</xsl:text>
|
||||
<xsl:attribute name="border-end-color">
|
||||
<xsl:text>#e4e4e4</xsl:text>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="border-width">
|
||||
<xsl:attribute name="border-end-width">
|
||||
<xsl:text>1pt</xsl:text>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
@@ -82,13 +131,13 @@
|
||||
<xsl:choose>
|
||||
<xsl:when test="@align">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@align='center'">
|
||||
<xsl:when test="@align = 'center'">
|
||||
<xsl:text>center</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="@align='right'">
|
||||
<xsl:when test="@align = 'right'">
|
||||
<xsl:text>right</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="@align='justify'">
|
||||
<xsl:when test="@align = 'justify'">
|
||||
<xsl:text>justify</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
@@ -98,13 +147,13 @@
|
||||
</xsl:when>
|
||||
<xsl:when test="ancestor::tr[@align]">
|
||||
<xsl:choose>
|
||||
<xsl:when test="ancestor::tr/@align='center'">
|
||||
<xsl:when test="ancestor::tr/@align = 'center'">
|
||||
<xsl:text>center</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="ancestor::tr/@align='right'">
|
||||
<xsl:when test="ancestor::tr/@align = 'right'">
|
||||
<xsl:text>right</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="ancestor::tr/@align='justify'">
|
||||
<xsl:when test="ancestor::tr/@align = 'justify'">
|
||||
<xsl:text>justify</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
@@ -117,13 +166,13 @@
|
||||
</xsl:when>
|
||||
<xsl:when test="ancestor::table[@align]">
|
||||
<xsl:choose>
|
||||
<xsl:when test="ancestor::table/@align='center'">
|
||||
<xsl:when test="ancestor::table/@align = 'center'">
|
||||
<xsl:text>center</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="ancestor::table/@align='right'">
|
||||
<xsl:when test="ancestor::table/@align = 'right'">
|
||||
<xsl:text>right</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="ancestor::table/@align='justify'">
|
||||
<xsl:when test="ancestor::table/@align = 'justify'">
|
||||
<xsl:text>justify</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
@@ -137,15 +186,15 @@
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<fo:block text-align="{$align}">
|
||||
<xsl:apply-templates select="*|text()"/>
|
||||
<xsl:apply-templates select="* | text()"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="tfoot">
|
||||
<xsl:apply-templates select="tr"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="th">
|
||||
<fo:table-cell xsl:use-attribute-sets="th">
|
||||
<xsl:if test="@colspan">
|
||||
@@ -158,43 +207,33 @@
|
||||
<xsl:value-of select="@rowspan"/>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:if
|
||||
test="@border='1' or
|
||||
ancestor::tr[@border='1'] or
|
||||
ancestor::table[@border='1']">
|
||||
<xsl:attribute name="border-style">
|
||||
<xsl:text>solid</xsl:text>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="border-color">
|
||||
<xsl:text>black</xsl:text>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="border-width">
|
||||
<xsl:text>1pt</xsl:text>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
<fo:block>
|
||||
<xsl:apply-templates select="*|text()"/>
|
||||
<xsl:apply-templates select="* | text()"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="thead">
|
||||
<xsl:apply-templates select="tr"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="tr">
|
||||
<xsl:choose>
|
||||
<xsl:when test="not(child::td)">
|
||||
<!-- don't have th widows -->
|
||||
<fo:table-row keep-with-next.within-column="always">
|
||||
<xsl:apply-templates select="*|text()"/>
|
||||
<xsl:apply-templates select="* | text()"/>
|
||||
</fo:table-row>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<fo:table-row>
|
||||
<xsl:apply-templates select="*|text()"/>
|
||||
<xsl:if test="position() mod 2 = 0">
|
||||
<xsl:attribute name="background-color">#ededed</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:apply-templates select="* | text()"/>
|
||||
</fo:table-row>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
||||
@@ -7,9 +7,10 @@
|
||||
<fo:block xsl:use-attribute-sets="title-toc">Table of Contents</fo:block>
|
||||
<fo:block xsl:use-attribute-sets="index">
|
||||
<fo:block>
|
||||
<fo:table width="100%">
|
||||
<fo:table-column/>
|
||||
<fo:table-column column-width="7mm"/>
|
||||
<fo:table table-layout="fixed" width="100%">
|
||||
<fo:table-column column-width="proportional-column-width(14)"/>
|
||||
<fo:table-column column-width="proportional-column-width(79)"/>
|
||||
<fo:table-column column-width="proportional-column-width(7)"/>
|
||||
<fo:table-body>
|
||||
<xsl:apply-templates select="/" mode="toc"/>
|
||||
</fo:table-body>
|
||||
@@ -42,21 +43,41 @@
|
||||
<xsl:template name="ToC">
|
||||
<xsl:param name="execsummary" tunnel="yes"/>
|
||||
<fo:table-row>
|
||||
<fo:table-cell text-align-last="justify">
|
||||
<fo:table-cell xsl:use-attribute-sets="tocCell">
|
||||
<fo:block>
|
||||
<xsl:if test="parent::pentest_report">
|
||||
<!-- We're in a top-level section, so add some extra styling -->
|
||||
<xsl:call-template name="topLevelToCEntry"/>
|
||||
</xsl:if>
|
||||
<fo:basic-link>
|
||||
<xsl:attribute name="internal-destination">
|
||||
<xsl:value-of select="@id"/>
|
||||
</xsl:attribute>
|
||||
<xsl:call-template name="tocContent"/>
|
||||
<xsl:call-template name="tocContent_Numbering"/>
|
||||
</fo:basic-link>
|
||||
<xsl:text> </xsl:text>
|
||||
<fo:leader leader-pattern="dots" leader-alignment="reference-area"
|
||||
leader-length.maximum="21cm"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell padding-right="3pt" display-align="after">
|
||||
<fo:table-cell xsl:use-attribute-sets="tocCell">
|
||||
<fo:block>
|
||||
<xsl:if test="parent::pentest_report">
|
||||
<!-- We're in a top-level section, so add some extra styling -->
|
||||
<xsl:call-template name="topLevelToCEntry"/>
|
||||
</xsl:if>
|
||||
<fo:basic-link>
|
||||
<xsl:attribute name="internal-destination">
|
||||
<xsl:value-of select="@id"/>
|
||||
</xsl:attribute>
|
||||
<xsl:call-template name="tocContent_Title"/>
|
||||
</fo:basic-link>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell padding-right="3pt" display-align="after"
|
||||
xsl:use-attribute-sets="tocCell">
|
||||
<fo:block text-align="right">
|
||||
<xsl:if test="parent::pentest_report">
|
||||
<!-- We're in a top-level section, so add some extra styling -->
|
||||
<xsl:call-template name="topLevelToCEntry"/>
|
||||
</xsl:if>
|
||||
<fo:basic-link>
|
||||
<xsl:attribute name="internal-destination">
|
||||
<xsl:value-of select="@id"/>
|
||||
@@ -79,19 +100,18 @@
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="tocContent">
|
||||
<xsl:call-template name="tocContent_Numbering"/>
|
||||
<xsl:text>  </xsl:text>
|
||||
<xsl:call-template name="tocContent_Title"/>
|
||||
<xsl:template name="topLevelToCEntry">
|
||||
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
||||
<xsl:attribute name="margin-top">4mm</xsl:attribute>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template name="tocContent_Title">
|
||||
<xsl:apply-templates select="title" mode="toc"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="title" mode="toc">
|
||||
<xsl:call-template name="prependNumber"/>
|
||||
<xsl:call-template name="prependId"/>
|
||||
<xsl:apply-templates/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
@@ -5,33 +5,46 @@
|
||||
<xsl:template match="waivers">
|
||||
<xsl:for-each
|
||||
select="/offerte/meta/permission_parties/client | /offerte/meta/permission_parties/party">
|
||||
|
||||
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="local-name() = 'client'">
|
||||
<fo:block margin-bottom="1.5cm">
|
||||
<!--only if it's the first (2nd and more go each in their own file) -->
|
||||
<xsl:attribute name="break-before">page</xsl:attribute>
|
||||
<!-- choose waiver -->
|
||||
<!-- need to get these params here so they resolve correctly when generating waivers out of context -->
|
||||
<xsl:call-template name="chooseWaiver">
|
||||
<xsl:with-param name="signee_long" tunnel="yes"><xsl:value-of select="full_name"/></xsl:with-param>
|
||||
<xsl:with-param name="signee_short" tunnel="yes"><xsl:value-of select="short_name"/></xsl:with-param>
|
||||
<xsl:with-param name="signee_waiver_rep" tunnel="yes"><xsl:value-of select="waiver_rep"/></xsl:with-param>
|
||||
<xsl:with-param name="signee_street" tunnel="yes"><xsl:value-of select="address"/></xsl:with-param>
|
||||
<xsl:with-param name="signee_pc" tunnel="yes"><xsl:value-of select="postal_code"/></xsl:with-param>
|
||||
<xsl:with-param name="signee_city" tunnel="yes"><xsl:value-of select="city"/></xsl:with-param>
|
||||
<xsl:with-param name="signee_country" tunnel="yes"><xsl:value-of select="country"/>
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="client" tunnel="yes">
|
||||
<xsl:choose>
|
||||
<xsl:when test="local-name() = 'client'"><xsl:value-of select="true()"/></xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select="false()"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</fo:block>
|
||||
<!--only if it's the first (2nd and more go each in their own file) -->
|
||||
<fo:block margin-bottom="1.5cm" break-before="page">
|
||||
<!-- choose waiver -->
|
||||
<!-- need to get these params here so they resolve correctly when generating waivers out of context -->
|
||||
<xsl:call-template name="chooseWaiver">
|
||||
<xsl:with-param name="signee_long" tunnel="yes">
|
||||
<xsl:value-of select="full_name"/>
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="signee_short" tunnel="yes">
|
||||
<xsl:value-of select="short_name"/>
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="signee_waiver_rep" tunnel="yes">
|
||||
<xsl:value-of select="waiver_rep"/>
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="signee_street" tunnel="yes">
|
||||
<xsl:value-of select="address"/>
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="signee_pc" tunnel="yes">
|
||||
<xsl:value-of select="postal_code"/>
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="signee_city" tunnel="yes">
|
||||
<xsl:value-of select="city"/>
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="signee_country" tunnel="yes">
|
||||
<xsl:value-of select="country"/>
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="client" tunnel="yes">
|
||||
<xsl:choose>
|
||||
<xsl:when test="local-name() = 'client'">
|
||||
<xsl:value-of select="true()"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="false()"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</fo:block>
|
||||
</xsl:when>
|
||||
<xsl:when test="local-name() = 'party'">
|
||||
<!-- create an additional .fo file for every party that needs to sign -->
|
||||
@@ -44,7 +57,7 @@
|
||||
<xsl:result-document href="{$filename}">
|
||||
<fo:root>
|
||||
<xsl:call-template name="layout-master-set"/>
|
||||
<fo:page-sequence master-reference="Report">
|
||||
<fo:page-sequence master-reference="Sections">
|
||||
<xsl:call-template name="page_header"/>
|
||||
<xsl:call-template name="page_footer"/>
|
||||
<fo:flow flow-name="region-body"
|
||||
@@ -52,23 +65,41 @@
|
||||
<fo:block>
|
||||
<fo:block margin-bottom="1.5cm">
|
||||
<!-- choose waiver -->
|
||||
<!-- need to get these params here so they resolve correctly when generating waivers out of context -->
|
||||
<xsl:call-template name="chooseWaiver">
|
||||
<xsl:with-param name="signee_long" tunnel="yes"><xsl:value-of select="full_name"/></xsl:with-param>
|
||||
<xsl:with-param name="signee_short" tunnel="yes"><xsl:value-of select="short_name"/></xsl:with-param>
|
||||
<xsl:with-param name="signee_waiver_rep" tunnel="yes"><xsl:value-of select="waiver_rep"/></xsl:with-param>
|
||||
<xsl:with-param name="signee_street" tunnel="yes"><xsl:value-of select="address"/></xsl:with-param>
|
||||
<xsl:with-param name="signee_pc" tunnel="yes"><xsl:value-of select="postal_code"/></xsl:with-param>
|
||||
<xsl:with-param name="signee_city" tunnel="yes"><xsl:value-of select="city"/></xsl:with-param>
|
||||
<xsl:with-param name="signee_country" tunnel="yes"><xsl:value-of select="country"/>
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="client" tunnel="yes">
|
||||
<xsl:choose>
|
||||
<xsl:when test="local-name() = 'client'"><xsl:value-of select="true()"/></xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select="false()"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
<!-- need to get these params here so they resolve correctly when generating waivers out of context -->
|
||||
<xsl:call-template name="chooseWaiver">
|
||||
<xsl:with-param name="signee_long" tunnel="yes">
|
||||
<xsl:value-of select="full_name"/>
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="signee_short" tunnel="yes">
|
||||
<xsl:value-of select="short_name"/>
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="signee_waiver_rep"
|
||||
tunnel="yes">
|
||||
<xsl:value-of select="waiver_rep"/>
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="signee_street" tunnel="yes">
|
||||
<xsl:value-of select="address"/>
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="signee_pc" tunnel="yes">
|
||||
<xsl:value-of select="postal_code"/>
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="signee_city" tunnel="yes">
|
||||
<xsl:value-of select="city"/>
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="signee_country" tunnel="yes">
|
||||
<xsl:value-of select="country"/>
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="client" tunnel="yes">
|
||||
<xsl:choose>
|
||||
<xsl:when test="local-name() = 'client'">
|
||||
<xsl:value-of select="true()"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="false()"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</fo:block>
|
||||
</fo:block>
|
||||
<fo:block id="EndOfDoc"/>
|
||||
@@ -86,38 +117,25 @@
|
||||
<!-- Still in client/party context here -->
|
||||
<xsl:variable name="signeeID" select="./@id"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="/offerte/waivers/alternative_waiver[@Ref=$signeeID]">
|
||||
<xsl:apply-templates select="/offerte/waivers/alternative_waiver[@Ref=$signeeID]" mode="apply"/>
|
||||
|
||||
|
||||
<xsl:when test="/offerte/waivers/alternative_waiver[@Ref = $signeeID]">
|
||||
<xsl:apply-templates select="/offerte/waivers/alternative_waiver[@Ref = $signeeID]"
|
||||
mode="apply"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:apply-templates select="/offerte/waivers/standard_waiver" mode="apply"/>
|
||||
|
||||
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- waivers should only be generated on call, not when they appear in the doc -->
|
||||
<xsl:template match="alternative_waiver | standard_waiver"/>
|
||||
|
||||
|
||||
<xsl:template match="alternative_waiver | standard_waiver" mode="apply">
|
||||
<xsl:param name="client" tunnel="yes"/>
|
||||
<!-- WAIVER TITLE -->
|
||||
<fo:block xsl:use-attribute-sets="title-1">
|
||||
<xsl:if test="$client = true()">
|
||||
<xsl:text>ANNEX 2</xsl:text>
|
||||
<fo:block/>
|
||||
</xsl:if>
|
||||
</fo:block>
|
||||
<xsl:apply-templates/>
|
||||
<xsl:apply-templates/>
|
||||
<xsl:call-template name="generate_waiver_signature_box"/>
|
||||
|
||||
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template name="generate_waiver_signature_box">
|
||||
<xsl:param name="signee_long" tunnel="yes"/>
|
||||
<xsl:param name="signee_waiver_rep" tunnel="yes"/>
|
||||
@@ -146,8 +164,8 @@
|
||||
<fo:table-cell xsl:use-attribute-sets="td">
|
||||
<fo:block xsl:use-attribute-sets="p"><xsl:call-template name="getString">
|
||||
<xsl:with-param name="stringID" select="'waiver_signed_in'"/>
|
||||
</xsl:call-template>     <xsl:value-of select="$signee_city"
|
||||
/></fo:block>
|
||||
</xsl:call-template>     <xsl:value-of
|
||||
select="$signee_city"/></fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
<fo:table-row>
|
||||
@@ -184,42 +202,42 @@
|
||||
</fo:table>
|
||||
</fo:block>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- deprecated element; ignore if still there -->
|
||||
<xsl:template match="generate_waiver_signature_box"/>
|
||||
|
||||
|
||||
<!-- special waiver placeholders -->
|
||||
<!-- (tunnel ftw ;) -->
|
||||
<xsl:template match="signee_long">
|
||||
<xsl:param name="signee_long" tunnel="yes"/>
|
||||
<xsl:value-of select="$signee_long"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="signee_short">
|
||||
<xsl:param name="signee_short" tunnel="yes"/>
|
||||
<xsl:value-of select="$signee_short"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="signee_street">
|
||||
<xsl:param name="signee_street" tunnel="yes"/>
|
||||
<xsl:value-of select="$signee_street"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="signee_postal_code">
|
||||
<xsl:param name="signee_pc" tunnel="yes"/>
|
||||
<xsl:value-of select="$signee_pc"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="signee_city">
|
||||
<xsl:param name="signee_city" tunnel="yes"/>
|
||||
<xsl:value-of select="$signee_city"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="signee_country">
|
||||
<xsl:param name="signee_country" tunnel="yes"/>
|
||||
<xsl:value-of select="$signee_country"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="signee_waiver_rep">
|
||||
<xsl:param name="signee_waiver_rep" tunnel="yes"/>
|
||||
<xsl:value-of select="$signee_waiver_rep"/>
|
||||
|
||||