From bc5dc2df13ae3c1e707548e210821e555ec8ebb5 Mon Sep 17 00:00:00 2001 From: Rolf Niepraschk <Rolf.Niepraschk@ptb.de> Date: Mon, 30 Nov 2020 15:22:57 +0100 Subject: [PATCH] "dcc:content" more compact --- templates/xml/calibration_item.xml | 30 ++++-------------------- templates/xml/calibration_laboratory.xml | 12 ++-------- templates/xml/core_data.xml | 6 +---- templates/xml/customer.xml | 6 +---- templates/xml/influence_conditions.xml | 12 ++-------- templates/xml/responsible_persons.xml | 6 +---- templates/xml/results.xml | 12 ++-------- templates/xml/used_methods.xml | 12 ++-------- templates/xml/used_software.xml | 6 +---- 9 files changed, 17 insertions(+), 85 deletions(-) diff --git a/templates/xml/calibration_item.xml b/templates/xml/calibration_item.xml index 30b54de..50eb6d2 100644 --- a/templates/xml/calibration_item.xml +++ b/templates/xml/calibration_item.xml @@ -3,11 +3,7 @@ <dcc:name> {%- for i in x['name'] %} <dcc:content lang="{{i.lang}}"> - <![CDATA[ - {%- for j in i.content %} - {{j|safe}} - {% endfor -%} - ]]> + <![CDATA[{%- for j in i.content %}{{j|safe}}{% endfor -%}]]> </dcc:content> {% endfor -%} </dcc:name> @@ -16,22 +12,14 @@ <dcc:name> {%- for j in i['name'] %} <dcc:content lang="{{j.lang}}"> - <![CDATA[ - {%- for k in j.content %} - {{k|safe}} - {% endfor -%} - ]]> + <![CDATA[{%- for k in j.content %}{{k|safe}}{% endfor -%}]]> </dcc:content> {% endfor -%} </dcc:name> <dcc:description> {%- for j in i['description'] %} <dcc:content lang="{{j.lang}}"> - <![CDATA[ - {%- for k in j.content %} - {{k|safe}} - {% endfor -%} - ]]> + <![CDATA[{%- for k in j.content %}{{k|safe}}{% endfor -%}]]> </dcc:content> {% endfor -%} </dcc:description> @@ -39,11 +27,7 @@ <dcc:name> {%- for j in i.manufacturer['name'] %} <dcc:content lang="{{j.lang}}"> - <![CDATA[ - {%- for k in j.content %} - {{k|safe}} - {% endfor -%} - ]]> + <![CDATA[{%- for k in j.content %}{{k|safe}}{% endfor -%}]]> </dcc:content> {% endfor -%} </dcc:name> @@ -56,11 +40,7 @@ <dcc:description> {%- for k in j['description'] %} <dcc:content lang="{{k.lang}}"> - <![CDATA[ - {%- for l in k.content %} - {{l|safe}} - {% endfor -%} - ]]> + <![CDATA[{%- for l in k.content %}{{l|safe}}{% endfor -%}]]> </dcc:content> {% endfor -%} </dcc:description> diff --git a/templates/xml/calibration_laboratory.xml b/templates/xml/calibration_laboratory.xml index 3cdc5f7..6c1d5fb 100644 --- a/templates/xml/calibration_laboratory.xml +++ b/templates/xml/calibration_laboratory.xml @@ -4,11 +4,7 @@ <dcc:name> {%- for i in x['name'] %} <dcc:content lang="{{i.lang}}"> - <![CDATA[ - {%- for j in i.content %} - {{j|safe}} - {% endfor -%} - ]]> + <![CDATA[{%- for j in i.content %}{{j|safe}}{% endfor -%}]]> </dcc:content> {% endfor -%} </dcc:name> @@ -17,11 +13,7 @@ <dcc:further> {%- for i in x.location.further %} <dcc:content lang="{{i.lang}}"> - <![CDATA[ - {%- for j in i.content %} - {{j|safe}} - {% endfor -%} - ]]> + <![CDATA[{%- for j in i.content %}{{j|safe}}{% endfor -%}]]> </dcc:content> {% endfor -%} </dcc:further> diff --git a/templates/xml/core_data.xml b/templates/xml/core_data.xml index f2094cb..db36439 100644 --- a/templates/xml/core_data.xml +++ b/templates/xml/core_data.xml @@ -20,11 +20,7 @@ <dcc:description> {%- for j in i['description'] %} <dcc:content lang="{{j.lang}}"> - <![CDATA[ - {%- for k in j.content %} - {{k|safe}} - {% endfor -%} - ]]> + <![CDATA[{%- for k in j.content %}{{k|safe}}{% endfor -%}]]> </dcc:content> {% endfor -%} </dcc:description> diff --git a/templates/xml/customer.xml b/templates/xml/customer.xml index 7638329..ce2c64b 100644 --- a/templates/xml/customer.xml +++ b/templates/xml/customer.xml @@ -3,11 +3,7 @@ <dcc:name> {%- for i in x['name'] %} <dcc:content lang="{{i.lang}}"> - <![CDATA[ - {%- for j in i.content %} - {{j|safe}} - {% endfor -%} - ]]> + <![CDATA[{%- for j in i.content %}{{j|safe}}{% endfor -%}]]> </dcc:content> {% endfor -%} </dcc:name> diff --git a/templates/xml/influence_conditions.xml b/templates/xml/influence_conditions.xml index bbd30d2..b279c4a 100644 --- a/templates/xml/influence_conditions.xml +++ b/templates/xml/influence_conditions.xml @@ -8,11 +8,7 @@ <dcc:name> {%- for j in i['name'] %} <dcc:content lang="{{j.lang}}"> - <![CDATA[ - {%- for k in j.content %} - {{k|safe}} - {% endfor -%} - ]]> + <![CDATA[{%- for k in j.content %}{{k|safe}}{% endfor -%}]]> </dcc:content> {% endfor -%} </dcc:name> @@ -24,11 +20,7 @@ <dcc:name> {%- for l in v['name'] %} <dcc:content lang="{{l.lang}}"> - <![CDATA[ - {%- for m in l.content %} - {{m|safe}} - {% endfor -%} - ]]> + <![CDATA[{%- for m in l.content %}{{m|safe}}{% endfor -%}]]> </dcc:content> {% endfor -%} </dcc:name> diff --git a/templates/xml/responsible_persons.xml b/templates/xml/responsible_persons.xml index e94960d..f62e8fc 100644 --- a/templates/xml/responsible_persons.xml +++ b/templates/xml/responsible_persons.xml @@ -5,11 +5,7 @@ <dcc:name> {%- for j in i.person['name'] %} <dcc:content lang="{{j.lang}}"> - <![CDATA[ - {%- for k in j.content %} - {{k|safe}} - {% endfor -%} - ]]> + <![CDATA[{%- for k in j.content %}{{k|safe}}{% endfor -%}]]> </dcc:content> {% endfor -%} </dcc:name> diff --git a/templates/xml/results.xml b/templates/xml/results.xml index 1d9ce9e..105bbcc 100644 --- a/templates/xml/results.xml +++ b/templates/xml/results.xml @@ -4,11 +4,7 @@ <dcc:name> {%- for j in i['name'] %} <dcc:content lang="{{j.lang}}"> - <![CDATA[ - {%- for k in j.content %} - {{k|safe}} - {% endfor -%} - ]]> + <![CDATA[{%- for k in j.content %}{{k|safe}}{% endfor -%}]]> </dcc:content> {% endfor -%} </dcc:name> @@ -18,11 +14,7 @@ <dcc:name> {%- for k in j['name'] %} <dcc:content lang="{{k.lang}}"> - <![CDATA[ - {%- for l in k.content %} - {{l|safe}} - {% endfor -%} - ]]> + <![CDATA[{%- for l in k.content %}{{l|safe}}{% endfor -%}]]> </dcc:content> {% endfor -%} </dcc:name> diff --git a/templates/xml/used_methods.xml b/templates/xml/used_methods.xml index c7ba827..d49c736 100644 --- a/templates/xml/used_methods.xml +++ b/templates/xml/used_methods.xml @@ -4,22 +4,14 @@ <dcc:name {%- if i.id %} id="{{i.id}}" {% endif -%}> {%- for j in i['name'] %} <dcc:content lang="{{j.lang}}"> - <![CDATA[ - {%- for k in j.content %} - {{k|safe}} - {% endfor -%} - ]]> + <![CDATA[{%- for k in j.content %}{{k|safe}}{%endfor -%}]]> </dcc:content> {% endfor -%} </dcc:name> <dcc:description> {%- for j in i['description'] %} <dcc:content lang="{{j.lang}}"> - <![CDATA[ - {%- for k in j.content %} - {{k|safe}} - {% endfor -%} - ]]> + <![CDATA[{%- for k in j.content %}{{k|safe}}{% endfor -%}]]> </dcc:content> {% endfor -%} </dcc:description> diff --git a/templates/xml/used_software.xml b/templates/xml/used_software.xml index 23bade3..89733e6 100644 --- a/templates/xml/used_software.xml +++ b/templates/xml/used_software.xml @@ -4,11 +4,7 @@ <dcc:name> {%- for j in i['name'] %} <dcc:content lang="{{j.lang}}"> - <![CDATA[ - {%- for k in j.content %} - {{k|safe}} - {% endfor -%} - ]]> + <![CDATA[{%- for k in j.content %}{{k|safe}}{% endfor -%}]]> </dcc:content> {% endfor -%} </dcc:name> -- GitLab