Skip to content

Commit

Permalink
Merge pull request #393 from metanorma/update
Browse files Browse the repository at this point in the history
Update
  • Loading branch information
Intelligent2013 authored Jul 8, 2023
2 parents 8aacc86 + d5aa172 commit c17b7ff
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
22 changes: 11 additions & 11 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ You will need the `maven` build tool and `make`.

[source,sh]
----
java -jar mnconvert-1.53.0.jar xml_file --check-type xsd-niso
java -jar mnconvert-1.54.0.jar xml_file --check-type xsd-niso
----

- `--check-type`, `-ct` - Check against XSD NISO (value xsd-niso), DTD ISO (dtd-iso), DTD NISO (dtd-niso)
Expand All @@ -37,7 +37,7 @@ java -jar mnconvert-1.44.0.jar xml_file --validation-against <path DTD or XSD>

[source,sh]
----
java -jar mnconvert-1.53.0.jar xml_file [options]
java -jar mnconvert-1.54.0.jar xml_file [options]
----

- `--xsl-file`, `-s` - path to XSL file, optional
Expand All @@ -52,7 +52,7 @@ java -jar mnconvert-1.53.0.jar xml_file [options]

[source,sh]
----
java -jar mnconvert-1.53.0.jar xml_file [options]
java -jar mnconvert-1.54.0.jar xml_file [options]
----

- `--xsl-file`, `-s` - path to XSL file, optional
Expand All @@ -67,7 +67,7 @@ java -jar mnconvert-1.53.0.jar xml_file [options]

[source,sh]
----
java -jar mnconvert-1.53.0.jar xml_file [options]
java -jar mnconvert-1.54.0.jar xml_file [options]
----

- `--xsl-file`, `-s` - path to XSL file, optional
Expand All @@ -78,7 +78,7 @@ java -jar mnconvert-1.53.0.jar xml_file [options]

[source,sh]
----
java -jar mnconvert-1.53.0.jar docx_file [options]
java -jar mnconvert-1.54.0.jar docx_file [options]
----

- `--xsl-file`, `-s` - path to XSL file, optional
Expand All @@ -88,7 +88,7 @@ java -jar mnconvert-1.53.0.jar docx_file [options]
=== 6. Convert from IEEE STL XML to Metanorma AsciiDoc.

----
java -jar mnconvert-1.53.0.jar xml_file [options]
java -jar mnconvert-1.54.0.jar xml_file [options]
----

- `--xsl-file`, `-s` - path to XSL file, optional
Expand All @@ -100,7 +100,7 @@ java -jar mnconvert-1.53.0.jar xml_file [options]

[source,sh]
----
java -jar mnconvert-1.53.0.jar xml_file --output-format ieee --validation-against <path to IEEE DTD>
java -jar mnconvert-1.54.0.jar xml_file --output-format ieee --validation-against <path to IEEE DTD>
----

- `--xsl-file`, `-s` - path to XSL file, optional
Expand All @@ -118,7 +118,7 @@ e.g.

[source,sh]
----
java -jar target/mnconvert-1.53.0.jar tests/iso-tc154-8601-1-en.xml --output tests/iso-tc154-8601-1-en.out.xml
java -jar target/mnconvert-1.54.0.jar tests/iso-tc154-8601-1-en.xml --output tests/iso-tc154-8601-1-en.out.xml
----

NOTE: Input XML format (Metanorma, STS ISO/NISO, IEEE or XML2RFC) determines programmatically by root element of input file: +
Expand Down Expand Up @@ -151,7 +151,7 @@ Update version in `pom.xml`, e.g.:
----
<groupId>org.metanorma</groupId>
<artifactId>mnconvert</artifactId>
<version>1.53.0</version>
<version>1.54.0</version>
<name>Metanorma XML to NISO STS XML two-directional converter</name>
----

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

[source,xml]
----
git tag v1.53.0
git push origin v1.53.0
git tag v1.54.0
git push origin v1.54.0
----

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>mnconvert</artifactId>
<version>1.53.0</version>
<version>1.54.0</version>
<name>Metanorma XML to NISO STS XML two-directional, IEEE to Metanorma ADOC, Metanorma XML to IEEE XML, and XML2RFC to Metanorma Asciidoc IETF converter</name>
<packaging>jar</packaging>
<url>https://www.metanorma.org</url>
Expand Down
5 changes: 3 additions & 2 deletions src/main/resources/mn2sts.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,10 @@
<xsl:copy>
<xsl:apply-templates select="@*" mode="id_generate" />
<xsl:attribute name="id_new">
<xsl:variable name="section_" select="translate(@section,'()','')"/> <!-- (1) to 1 -->
<xsl:choose>
<xsl:when test="$metanorma_type = 'IEC'">for-<xsl:value-of select="translate(@section,'()','')"/></xsl:when> <!-- (1) to 1 -->
<xsl:when test="$metanorma_type = 'ISO' or $metanorma_type = 'BSI'">formula_<xsl:value-of select="@section"/></xsl:when>
<xsl:when test="$metanorma_type = 'IEC'">for-<xsl:value-of select="$section_"/></xsl:when>
<xsl:when test="$metanorma_type = 'ISO' or $metanorma_type = 'BSI'">formula_<xsl:value-of select="$section_"/></xsl:when>
</xsl:choose>
</xsl:attribute>
<xsl:apply-templates select="node()" mode="id_generate" />
Expand Down

0 comments on commit c17b7ff

Please sign in to comment.