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

official NISO STS XML sample conversion added to Makefile, #407 #408

Merged
merged 23 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
6b077da
official NISO STS XML sample conversion added to JUnit test, #407
Intelligent2013 Mar 4, 2024
7dd49ce
official NISO STS XML sample conversion added to JUnit test, #407
Intelligent2013 Mar 4, 2024
d582ed1
slash in output path fixing, #407 [skip actions]
Intelligent2013 Mar 29, 2024
fc4ece3
date processing refactored, #407 [skip actions]
Intelligent2013 Mar 29, 2024
1abe139
main-title-wrap processing added, #407 [skip actions]
Intelligent2013 Mar 29, 2024
d678ca6
language determination refactored, #407
Intelligent2013 Apr 9, 2024
64198fa
document attributes added, #407
Intelligent2013 Apr 9, 2024
d4b9557
document attributes added, #407
Intelligent2013 Apr 9, 2024
75ff839
term-display definition list processing added, #407
Intelligent2013 Apr 13, 2024
9cf114a
wrong sections order fixing, #407
Intelligent2013 Apr 13, 2024
1207347
named-content transformation updated, #407
Intelligent2013 Apr 14, 2024
bfc3707
redundant 00-01-std-doc-meta.adoc generation removed, #407
Intelligent2013 Apr 15, 2024
4b41fc6
markup update, #407
Intelligent2013 Apr 15, 2024
d356aa6
NISO adoc example moved to Makefile, #407
Intelligent2013 Apr 15, 2024
f3ec41c
Makefile updated, #407
Intelligent2013 Apr 15, 2024
74d1b44
Bibliography generation issue fixing, #407
Intelligent2013 Apr 15, 2024
0a6fdc8
Bibliography duplicate warning fixing, #407
Intelligent2013 Apr 15, 2024
0085586
Bibliography item formatting fixing, #407
Intelligent2013 Apr 16, 2024
0789687
sts2mn.xsl updated for std-doc-meta support, #407
Intelligent2013 Apr 16, 2024
d1b246e
sts2mn.xsl updated for bibdata, #407
Intelligent2013 Apr 16, 2024
0c1166a
sts2mn.xsl updated for bibdata, #407
Intelligent2013 Apr 17, 2024
36f37f4
sts2mn.xsl updated for bibdata, #407
Intelligent2013 Apr 17, 2024
7a7af65
xsl updated for definitions, #407
Intelligent2013 Apr 18, 2024
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
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ jobs:

- run: make mn2stsDTD_NISO

- run: make NISO-STS-Standard

# - run: make mn2stsDTD_ISO

- run: make publish
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ jobs:

- run: make testMN2IEEE

- run: make NISO-STS-Standard

- if: matrix.os == 'ubuntu-latest'
name: Notify mn-samples-bsi
uses: peter-evans/repository-dispatch@v1
Expand Down
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ SRCFILESTS := $(SRCDIR)/rice-en.final.sts.xml
SRCRFCDIR := rfcsources
SRCRFCMASK := rfc865*.xml

SRCNISODIR := nisosource
NISO_STANDARD_URL = https://www.niso-sts.org/downloadables/samples/NISO-STS-Standard-1-0.XML

DESTDIR := documents
DESTSTSXML := $(patsubst %.mn.xml,%.sts.xml,$(patsubst src/test/resources/%,documents/%,$(SRCFILE)))
DESTSTSHTML := $(patsubst %.xml,%.html,$(DESTSTSXML))
Expand Down Expand Up @@ -105,6 +108,14 @@ rfcsources:
saxon.jar:
curl -sSL $(SAXON_URL) -o $@


NISO-STS-Standard: target/$(JAR_FILE) nisosource documents
for f in $(SRCNISODIR)/*.XML; do java -jar target/$(JAR_FILE) $$f --output $(DESTDIR)/[email protected] ; done

nisosource:
curl -sSLk --create-dirs -O --output-dir $(SRCNISODIR) $(NISO_STANDARD_URL)


documents.rxl: $(DESTSTSHTML) | bundle
bundle exec relaton concatenate \
-t "mnconvert samples" \
Expand Down
37 changes: 18 additions & 19 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
= Metanorma mnconvert

== Installing Build Tools

You will need the `maven` build tool and `make`.

* https://www.baeldung.com/install-maven-on-windows-linux-mac[How to install Maven on Windows, Linux, Mac]


== Usage


=== 1. Check ISO/NISO STS XML against XSD, DTD.

[source,sh]
----
java -jar mnconvert-1.59.0.jar xml_file --check-type xsd-niso
java -jar mnconvert-1.60.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 @@ -26,7 +19,7 @@ or check any XML against XSD, DTD.

[source,sh]
----
java -jar mnconvert-1.44.0.jar xml_file --validation-against <path DTD or XSD>
java -jar mnconvert-1.60.0.jar xml_file --validation-against <path DTD or XSD>
----

- `--validation-against`, `-va` - Check against specified DTD ot XSD
Expand All @@ -37,7 +30,7 @@ java -jar mnconvert-1.44.0.jar xml_file --validation-against <path DTD or XSD>

[source,sh]
----
java -jar mnconvert-1.59.0.jar xml_file [options]
java -jar mnconvert-1.60.0.jar xml_file [options]
----

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

[source,sh]
----
java -jar mnconvert-1.59.0.jar xml_file [options]
java -jar mnconvert-1.60.0.jar xml_file [options]
----

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

[source,sh]
----
java -jar mnconvert-1.59.0.jar xml_file [options]
java -jar mnconvert-1.60.0.jar xml_file [options]
----

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

[source,sh]
----
java -jar mnconvert-1.59.0.jar docx_file [options]
java -jar mnconvert-1.60.0.jar docx_file [options]
----

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

----
java -jar mnconvert-1.59.0.jar xml_file [options]
java -jar mnconvert-1.60.0.jar xml_file [options]
----

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

[source,sh]
----
java -jar mnconvert-1.59.0.jar xml_file --output-format ieee --validation-against <path to IEEE DTD>
java -jar mnconvert-1.60.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 +111,7 @@ e.g.

[source,sh]
----
java -jar target/mnconvert-1.59.0.jar tests/iso-tc154-8601-1-en.xml --output tests/iso-tc154-8601-1-en.out.xml
java -jar target/mnconvert-1.60.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 All @@ -134,6 +127,12 @@ NOTE: Output format (Metanorma or STS) determines programmatically by root eleme
- Metanorma for input XML2RFC


== Installing Build Tools

You will need the `maven` build tool and `make`.

* https://www.baeldung.com/install-maven-on-windows-linux-mac[How to install Maven on Windows, Linux, Mac]


== Building the package

Expand All @@ -151,7 +150,7 @@ Update version in `pom.xml`, e.g.:
----
<groupId>org.metanorma</groupId>
<artifactId>mnconvert</artifactId>
<version>1.59.0</version>
<version>1.60.0</version>
<name>Metanorma XML to NISO STS XML two-directional converter</name>
----

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

[source,xml]
----
git tag v1.59.0
git push origin v1.59.0
git tag v1.60.0
git push origin v1.60.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.59.0</version>
<version>1.60.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
Loading
Loading