Skip to content
Snippets Groups Projects
Commit 2e865bc4 authored by Rolf Niepraschk's avatar Rolf Niepraschk
Browse files

"dcc:statements ..."

parent 1d6ac28c
No related branches found
No related tags found
No related merge requests found
......@@ -28,7 +28,7 @@
{% endfor -%}
</dcc:identifications>
{%- if x.receiptDate %}
<dcc:receiptDate> <hugo
<dcc:receiptDate>
{{x.receiptDate}}
</dcc:receiptDate>
{% endif -%}
......
......@@ -4,7 +4,7 @@
xsi:schemaLocation="https://ptb.de/dcc https://ptb.de/dcc/v3.0.0/dcc.xsd"
xmlns:dcc="https://ptb.de/dcc"
xmlns:si="https://ptb.de/si"
schemaVersion="3.0.0">
schemaVersion="3.1.1">
<!--
DCC - Digital Calibration Certificate
Copyright (C) 2021 - Physikalisch-Technische Bundesanstalt
......@@ -38,6 +38,7 @@
{% include 'xml/calibration_item.xml' %}
{% include 'xml/responsible_persons.xml' %}
{% include 'xml/customer.xml' %}
{% include 'xml/statements.xml' %}
</dcc:administrativeData>
<dcc:measurementResults>
<dcc:measurementResult>
......
{% set x = doc.administrativeData['statements'] %}
{%- if x is defined %}
{# TODO: weitere Einträge ergänzen #}
<dcc:statements>
{%- for i in x['statement'] %}
<dcc:statement>
{%- if i['convention'] is defined %}
<dcc:convention>{{i.convention}}</dcc:convention>
{% endif -%}
{% if i['traceable'] is defined %}
<dcc:traceable>{{i.traceable|lower}}</dcc:traceable>
{% endif -%}
{%- if i['norm'] is defined %}
<dcc:norm>{{i.norm}}</dcc:norm>
{% endif -%}
{%- if i['reference'] is defined %}
<dcc:reference>{{i.reference}}</dcc:reference>
{% endif -%}
{%- if i['declaration'] is defined %}
<dcc:declaration>
{%- for j in i['declaration'] %}
<dcc:content lang="{{j.lang}}">
<![CDATA[{%- for k in j.content %}{{k|safe}}{% endfor -%}]]>
</dcc:content>
{% endfor -%}
</dcc:declaration>
{% endif -%}
{% if i['valid'] is defined %}
<dcc:valid>{{i.valid|lower}}</dcc:valid>
{% endif -%}
{%- if i['date'] is defined %}
<dcc:date>{{i.date}}</dcc:date>
{% endif -%}
{% if i['respAuthority'] is defined %}
<dcc:respAuthority> {# TODO: auch bei customer übernehmen. #}
{% set x1 = i['respAuthority'] %}
{%- if x1['name'] is defined %}
<dcc:name>
{%- for j in x1['name'] %}
<dcc:content lang="{{j.lang}}">
<![CDATA[{%- for k in j.content %}{{k|safe}}{% endfor -%}]]>
</dcc:content>
{% endfor -%}
</dcc:name>
{% endif -%}
{% if x1['eMail'] is defined %}
<dcc:eMail>{{x1.eMail}}</dcc:eMail>
{% endif -%}
<dcc:location>
<dcc:street>{{x1.location.street}}</dcc:street>
{%- if x1.location.streetNo is defined %}
<dcc:streetNo>{{x1.location.streetNo}}</dcc:streetNo>
{% endif -%}
{%- if x1.location.postCode is defined %}
<dcc:postCode>{{x1.location.postCode}}</dcc:postCode>
{% endif -%}
{%- if x1.location.city is defined %}
<dcc:city>{{x1.location.city}}</dcc:city>
{% endif -%}
{%- if x1.location.countryCode is defined %}
<dcc:countryCode>{{x1.location.countryCode}}</dcc:countryCode>
{% endif -%}
</dcc:location>
</dcc:respAuthority>
{% endif -%}
</dcc:statement>
{% endfor -%}
</dcc:statements>
{% endif -%}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment