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

Blog post: about the changes in mnconvert #647

Open
Intelligent2013 opened this issue Sep 14, 2022 · 40 comments
Open

Blog post: about the changes in mnconvert #647

Intelligent2013 opened this issue Sep 14, 2022 · 40 comments
Assignees
Labels
enhancement New feature or request

Comments

@Intelligent2013
Copy link
Contributor

Intelligent2013 commented Sep 14, 2022

Source: metanorma/mnconvert#193 (comment)

mnconvert now generates these id:

  • Foreword
    IEC id="sec-foreword"
    ISO id="sec_foreword"

  • Introduction
    IEC id="sec-introduction"
    ISO id="sec_intro", "sec_0" if there are sub-clauses

  • Section
    IEC id="sec-X(.Y)*",
    ISO id="sec_X(.Y)*",
    where "X(.Y)*" is the section, clause, subclause number (example, 1.2.1, B.1 for Annex)

  • Annex
    IEC id="anx-X",
    ISO id="sec_X",
    where "X" is the annex letter

  • Bibliography
    IEC id="sec-bibliograpy"
    ISO id="sec_bibl"

  • Bibliography item
    IEC id="bib-X"
    ISO id="biblref_X",
    where "X" is item number

  • Index
    IEC id="sec-index"
    ISO id="sec_index"

  • Paragraph
    IEC id="p-N", where N is the sequential number throughout the document

  • List item
    IEC id="lis-X.Y-Ln-M", where "X.Y" is the subclause number, "n" is the list number inside the subclause, "M" is the list item number
    For nested list: id="lis-X.Y-Ln-Lk-M", where "k" is the parent list-item number
    Note: lists in non-numbered sections (Foreword, Introduction) don't have id.

  • Table, numbered
    IEC id="tab-X",
    ISO id="tab_X",
    where "X" is the table number

  • Table, without number
    IEC id="tab-informal-X.Y-N", where "X.Y" is the subclause number, "n" is the table number in the subclause

  • Figure, numbered
    IEC id="fig-X",
    ISO id="fig_X",
    where "X" is figure number

  • Note
    IEC id="not-X.Y-N", where "X.Y" is the subclause number, "N" is the note number inside the subclause
    Note: notes in non-numbered sections (Foreword, Introduction) don't have id.

  • Table note
    IEC id="tno-X-N", where "X" is the table number, "N" is note number inside the table.

  • Figure note
    IEC id="fno-X-N", where "X" is the figure number, "N" is note number inside the figure.

  • Term section
    IEC id="con-X.Y",
    ISO id="sec_X.Y",
    where "X.Y" is the term entry number (section number)

  • Term entry
    IEC id="te-X.Y",
    ISO id="term_X.Y",
    where "X.Y" is the term entry number (section number)

  • Term
    IEC @id="ter-term_without_spaces", where "term_without_spaces" is the term with replaced spaced, non-break space, '(', ')' to underscore

  • Note to entry
    IEC id="nte-X.Y-N", where "X.Y" is the subclause number, "N" is the sequential note number for the current term

  • Formula, numbered
    IEC id="for-N",
    ISO id="formula_N",
    where "N" is formula number

  • Formula, without number
    IEC id="for-informal-X-Y", where "X" is the subclause number, "Y" is the sequential formula number inside the subclause

  • Math
    IEC id="mml-mN", where "N" is the sequential number throughout the document

  • Text footnote
    IEC id="foo-N",
    ISO id="fn_N",
    where "N" is the sequential number throughout the document

  • Table footnote
    IEC id="tfn-X-Y",
    ISO id="table-fn_X-Y",
    where "X" is the table number, "Y" is the sequential number if the footnote inside the table

  • Figure footnote
    IEC id="figfn-X-Y",
    ISO id="figure-fn_X-Y",
    where "X" is the figure number, "Y" is the sequential number inside the figure

Done in metanorma/mnconvert#247

@Intelligent2013 Intelligent2013 added the enhancement New feature or request label Sep 14, 2022
@Intelligent2013 Intelligent2013 self-assigned this Sep 14, 2022
@Intelligent2013
Copy link
Contributor Author

Intelligent2013 commented Sep 15, 2022

From metanorma/mnconvert#239 (comment):

mnconvert updated. Now link converts to the uri and ext-link:

  • ext-link, if url isn't start with http:, https:, ftp:, mailto:, or link/@target is different than the text in link
  • otherwise uri

Examples:

  • <link target="https://www.iso.org/obp"/> converts to
    <uri>https://www.iso.org/obp</uri>
  • <link target="http://www.iso.org/directives">www.iso.org/directives</link> converts to
    <ext-link xlink:href="http://www.iso.org/directives">www.iso.org/directives</ext-link>
  • <link target="http://standards.iso.org/iso/10303/tech/step_titles.htm">ISO website</link> converts to
    <ext-link xlink:href="http://standards.iso.org/iso/10303/tech/step_titles.htm">ISO website</ext-link>
  • <link target="mailto:[email protected]"/> converts to
    <uri>mailto:[email protected]</uri></p>

Done in metanorma/mnconvert#248

@Intelligent2013
Copy link
Contributor Author

From metanorma/mnconvert#198 (comment):

mnconvert generates the tag std-meta for metadata instead of iso-meta for ISO documents.

Done in metanorma/mnconvert#249

@Intelligent2013
Copy link
Contributor Author

From metanorma/mnconvert#250:

mnconvert determines ISO or IEC NISO STS XML format by the prefix of the elements iso-standard or iec-standard - ISO or IEC.

Done in metanorma/mnconvert#251

@Intelligent2013
Copy link
Contributor Author

From metanorma/mnconvert#199:
for IEC documents mnconvert generates a few permissions for each copyright/owner/organization.

Done in metanorma/mnconvert#252.

@Intelligent2013
Copy link
Contributor Author

From metanorma/mnconvert#203:

mnconvert expanded for the determination of sec-type by titles:

  • foreword: Foreword, Avant-propos, Prólogo / Prólogo de la versión en español, Предисловие
  • intro: Introduction, Introducción, Введение
  • scope: Scope, Domaine d'application, Objeto y campo de aplicación, Область применения
  • norm-refs: Normative references, Références normatives, Referencias normativas, Нормативные ссылки
  • terms: Terms and definitions / starts with 'Terms, definitions', Termes et definitions / starts with 'Termes, définitions;, Тérminos y definiciones, Термины и определения

Done in metanorma/mnconvert#256.

@Intelligent2013
Copy link
Contributor Author

From metanorma/mnconvert#205 (comment):
mnconvert adds @content-type and <annex-type> in accordance with the rules:

  • ISO:

    • @content-type="inform-annex, <annex-type>(informative)</annex-type>,
    • @content-type="normative-annex", <annex-type>(normative)</annex-type>
  • IEC:

    • @content-type="informative,
    • @content-type="normative"

If title starts with (This annex does not form an integral part , then @content-type isn't added.

Done in metanorma/mnconvert#257.

@Intelligent2013
Copy link
Contributor Author

From metanorma/mnconvert#208 (comment):
mnconverts converts indexes in IEC documents into the structure:

<index-entry id="df-1">
	<term>ambient air temperature</term>
	<see-entry>3.8.9</see-entry>
	<see-entry>df 1</see-entry>
</index-entry>

Done in metanorma/mnconvert#260.

@Intelligent2013
Copy link
Contributor Author

From metanorma/mnconvert#213 (comment):
mnconvert transforms the Metanorma element admonition into NISO STS XML element non-normative-note with @content-type=”warning”, “important” or “caution”.

Done in metanorma/mnconvert#261.

@Intelligent2013
Copy link
Contributor Author

From metanorma/mnconvert#215 (comment):
mnconvert now codes lists outside of paragraph always for IEC and ISO.

Done in metanorma/mnconvert#262.

@Intelligent2013
Copy link
Contributor Author

From ISO/IEC Coding Guidelines: abbreviations lists support:
mnconvert recognizes abbreviation list if:

  • preceding title contains 'Abbrev',
  • definition term @id starts with
    • abb-, or
    • abb_

and sets @list-type="abbreviation" for ISO and IEC.

Done in metanorma/mnconvert#263.

@Intelligent2013
Copy link
Contributor Author

From metanorma/mnconvert#229:
mnconvert supports tbx:partOfSpeech conversion.

Done in metanorma/mnconvert#268.

@Intelligent2013
Copy link
Contributor Author

From metanorma/mnconvert#230:
mnconvert process these forms of the term:

  • acronym
  • abbreviation
  • fullForm
  • symbol

Done in metanorma/mnconvert#270.

@Intelligent2013
Copy link
Contributor Author

From: metanorma/mnconvert#232

mnconvert updated for tbx:see processing. Now mnconvert:

  • generates NOTE in adoc for the element tbx:see, and adds prefix See and suffix for more information. (prefix and suffix support in en, fr and ru languages, see below).
    Example:
    NISO STS XML:
<tbx:see target="sec_A"/>

converts to:

NOTE: See <<sec_A>> for more information.
  • generates tbx:see in Metanorma XML to NISO STS XML conversion for termnote with the prefix See and suffix for more information. (prefix and suffix support in en, fr and ru languages, see below).

Example:
Metanorma XML:

<termnote id="_">
<p id="_">See <xref target="sec_A"/> for more information.</p>
</termnote>

converts to:
NISO STS XML:

<tbx:see target="sec_A"/>

Supported strings for prefix:

  • en: See
  • fr: Voir
  • ru: См.

Supported strings for suffix:

  • en: for more information.
  • fr: pour plus d'informations.
  • ru: для дополнительной информации.

Done in metanorma/mnconvert#273.

@Intelligent2013
Copy link
Contributor Author

From metanorma/mnconvert#233:

mnconvert generates tbx:source for ISO documents without std inside.
Example 'before':

<tbx:source>
<std type="dated">
<std-ref>ISO 7301:2011</std-ref>, Clause 3.1</std>
</tbx:source>

Example 'after':

<tbx:source>ISO 7301:2011, Clause 3.1</tbx:source>

Done in metanorma/mnconvert#274.

@Intelligent2013
Copy link
Contributor Author

From metanorma/mnconvert#234:

mnconvert converts the NISO STS XML element tbx:subjectField into

domain:[dispute resolution]

and Metanorma XML:

<domain>dispute resolution</domain>

into NISO STS XML

<tbx:subjectField>dispute resolution</tbx:subjectField>

Done in metanorma/mnconvert#275.

@Intelligent2013
Copy link
Contributor Author

Intelligent2013 commented Oct 9, 2022

From metanorma/mnconvert#236, metanorma/mnconvert#223:
mnconvert supports the values app, bibr, disp-formula, fig, fn, list, sec, table, table-fn, other in xref/@ref-type.

Done in metanorma/mnconvert#276, metanorma/mnconvert#280.

@Intelligent2013
Copy link
Contributor Author

Intelligent2013 commented Oct 9, 2022

From metanorma/mnconvert#237:
The tag <sup> around footnote number removed for IEC documents.

Done in metanorma/mnconvert#278.

@Intelligent2013
Copy link
Contributor Author

From metanorma/mnconvert#227:
mnconvert encodes the figure key as:

  • ISO: fig/table-wrap/table with a @content-type="fig-index".
  • IEC: fig/def-list with a @list-content="figure".

Done in metanorma/mnconvert#279.

@Intelligent2013
Copy link
Contributor Author

From metanorma/mnconvert#221:
mnconvert updated for MN XML to STS NISO XML conversion of ISO documents - table cells text enclosed in the bold element.

Done in metanorma/mnconvert#281.

@Intelligent2013
Copy link
Contributor Author

From metanorma/mnconvert#220:
table/@width processing removed for IEC document.

Done in metanorma/mnconvert#282.

@Intelligent2013
Copy link
Contributor Author

From metanorma/mnconvert#219:

mnconvert generates the NISO STS XML element editing-instruction for Metanorma XML elements:

  • admonition[@type = 'editorial'], and
  • review

Done in metanorma/mnconvert#283.

@Intelligent2013
Copy link
Contributor Author

From metanorma/mnconvert#241:
mnconvert process supplementary-materialas link with file:// prefix.

Done in metanorma/mnconvert#284.

@Intelligent2013
Copy link
Contributor Author

From metanorma/mnconvert#231:
mnconvert supports processing of the cross-references to terms external to the document (tbx:entailedTerm with @xtarget).

Done in metanorma/mnconvert#285.

@Intelligent2013
Copy link
Contributor Author

From metanorma/mnconvert#212:
mnconvert updated for processing

  • styled-content/@style-type : addition, deletion
  • styled-content/@specific-use: insert, delete.
    into add and del Metanorma markup.

Done in metanorma/mnconvert#286.

@Intelligent2013
Copy link
Contributor Author

From metanorma/mnconvert#211:
mnconvert updated for processing:
– valign-top
– valign-bottom
– valign-middle
– indent
in @style-type.

Done in metanorma/mnconvert#288.

@Intelligent2013
Copy link
Contributor Author

From metanorma/mnconvert#272:
mnconvert updated for processing tbx:langSet/@xml:lang:

[%metadata]
language:: fr

Done in metanorma/mnconvert#306.

@Intelligent2013
Copy link
Contributor Author

From metanorma/mnconvert#308:

mnconvert updated for encoding term's references:

  • cross-references between terminological entries or terms within the Terms and definitions clause tagged as <tbx:entailedTerm>
  • references to terms outside the terms and definitions section tagged as xref

Done in metanorma/mnconvert#310.

@Intelligent2013
Copy link
Contributor Author

From metanorma/mnconvert#311:

mnconvert updated for the cross-references to items in bibliography. Now these references tagged as xref.

Done in metanorma/mnconvert#312.

Intelligent2013 added a commit that referenced this issue Jan 8, 2023
Intelligent2013 added a commit that referenced this issue Jan 8, 2023
@Intelligent2013
Copy link
Contributor Author

@Intelligent2013 since this blog post is really long, perhaps we can split it into a 3 part series? Thoughts?

@ronaldtse 1st part is ready in #702.

@ronaldtse
Copy link
Contributor

Thank you @Intelligent2013 !

@Intelligent2013
Copy link
Contributor Author

From metanorma/mnconvert#246:

mnconvert updated for ISO informal tables:

  • id="tab_X", where X - any letter
  • footnote in informal table id="table-fn_[table footnote sequence within the document]

Done in metanorma/mnconvert#315

@Intelligent2013
Copy link
Contributor Author

From metanorma/mnconvert#216:

mnconvert updated for support table without borders:

  • NISO STS XML element array/table converts to Metanorma Adoc as table with id prefix array_,
  • Metanorma XML element table with id starts with array_ converts to NISO STS XML element array/table.

Done in metanorma/mnconvert#316.

@Intelligent2013
Copy link
Contributor Author

From metanorma/mnconvert#322:
mnconvert updated for sub-figures and multiple graphics within a figure for ISO documents:
if the figure consists of multiple sub-figures , then each subfigure is captured as a separate <graphic> inside <fig>.
Example:

<fig id="fig_C.2">
	<label>Figure C.2</label>
	<caption>
		<title>Stages of gelatinization</title>
	</caption>
	<graphic id="fig_C.2.1" xlink:href="...">
		<label>Figure C.2-1</label>
		<caption>
			<title>Initial stages: No grains are fully gelatinized (ungelatinized starch granules are visible inside the kernels)</title>
		</caption>
	</graphic>
	<graphic id="fig_C.2.2" xlink:href="...">
		<label>Figure C.2-2</label>
		<caption>
			<title>Intermediate stages: Some fully gelatinized kernels are visible</title>
		</caption>
	</graphic>
	<graphic id="fig_C.2.3" xlink:href="...">
		<label>Figure C.2-3</label>
		<caption>
			<title>Final stages: All kernels are fully gelatinized</title>
		</caption>
	</graphic>
</fig>

Done in metanorma/mnconvert#323.

@Intelligent2013
Copy link
Contributor Author

From metanorma/mnconvert#214:

mnconvert updated for processing of list-type for unordered lists. list-type values are:

  • ISO documents
    • dash for all unordered lists
  • IEC documents
    • bullet for 1st level list
    • dash for 2nd level list
    • symbol for 3rd level list
    • bullet for 4th level list
    • etc.

mnconvert updated for processing of list-type for ordered lists with 'arabic' numerals:

  • list-type="order" for ISO documents,
  • list-type="arabic" for IEC documents.

Done in metanorma/mnconvert#335.

@Intelligent2013
Copy link
Contributor Author

From metanorma/mnconvert#209:

mnconvert updated for inserting the non-breaking spaces in:

  • [number][space][SI Unit], where SI Units are: second, meter, kilogram, ampere, kelvin, mole or candela, or symbols s, m, kg, A, K, mol or cd;
  • (Part)[space]([0-9])
  • ([0-9])[space](%)
  • (ISO)[space]([0-9])
  • (ISO/TC)[space]([0-9])
  • (NOTE)[space]([0-9])
  • (Note)[space]([0-9][space]to[space]entry:)
  • (Table)[space](([A-Z|a-z]\.)?[0-9])
  • (Formula)[space]([\(([A-Z|a-z]\.)?(0-9)*\)])
  • (SC)[space]([0-9])
  • (Figure)[space](([A-Z|a-z]\.)?[0-9])
  • (Clause)[space](([A-Z|a-z]\.)?[0-9])
  • (Volume)[space]([0-9])
  • (Article)[space]([A-Z|a-z][ |\.|\)])
  • (Step)[space]([0-9])
  • (OIML)[space](D)
  • (Annex)[space]([A-Z|a-z](\.[0-9]+)*[ |\.|\)])
  • [space](— [A-Z])
  • [0-9] [mathematical signs] ][0-9], where mathematical signs are: +, -, /, *, ≠, <, >, ≤, ≥, ±, ×, ÷, ∙, mod, %, ^.
  • Numbers formatted with spaces: ([0-9])[space]([0-9])

Done in metanorma/mnconvert#336.

@Intelligent2013
Copy link
Contributor Author

From metanorma/mnconvert#228:
mnconvert updated for support Unit statements in the figures.
fig/p[@content-type=”dimension”] converts to

[NOTE,type=units]
...

Done in metanorma/mnconvert#383.

@Intelligent2013
Copy link
Contributor Author

Intelligent2013 commented Apr 2, 2023

From metanorma/mnconvert#224:
mnconvert updated for support Unit statements in the tables.
table-wrap-foot/p[@content-type=”dimension”] converts to:

[NOTE,type=units]
...

Done in metanorma/mnconvert#387.

@Intelligent2013
Copy link
Contributor Author

From metanorma/mnconvert#218:
mnconvert updated for support preformat element.
The Metanorma XML element sourcecode without @lang converts to preformat.

Done in metanorma/mnconvert#397.

@Intelligent2013
Copy link
Contributor Author

From metanorma/mnconvert#230:
mnconvert updated for support values formula and equation for tbx:termType.

Done in metanorma/mnconvert#402.

ronaldtse pushed a commit that referenced this issue Mar 4, 2024
ronaldtse pushed a commit that referenced this issue Mar 4, 2024
ronaldtse pushed a commit that referenced this issue Mar 4, 2024
ronaldtse pushed a commit that referenced this issue Mar 4, 2024
ronaldtse pushed a commit that referenced this issue Mar 4, 2024
ronaldtse pushed a commit that referenced this issue Mar 4, 2024
kwkwan pushed a commit that referenced this issue Mar 5, 2024
kwkwan pushed a commit that referenced this issue Mar 5, 2024
kwkwan pushed a commit that referenced this issue Mar 5, 2024
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
Status: 🏗 In progress
Development

No branches or pull requests

2 participants