Skip to content

Commit

Permalink
Merge pull request #177 from metanorma/updates
Browse files Browse the repository at this point in the history
Updates
  • Loading branch information
Intelligent2013 authored Apr 27, 2024
2 parents a844a79 + ccca6f5 commit c73b53c
Show file tree
Hide file tree
Showing 9 changed files with 56 additions and 54 deletions.
56 changes: 28 additions & 28 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ You will need the `maven` build tool and `make`.

[source,sh]
----
java -Xss5m -jar target/stepmod2mn-1.49.jar <XML-FileName>
java -Xss5m -jar target/stepmod2mn-1.50.jar <XML-FileName>
----

e.g.

[source,sh]
----
java -Xss5m -jar target/stepmod2mn-1.49.jar data/resource_docs/draughting_elements/resource.xml
java -Xss5m -jar target/stepmod2mn-1.50.jar data/resource_docs/draughting_elements/resource.xml
----

NOTE: resulted AsciiDoc found in data/resource_docs/draughting_elements/document.adoc
Expand All @@ -34,28 +34,28 @@ NOTE: resulted AsciiDoc found in data/resource_docs/draughting_elements/document

[source,sh]
----
java -Xss5m -jar target/stepmod2mn-1.49.jar <XML-FileName> [--output <AsciiDoc-FileName>]
java -Xss5m -jar target/stepmod2mn-1.50.jar <XML-FileName> [--output <AsciiDoc-FileName>]
----

e.g.

[source,sh]
----
java -Xss5m -jar target/stepmod2mn-1.49.jar data/resource_docs/draughting_elements/resource.xml --output result_dir/draughting_elements/document.adoc
java -Xss5m -jar target/stepmod2mn-1.50.jar data/resource_docs/draughting_elements/resource.xml --output result_dir/draughting_elements/document.adoc
----

=== Convert all resource.xml and module.xml in the specified folder and sub-folders into the Metanorma AsciiDoc format:

[source,sh]
----
java -Xss5m -jar target/stepmod2mn-1.49.jar <Input-folder>
java -Xss5m -jar target/stepmod2mn-1.50.jar <Input-folder>
----

e.g.

[source,sh]
----
java -Xss5m -jar target/stepmod2mn-1.49.jar data/
java -Xss5m -jar target/stepmod2mn-1.50.jar data/
----

NOTE: the result AsciiDocs will be saved in the folder with the source resource.xml and module.xml files.
Expand All @@ -65,57 +65,57 @@ NOTE: the result AsciiDocs will be saved in the folder with the source resource.

[source,sh]
----
java -Xss5m -jar target/stepmod2mn-1.49.jar <Input-folder> [--output <Output-folder>]
java -Xss5m -jar target/stepmod2mn-1.50.jar <Input-folder> [--output <Output-folder>]
----

e.g.

[source,sh]
----
java -Xss5m -jar target/stepmod2mn-1.49.jar data/ --output documents/
java -Xss5m -jar target/stepmod2mn-1.50.jar data/ --output documents/
----


=== Convert all resource.xml and module.xml in the specified folder and sub-folders into the Metanorma AsciiDoc format, except specified documents:

[source,sh]
----
java -Xss5m -jar target/stepmod2mn-1.49.jar <Input-folder> [--exclude <documents or part numbers list>]
java -Xss5m -jar target/stepmod2mn-1.50.jar <Input-folder> [--exclude <documents or part numbers list>]
----

e.g.

[source,sh]
----
java -Xss5m -jar target/stepmod2mn-1.49.jar data/ --exclude "machining_features 104"
java -Xss5m -jar target/stepmod2mn-1.50.jar data/ --exclude "machining_features 104"
----

=== Convert only specified documents resource.xml and module.xml in the specified folder and sub-folders into the Metanorma AsciiDoc format:

[source,sh]
----
java -Xss5m -jar target/stepmod2mn-1.49.jar <Input-folder> [--include-only <documents list>]
java -Xss5m -jar target/stepmod2mn-1.50.jar <Input-folder> [--include-only <documents list>]
----

e.g.

[source,sh]
----
java -Xss5m -jar target/stepmod2mn-1.49.jar data/ --include-only "fundamentals_of_product_description_and_support kinematics"
java -Xss5m -jar target/stepmod2mn-1.50.jar data/ --include-only "fundamentals_of_product_description_and_support kinematics"
----

=== Generate Metanorma collection files (metanorma.yml and collection.yml) for the documents specified in the publication index xml file in the tags 'resource_docs' and 'modules':

[source,sh]
----
java -Xss5m -jar target/stepmod2mn-1.49.jar <Publication-Index-XML-FileName>
java -Xss5m -jar target/stepmod2mn-1.50.jar <Publication-Index-XML-FileName>
----

e.g.

[source,sh]
----
java -Xss5m -jar target/stepmod2mn-1.49.jar publication/part1000/CR_PMI_5/publication_index.xml
java -Xss5m -jar target/stepmod2mn-1.50.jar publication/part1000/CR_PMI_5/publication_index.xml
----

NOTE: the Metanorma collection files .yml will be saved in the 3 level up folder (usually, source repository's root folder).
Expand All @@ -125,14 +125,14 @@ and save them into the output folder:

[source,sh]
----
java -Xss5m -jar target/stepmod2mn-1.49.jar <Publication-Index-XML-FileName> [--output <Output-folder>]
java -Xss5m -jar target/stepmod2mn-1.50.jar <Publication-Index-XML-FileName> [--output <Output-folder>]
----

e.g.

[source,sh]
----
java -Xss5m -jar target/stepmod2mn-1.49.jar iso-10303-srl/iso-10303-stepmod-wg12/publication/part1000/CR_PMI_5/publication_index.xml --output iso-10303-srl/
java -Xss5m -jar target/stepmod2mn-1.50.jar iso-10303-srl/iso-10303-stepmod-wg12/publication/part1000/CR_PMI_5/publication_index.xml --output iso-10303-srl/
----

NOTE: the output folder should contains the folder with the generated .adoc (usually, 'documents'). You can specify this folder obviously by the parameter '--input-documents':
Expand All @@ -141,7 +141,7 @@ e.g.

[source,sh]
----
java -Xss5m -jar target/stepmod2mn-1.49.jar iso-10303-srl/iso-10303-stepmod-wg12/publication/part1000/CR_PMI_5/publication_index.xml --output iso-10303-srl/CR_PMI_5 --input-documents iso-10303-srl/documents
java -Xss5m -jar target/stepmod2mn-1.50.jar iso-10303-srl/iso-10303-stepmod-wg12/publication/part1000/CR_PMI_5/publication_index.xml --output iso-10303-srl/CR_PMI_5 --input-documents iso-10303-srl/documents
----

NOTE: the Metanorma collection files (.yml) will be saved in the folder 'iso-10303-srl/CR_PMI_5' and the references point to the documents in the folder iso-10303-srl/documents.
Expand All @@ -151,14 +151,14 @@ NOTE: the Metanorma collection files (.yml) will be saved in the folder 'iso-103

[source,sh]
----
java -Xss5m -jar target/stepmod2mn-1.49.jar <Publication-Index-XML-FileName> [--type <resource_docs or modules>]
java -Xss5m -jar target/stepmod2mn-1.50.jar <Publication-Index-XML-FileName> [--type <resource_docs or modules>]
----

e.g.

[source,sh]
----
java -Xss5m -jar target/stepmod2mn-1.49.jar publication/part1000/CR_PMI_5/publication_index.xml --type resource_docs
java -Xss5m -jar target/stepmod2mn-1.50.jar publication/part1000/CR_PMI_5/publication_index.xml --type resource_docs
----

NOTE: the Metanorma collection file 'metanorma.yml' will be saved in the 3 level up folder (usually, source repository's root folder).
Expand All @@ -168,42 +168,42 @@ NOTE: the Metanorma collection file 'metanorma.yml' will be saved in the 3 level

[source,sh]
----
java -jar target/stepmod2mn-1.49.jar <start folder to process xml maps files> --svg
java -jar target/stepmod2mn-1.50.jar <start folder to process xml maps files> --svg
----

e.g.

[source,sh]
----
java -jar target/stepmod2mn-1.49.jar data/resources --svg
java -jar target/stepmod2mn-1.50.jar data/resources --svg
----

=== Generate SVG images for the XML in the specified folder and sub-folders, and save them in the output folder:

[source,sh]
----
java -jar target/stepmod2mn-1.49.jar <start folder to process xml maps files> --svg [--output <Output-folder>]
java -jar target/stepmod2mn-1.50.jar <start folder to process xml maps files> --svg [--output <Output-folder>]
----

e.g.

[source,sh]
----
java -jar target/stepmod2mn-1.49.jar data/resources --svg --output schemas/
java -jar target/stepmod2mn-1.50.jar data/resources --svg --output schemas/
----

=== Generate SVG image for Express Imagemap XML and Image:

[source,sh]
----
java -jar stepmod2mn-1.49.jar --xml <Express Imagemap XML file path> --image <Image file name> [--svg <resulted SVG map file or folder>]
java -jar stepmod2mn-1.50.jar --xml <Express Imagemap XML file path> --image <Image file name> [--svg <resulted SVG map file or folder>]
----

e.g.

[source,sh]
----
java -jar stepmod2mn-1.49.jar --xml data\resource_docs\fundamentals_of_product_description_and_support\schema_diagexpg1.xml --image schema_diagexpg1.gif --svg schema_diagexpg1.svg
java -jar stepmod2mn-1.50.jar --xml data\resource_docs\fundamentals_of_product_description_and_support\schema_diagexpg1.xml --image schema_diagexpg1.gif --svg schema_diagexpg1.svg
----


Expand All @@ -223,7 +223,7 @@ Update version in `pom.xml`, e.g.:
----
<groupId>org.metanorma</groupId>
<artifactId>stepmod2mn</artifactId>
<version>1.49</version>
<version>1.50</version>
<name>STEPmod XML to Metanorma AsciiDoc converter</name>
----

Expand All @@ -234,8 +234,8 @@ Tag the same version in Git:

[source,xml]
----
git tag v1.49
git push origin v1.49
git tag v1.50
git push origin v1.50
----

Then the corresponding GitHub release will be automatically created at:
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.metanorma</groupId>
<artifactId>stepmod2mn</artifactId>
<version>1.49</version>
<version>1.50</version>
<name>STEPmod XML to Metanorma AsciiDoc converter</name>
<packaging>jar</packaging>
<url>https://www.metanorma.org</url>
Expand Down
18 changes: 9 additions & 9 deletions src/main/resources/stepmod.base_xsl/module.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,7 @@ TT remove since locke is no longer available.

<xsl:template match="purpose">

<xsl:variable name="arm_expg_annex_letter">
<!--<xsl:variable name="arm_expg_annex_letter">
<xsl:choose>
<xsl:when test="/module/mim">C</xsl:when>
<xsl:otherwise>B</xsl:otherwise>
Expand All @@ -882,7 +882,7 @@ TT remove since locke is no longer available.
<xsl:when test="/module/mim">E</xsl:when>
<xsl:otherwise>C</xsl:otherwise>
</xsl:choose>
</xsl:variable>
</xsl:variable> -->

<!-- <h2>
<a name="introduction">
Expand Down Expand Up @@ -988,8 +988,8 @@ TT remove since locke is no longer available.
&lt;&lt;defns&gt;&gt; lists the words defined in
this document and gives pointers to words defined elsewhere.

The information requirements of the application are specified in Clause
<!-- <a href="4_info_reqs{$FILE_EXT}">4</a> using terminology appropriate to -->
<!--The information requirements of the application are specified in Clause
<a href="4_info_reqs{$FILE_EXT}">4</a> using terminology appropriate to -->
The information requirements of the application are specified in
&lt;&lt;arm&gt;&gt; using terminology appropriate to
the application.
Expand All @@ -1012,11 +1012,11 @@ TT remove since locke is no longer available.
A graphical representation of the short listing of the MIM is given
<!-- in Annex <a href="d_mim_expg{$FILE_EXT}">D</a>. -->
in &lt;&lt;AnnexD&gt;&gt;.
</xsl:if>
Publicly available computer interpretable listings that are associated with this document
<!-- are identified in Annex <a href="e_exp{$FILE_EXT}">
<xsl:value-of select="$listing_annex_letter"/></a>. -->
are identified in &lt;&lt;annex_listings&gt;&gt;.
</xsl:if>
</xsl:with-param>
</xsl:call-template>
<!-- </p> -->
Expand Down Expand Up @@ -1629,7 +1629,7 @@ this document, may be provided to support implementations. If the information
</xsl:template>
<xsl:template match="arm">

<xsl:variable name="arm_expg_annex_letter">
<!-- <xsl:variable name="arm_expg_annex_letter">
<xsl:choose>
<xsl:when test="/module/mim">C</xsl:when>
<xsl:otherwise>B</xsl:otherwise>
Expand All @@ -1641,7 +1641,7 @@ this document, may be provided to support implementations. If the information
<xsl:when test="/module/mim">E</xsl:when>
<xsl:otherwise>C</xsl:otherwise>
</xsl:choose>
</xsl:variable>
</xsl:variable>-->

<xsl:call-template name="clause_header">
<!-- <xsl:with-param name="heading" select="'4 Information requirements'"/> -->
Expand Down Expand Up @@ -4301,7 +4301,7 @@ $module_ok,' Check the normatives references')"/>
</xsl:template>
<xsl:template match="imgfile|img" mode="expressg">
<xsl:param name="express_g_diagrams_yaml"/>
<xsl:variable name="arm_expg_annex_letter">
<!-- <xsl:variable name="arm_expg_annex_letter">
<xsl:choose>
<xsl:when test="/module/mim">C</xsl:when>
<xsl:otherwise>B</xsl:otherwise>
Expand All @@ -4312,7 +4312,7 @@ $module_ok,' Check the normatives references')"/>
<xsl:when test="/module/mim">E</xsl:when>
<xsl:otherwise>C</xsl:otherwise>
</xsl:choose>
</xsl:variable>
</xsl:variable> -->
<xsl:variable name="file">
<!-- <xsl:call-template name="set_file_ext">
<xsl:with-param name="filename" select="@file"/>
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/stepmod.base_xsl/sect_4_express.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- <?xml-stylesheet type="text/xsl" href="./document_xsl.xsl" ?> -->

<!--
$Id: sect_4_express.xsl,v 1.134 2019/03/27 21:16:08 mike Exp $
$Id: sect_4_express.xsl,v 1.135 2019/05/03 07:34:51 verodub Exp $
Author: Rob Bodington, Eurostep Limited
Owner: Developed by Eurostep and supplied to NIST under contract.
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/stepmod.base_xsl/sect_4_info_reqs.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-stylesheet type="text/xsl" href="./document_xsl.xsl" ?>

<!--
$Id: sect_4_info_reqs.xsl,v 1.6 2012/11/06 09:43:39 mikeward Exp $
$Id: sect_4_info_reqs.xsl,v 1.7 2014/06/13 12:58:59 nigelshaw Exp $
Author: Rob Bodington, Eurostep Limited
Owner: Developed by Eurostep and supplied to NIST under contract.
Purpose: Output section 4 Information model as a web page
Expand Down Expand Up @@ -39,7 +39,7 @@ $Id: sect_4_info_reqs.xsl,v 1.6 2012/11/06 09:43:39 mikeward Exp $


<!-- overwrites the template declared in module.xsl -->
<xsl:template match="module" mode="info_reqs_module">
<xsl:template match="module" mode="info_reqs_module"> <!-- called from stepmod2mn.module.adoc.xsl -->
<xsl:apply-templates select="arm"/>
</xsl:template>

Expand Down
20 changes: 11 additions & 9 deletions src/main/resources/stepmod.base_xsl/sect_5_main.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-stylesheet type="text/xsl" href="./document_xsl.xsl" ?>

<!--
$Id: sect_5_main.xsl,v 1.2 2003/03/13 19:17:08 robbod Exp $
$Id: sect_5_main.xsl,v 1.3 2003/05/04 08:15:03 robbod Exp $
Author: Rob Bodington, Eurostep Limited
Owner: Developed by Eurostep and supplied to PLCS under contract.
Purpose:
Expand All @@ -22,7 +22,7 @@ $Id: sect_5_main.xsl,v 1.2 2003/03/13 19:17:08 robbod Exp $
<xsl:output method="html"/>

<!-- overwrites the template declared in module.xsl -->
<xsl:template match="module" mode="mim_main_module">
<xsl:template match="module" mode="mim_main_module"> <!-- called from stepmod2mn.module.adoc.xsl -->
<xsl:call-template name="clause_header">
<!-- <xsl:with-param name="heading" select="'5 Module interpreted model'"/> -->
<xsl:with-param name="heading" select="'Module interpreted model'"/>
Expand All @@ -37,13 +37,15 @@ $Id: sect_5_main.xsl,v 1.2 2003/03/13 19:17:08 robbod Exp $
<!-- 5.1 Mapping specification -->
<xsl:apply-templates select="." mode="mapping_module"/>

<!-- <h2>
<a href="../sys/5_mim{$FILE_EXT}#mim_express">
5.2 MIM EXPRESS short listing
</a>
</h2> -->
<!-- 5.2 MIM EXPRESS short listing -->
<xsl:apply-templates select="." mode="mim_module"/>
<xsl:if test="./mim">
<!-- <h2>
<a href="../sys/5_mim{$FILE_EXT}#mim_express">
5.2 MIM EXPRESS short listing
</a>
</h2> -->
<!-- 5.2 MIM EXPRESS short listing -->
<xsl:apply-templates select="." mode="mim_module"/>
</xsl:if>

</xsl:template>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-stylesheet type="text/xsl" href="./document_xsl.xsl" ?>

<!--
$Id: sect_5_mapping_check.xsl,v 1.28 2015/08/28 10:54:31 mikeward Exp $
$Id: sect_5_mapping_check.xsl,v 1.29 2017/03/28 13:36:54 mikeward Exp $
Author: Rob Bodington, Nigel Shaw Eurostep Limited
Owner: Developed by Eurostep in conjunction with PLCS Inc
Purpose:
Expand Down
Loading

0 comments on commit c73b53c

Please sign in to comment.