Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unified section naming - citygml liquid templates, lutaml_uml_datamodel #74

Merged
merged 2 commits into from
Sep 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ None.
{% if non_unions.size > 0 %}
{% for data_type in non_unions %}
{% capture generalizations %}{% assign inheritance = klass.associations | where: "member_end_type", "inheritance" %}{% for assoc in inheritance %}{% capture ref_id %}{% if additional_context.external_classes[assoc.member_end] %}{{ additional_context.external_classes[assoc.member_end] }}{% else %}{{ assoc.member_end }}-section{% endif %}{% endcapture %}<<{{ ref_id }},{{ assoc.member_end }}>>{% endfor %}{% endcapture %}
[[{{ data_type.name }}-section]]
[[section-{{ data_type.xmi_id }}]]
{{equalsigns}}== {{ data_type.name }}

.Metadata of {{ data_type.name }} ({{ data_type.stereotype }})
Expand Down Expand Up @@ -219,7 +219,7 @@ None.

{% if package.enums.size > 0 %}
{% for enum in package.enums %}
[[{{ enum.name }}-section]]
[[section-{{ enum.xmi_id }}]]
{{equalsigns}}== {{ enum.name }}

.Metadata of {{ enum.name }} (Enumeration)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% capture equalsigns %}{% for count in (1..depth) %}={% endfor %}{% endcapture %}
{% capture generalizations %}{% assign inheritance = klass.associations | where: "member_end_type", "inheritance" %}{% for assoc in inheritance %}{% capture ref_id %}{% if additional_context.external_classes[assoc.member_end] %}{{ additional_context.external_classes[assoc.member_end] }}{% else %}{{ assoc.member_end }}-section{% endif %}{% endcapture %}<<{{ ref_id }},{{ assoc.member_end }}>>{% endfor %}{% endcapture %}
[[{{ klass.name }}-section]]
[[section-{{ klass.xmi_id }}]]
{{equalsigns}} {{ klass.name }}
{%comment%}(inside class: depth is {{ depth }}, equalsigns {{equalsigns}}){%endcomment%}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
{% if depth %}
{% assign nested_depth = depth | plus: 1 %}
{% capture equalsigns %}{% for count in (1..depth) %}={% endfor %}{% endcapture %}
[[rc_{{ package_name }}-model_section]]
[[section-{{ package.xmi_id }}]]
{{equalsigns}} {{ package.name }}
{% endif %}

Expand Down
1,049 changes: 473 additions & 576 deletions spec/fixtures/datamodel_description_sections_nested_macroses.xml

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<sections>
<clause id="rc_wrapper_nested_package-model_section" inline-header="false" obligation="normative">
<clause id="section-EAPK_9C96A88B_E98B_490b_8A9C_24AEDAC64293" inline-header="false" obligation="normative">
<title>Wrapper nested package</title>
<clause id="rc_citygml-model_section" inline-header="false" obligation="normative"><title>CityGML</title>
<clause id="rc_another-model_section" inline-header="false" obligation="normative">
<clause id="section-EAPK_369E0123_00FC_4098_BEF2_3BB506B2012A" inline-header="false" obligation="normative"><title>CityGML</title>
<clause id="section-EAPK_15C00628_ED51_4a92_8216_10ADF1613D98" inline-header="false" obligation="normative">
<title>Another</title>
<clause id="_" inline-header="false" obligation="normative"><title>Class definitions</title>
<table id="_">
Expand Down Expand Up @@ -108,7 +108,7 @@
</tbody>
</table></clause>
</clause>
<clause id="rc_citytml-model_section" inline-header="false" obligation="normative"><title>CityTML</title>
<clause id="section-EAPK_1C8607D1_2967_44ff_948A_2A9256D00A45" inline-header="false" obligation="normative"><title>CityTML</title>
<clause id="_" inline-header="false" obligation="normative"><title>Class definitions</title>
<table id="_">
<colgroup>
Expand Down Expand Up @@ -344,7 +344,7 @@
</tr>
</tbody>
</table></clause>
<clause id="rc_dynamizer-model_section" inline-header="false" obligation="normative">
<clause id="section-EAPK_15C00628_ED51_4a92_8216_10ADF1613D98" inline-header="false" obligation="normative">
<title>Dynamizer</title>
<clause id="_" inline-header="false" obligation="normative"><title>Class definitions</title>
<table id="_">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ Before tag for ISO 19135 Procedures for item registration XML
</table>
<clause id="_" inline-header="false" obligation="normative">
<title>Classes</title>
<clause id="RE_Register-section" inline-header="false" obligation="normative"><title>RE_Register</title>
<clause id="section-EAID_82206E96_8D23_48dd_AC2F_31939C484AF2" inline-header="false" obligation="normative"><title>RE_Register</title>
<table id="_">
<colgroup>
<col width="20%">
Expand Down Expand Up @@ -291,7 +291,7 @@ sample values of &lt;i&gt;OnLineResource.linkage&lt;/i&gt;.</p>
</clause>
<clause id="_" inline-header="false" obligation="normative">
<title>Enumerations</title>
<clause id="RE_Register_enum-section" inline-header="false" obligation="normative"><title>RE_Register_enum</title>
<clause id="section-EAID_82206E96_8D23_48dd_AC2F_92839C484AF2" inline-header="false" obligation="normative"><title>RE_Register_enum</title>
<table id="_">
<colgroup>
<col width="20%">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Before tag for Wrapper nested package
<p id="_">&#8230;&#8203;
text before Another package interpolated: Wrapper nested package
&#8230;&#8203;</p></foreword></preface><sections>
<clause id="rc_wrapper_nested_package-model_section" inline-header="false" obligation="normative"><title>Wrapper nested package</title>
<clause id="section-EAPK_9C96A88B_E98B_490b_8A9C_24AEDAC64293" inline-header="false" obligation="normative"><title>Wrapper nested package</title>
<p id="_">&#8230;&#8203;
This is is a pckage text for Wrapper nested package and package name wrapper_nested_package
&#8230;&#8203;</p>
Expand All @@ -29,7 +29,7 @@ text after Another package interpolated: Wrapper nested package
<p id="_">&#8230;&#8203;
Before tag for ISO 19135 Procedures for item registration XML
&#8230;&#8203;</p>
<clause id="rc_iso_19135_procedures_for_item_registration_xml-model_section" inline-header="false" obligation="normative">
<clause id="section-EAPK_9C96A88B_E98B_490b_8A9C_24AEDAC64293" inline-header="false" obligation="normative">
<title>ISO 19135 Procedures for item registration XML</title>
<clause id="_" inline-header="false" obligation="normative"><title>Class definitions</title>
<table id="_">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<sections>
<clause id="rc_another_wrapper_nested_package-model_section" inline-header="false" obligation="normative">
<clause id="section-EAPK_9C96A88B_E98B_490b_8A9C_24AEDAC64293" inline-header="false" obligation="normative">
<title>Another Wrapper nested package</title>
<table id="_">
<colgroup>
Expand Down