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

Questions about stepmod2mn conversion rules #1

Closed
Intelligent2013 opened this issue Oct 28, 2020 · 7 comments
Closed

Questions about stepmod2mn conversion rules #1

Intelligent2013 opened this issue Oct 28, 2020 · 7 comments
Assignees
Labels
question Further information is requested

Comments

@Intelligent2013
Copy link
Contributor

  1. In the document ISO 10303-506:2018-11 https://github.com/metanorma/iso-10303-stepmod/tree/master/data/resource_docs/draughting_elements there are a references to another documents. For example:

изображение

dimension_curve_directed_callout - is a link to the document ISO 10303-101:2019 (iso-10303-stepmod-master/data/resource_docs/draughting), section draughting_element_schema.dimension_curve_directed_callout:

изображение

@ronaldtse Question: how should I encode such links in resulted adoc?

@Intelligent2013 Intelligent2013 added the question Further information is requested label Oct 28, 2020
@Intelligent2013 Intelligent2013 self-assigned this Oct 28, 2020
@Intelligent2013 Intelligent2013 added this to To do in Alexander Dyuzhev via automation Oct 28, 2020
@ronaldtse
Copy link

@Intelligent2013 we can use the keyword express_ref:[dimension_curve_directed_callout] for now.

Ping @w00lf

@Intelligent2013
Copy link
Contributor Author

I use keyword express_ref for replacing ENTITY declaration like this:
изображение

to

express_ref:[linear_dimension]

Full example:
изображение

[[aic_draughting_elements.linear_dimension]]
==== linear_dimension

A *linear_dimension* is a type of
dimension_curve_directed_callout[../../../resource_docs/draughting/sys/5_schema.xml#draughting_element_schema.dimension_curve_directed_callout]
directed by a dimension curve that presents a value of distance between two elements, 
measured along a linear path, or the length of a linear element.

NOTE: Figures 3, 6, 7, and 8 show several linear dimensions used singularly or in dimension pairs.

[.underline]#EXPRESS specification:#

[source]
--
express_ref:[linear_dimension]
--

Should I use express_ref for references to another documents also?
Sorry for my misunderstanding, but I can't understand how you can process it as ENTITY in one case, and as reference in another...

@ronaldtse
Copy link

Can we do this instead? Ping @w00lf @opoudjis to decide on correct format:

[[aic_draughting_elements.linear_dimension]]
==== linear_dimension

A *linear_dimension* is a type of
express_ref:[draughting_element_schema.dimension_curve_directed_callout]
directed by a dimension curve that presents a value of distance between two elements, 
measured along a linear path, or the length of a linear element.

NOTE: Figures 3, 6, 7, and 8 show several linear dimensions used singularly or in dimension pairs.

EXPRESS specification:

[lutaml,../resources/aic_draughting_elements/aic_draughting_elements.exp, repo]
--
[source]
----
{{ repo.find_entity(id: "aic_draughting_elements.linear_dimension") }}
----
--

@Intelligent2013
Copy link
Contributor Author

Intelligent2013 commented Oct 30, 2020

For information, except ENTITY there are a another express specifications like this:

  • SCHEMA
  • USE FROM
  • REFERENCE FROM
  • CONSTANT
  • TYPE
  • SUBTYPE_CONSTRAINT
  • FUNCTION
  • PROCEDURE
  • RULE

Examples:

[source]
--
*)
[[aic_draughting_elements]]
SCHEMA aic_draughting_elements;
--
[source]
--
USE FROM ../../../../data/resources/draughting_element_schema/draughting_element_schema.xml#draughting_element_schema[draughting_element_schema]   -- ISO 10303-101
  (../../../../data/resources/draughting_element_schema/draughting_element_schema.xml#draughting_element_schema.dimension_curve[dimension_curve],
  ../../../../data/resources/draughting_element_schema/draughting_element_schema.xml#draughting_element_schema.dimension_curve_directed_callout[dimension_curve_directed_callout],
  ../../../../data/resources/draughting_element_schema/draughting_element_schema.xml#draughting_element_schema.dimension_curve_terminator[dimension_curve_terminator],
  ../../../../data/resources/draughting_element_schema/draughting_element_schema.xml#draughting_element_schema.draughting_callout[draughting_callout],
  ../../../../data/resources/draughting_element_schema/draughting_element_schema.xml#draughting_element_schema.draughting_callout_relationship[draughting_callout_relationship],
  ../../../../data/resources/draughting_element_schema/draughting_element_schema.xml#draughting_element_schema.leader_curve[leader_curve],
  ../../../../data/resources/draughting_element_schema/draughting_element_schema.xml#draughting_element_schema.leader_directed_callout[leader_directed_callout],
  ../../../../data/resources/draughting_element_schema/draughting_element_schema.xml#draughting_element_schema.leader_terminator[leader_terminator],
  ../../../../data/resources/draughting_element_schema/draughting_element_schema.xml#draughting_element_schema.projection_curve[projection_curve],
  ../../../../data/resources/draughting_element_schema/draughting_element_schema.xml#draughting_element_schema.projection_directed_callout[projection_directed_callout]);

USE FROM ../../../../data/resources/presentation_definition_schema/presentation_definition_schema.xml#presentation_definition_schema[presentation_definition_schema]   -- ISO 10303-46
  (../../../../data/resources/presentation_definition_schema/presentation_definition_schema.xml#presentation_definition_schema.annotation_text_occurrence[annotation_text_occurrence]);
(*
--

Examples of resulted adoc (updated):
draughting_elements.txt
geometric_and_topological_representation.txt

@opoudjis
Copy link

opoudjis commented Nov 1, 2020

... I don't understand this at all, so I can't give you an informed comment. If the question is, what asciidoctor macro syntax to use, and if this is something like ambiguity between link within a document and link to another document,

I would like to point out that metanorma collections have already defined an approach to this for cross-references between documents, and I shall rain down fury if you all end up doing a completely different solution.

The solution for crossreferences between documents in Metanorma collections is given in

metanorma/metanorma#57

For anchor myanchor in document mydoc,

we define a reference to an external document in the document bibliography as:

* [[[docid,repo:(current-metanorma-collection/mydoc)]]],

where "mydoc" is defined in the Collection YAML.

(We may end up suppressing rendering of such entries in the bibliography; this is in play in metanorma/bipm-si-brochure#41 (comment)

The crossreference then becomes <<docid,#myanchor>>

I very strongly urge you to use the repo:(current-metanorma-collection/...) approach to inserting crossreferences via the bibliography. Whatever you are doing with cross-references between documents, you cannot be hardcoding them, and assuming they are all in the same directory structure; the use of IDs in the collection YAML allows them to be mapped through a manifest.

@ronaldtse
Copy link

@Intelligent2013 I discussed with @opoudjis , he was confused on what we were asking.

Basically for all [source], we do not need to retain the anchors or links. We just need to use the command [lutaml_source,express]

i.e.

[lutaml_source,express]
--
*)

SCHEMA aic_draughting_elements;

USE FROM draughting_element_schema   -- ISO 10303-101
  (dimension_curve,
  dimension_curve_directed_callout,
  dimension_curve_terminator,
  draughting_callout,
  draughting_callout_relationship,
  leader_curve,
  leader_directed_callout,
  leader_terminator,
  projection_curve,
  projection_directed_callout);

USE FROM presentation_definition_schema -- ISO 10303-46
  (annotation_text_occurrence);

(*
--

The links will be automatically provided in post-processing.

Intelligent2013 added a commit that referenced this issue Nov 7, 2020
Intelligent2013 added a commit that referenced this issue Nov 7, 2020
Intelligent2013 added a commit that referenced this issue Nov 7, 2020
Intelligent2013 added a commit that referenced this issue Nov 7, 2020
@Intelligent2013
Copy link
Contributor Author

@opoudjis thank you for the answer, that what is needed.
@ronaldtse ok, fixed.

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
Development

No branches or pull requests

3 participants