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

Support reference of document elements generated by LutaML (other than lutaml_figure and lutaml_table) #41

Open
ronaldtse opened this issue Aug 17, 2021 · 8 comments
Assignees
Labels
enhancement New feature or request

Comments

@ronaldtse
Copy link
Contributor

lutaml-figure:[...] has been implemented for the referencing of included figures, but we also need macros to refer to other elements generated by LutaML in the document, they include:

  • definition tables
  • packages
  • classes
  • enums

Anything else?

Proposed syntax:

lutaml-figure:[name="Fig: Primitives of Zonal Identifier"]

Eg: use diagram name as a lookup id and transform it into <<figure-{{ diagram.xmi_id}}>>(EA names diagram images by this pattern)

Originally posted by @w00lf in #34 (comment)

@ronaldtse ronaldtse added the enhancement New feature or request label Aug 17, 2021
@w00lf
Copy link
Contributor

w00lf commented Aug 18, 2021

definition tables
packages
classes
enums

That won't be a problem to implement, although currently, we need to decide the union naming of all entries. I used templates from citygml and ogc-dggs, both of them have their own ids structure, for example, the class table uses [[tab-P-{{ package_name }}-C-{{ klass_name }}]] naming when citygml uses this naming [[{{ klass.name }}-section]]. So the question here, can we unify naming?

@w00lf
Copy link
Contributor

w00lf commented Aug 23, 2021

Proposed macro names:

lutaml_table_class[package="name", name="name"]
lutaml_table_enum[package="name", name="name"]
lutaml_table_data_type[package="name", name="name"]

@ronaldtse
Copy link
Contributor Author

@w00lf agree with the new macro names.

w00lf pushed a commit that referenced this issue Aug 25, 2021
…_class`, `lutaml_table_enum`, `lutaml_table_data_type`, lookup xmi entities in the document by their name
w00lf pushed a commit that referenced this issue Aug 25, 2021
…_class`, `lutaml_table_enum`, `lutaml_table_data_type`, lookup xmi entities in the document by their name
w00lf pushed a commit to metanorma/metanorma-standoc that referenced this issue Aug 25, 2021
…of macroses: `lutaml_table_package`, `lutaml_table_class`, `lutaml_table_enum`, `lutaml_table_data_type`
w00lf pushed a commit that referenced this issue Aug 26, 2021
ronaldtse pushed a commit that referenced this issue Sep 1, 2021
…_class`, `lutaml_table_enum`, `lutaml_table_data_type`, lookup xmi entities in the document by their name
@ronaldtse ronaldtse changed the title Support reference of document elements generated by LutaML other than Figures Support reference of document elements generated by LutaML (other than lutaml_figure and lutaml_table) Sep 6, 2021
@ronaldtse
Copy link
Contributor Author

ronaldtse commented Sep 6, 2021

We need to unify all the anchor naming, currently we have these patterns:

  • rc_{{package name}}-model_section
  • section-{{xmi_id}}
  • table-{{xmi_id}}
  • figure-{{xmi_id}}
  • {{enum/package/datatype/class name}}-section

@ronaldtse
Copy link
Contributor Author

We also have to keep in mind the different 2 kinds of templates and their components:

  • entity_list and its components:
    • section ({{equalsigns}} {{ package.name }}, now anchored as [[rc_{{ package_name }}-model_section]])
    • diagrams
    • class definitions (=== Class definitions)
      • class definition table
      • data type definition table
      • primitive data type definition table
      • enumerated classes definition table
      • code list definition table
    • inner packages (include "packages_entity_list")
  • data_dictionary and its components:
    • section open ({{equalsigns}} {{ package.name }})
    • metadata table (.Metadata of {{ package.name }} ({{ package.stereotype }}))
    • basic types table ({{equalsigns}}= Basic types)
    • union tables ({{equalsigns}}= Unions)
    • code list tables ({{equalsigns}}= Code lists)
    • data types tables ({{equalsigns}}= Data types, now anchored as [[{{ data_type.name }}-section]])
  • each data_dictionary_class:
    • section title ({{equalsigns}} {{ klass.name }}, anchored as [[{{ klass.name }}-section]])
    • metadata table (.Metadata of {{ klass.name }} ({{klass.stereotype}}))
    • associations table (.Associations of {{ klass.name }} ({{ klass.stereotype }}))
    • attributes table (.Attributes of {{ klass.name }} ({{klass.stereotype}}))

@w00lf
Copy link
Contributor

w00lf commented Sep 21, 2021

@ronaldtse changed citygml section ids to be the same as with ogc - section-{{ xmi_id }} - https://github.com/metanorma/metanorma-plugin-lutaml/pull/74/files
Applied new naming in citygml - metanorma/ogc-citygml-xmi@039df43

@w00lf
Copy link
Contributor

w00lf commented Oct 13, 2021

@ronaldtse can we close this one?

@ronaldtse
Copy link
Contributor Author

We need the functionality in Ruby, not encoded in the template as conventions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants