changeset 4:c5cf387b5785

Add support for writing incomplete documents
author Benoît Allard <benoit.allard@greenbone.net>
date Mon, 06 Oct 2014 11:24:29 +0200
parents 5d81cea79583
children d62264a643fb
files farolluz/templates/cvrf.j2
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/farolluz/templates/cvrf.j2	Wed Sep 24 17:32:31 2014 +0200
+++ b/farolluz/templates/cvrf.j2	Mon Oct 06 11:24:29 2014 +0200
@@ -44,7 +44,7 @@
 <cvrfdoc xmlns="http://www.icasi.org/CVRF/schema/cvrf/1.1">
   <DocumentTitle>{{ cvrf._title }}</DocumentTitle>
   <DocumentType>{{ cvrf._type }}</DocumentType>
-  {%- with publisher = cvrf._publisher %}
+  {%- with publisher = cvrf._publisher %}{% if publisher %}
   <DocumentPublisher{{ {'Type': publisher._type, 'VendorID': publisher._vendorid} | xmlattr }}>
     {%- if publisher._contact %}
     <ContactDetails>{{ publisher._contact }}</ContactDetails>
@@ -53,8 +53,8 @@
     <IssuingAuthority>{{ publisher._authority }}</IssuingAuthority>
     {%- endif %}
   </DocumentPublisher>
-  {%- endwith %}
-  {%- with tracking = cvrf._tracking %}
+  {%- endif %}{% endwith %}
+  {%- with tracking = cvrf._tracking %}{% if tracking %}
   <DocumentTracking>
     <Identification>
       <ID>{{ tracking._identification._id }}</ID>
@@ -88,7 +88,7 @@
     </Generator>
     {%- endif %}
   </DocumentTracking>
-  {%- endwith %}
+  {%- endif %}{% endwith %}
   {%- if cvrf._notes %}
   <DocumentNotes>
     {%- for note in cvrf._notes %}
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)