Metanorma: Aequitate Verum

Metanorma presentation XML and ISO/NISO STS mapping

General

This set of mapping rules is realized in the mnconvert command-line tool.

mnconvert is based on XSLT 1.0 (with Apache Xalan extensions) and allows to convert data:

  • from Metanorma presentation XML to ISO/NISO STS XML (module mn2sts.xsl)

  • from ISO/NISO STS XML to Metanorma AsciiDoc (module sts2mn.adoc.xsl)

  • from ISO/NISO STS XML to Metanorma presentation XML (module sts2mn.xsl)

Stages of conversion from ISO/NISO STS XML to Metanorma AsciiDoc (sts2mn.adoc.xsl):

  • XML linearization – replace all line breaks (except text in the tags code, preformat and mml:) to space, replace sequence of spaces into one space

  • replace bold, italic, underline, sup and sub tags to bold2, italic2, underline2, sup2 and sub2 for unconstrained formatting pair for further processing

  • reference`s id normalization in the elements ref and std

    • replacing a space, non-break space, colon to low line char _ (U+5F)

    • replacing non-breaking hyphen minus to hyphen minus char - (U+2D)

    • adding low line char _ (U+5F) prefix if id starts with digit

  • conversion from ISO/NISO STS XML to Metanorma AsciiDoc

  • checking for repeated bibliography references

  • copy images from the folder, specified by imagesdir (command line parameter, default value images), to the output folder

Note

First page data and each section (first level clause/annex) saves in a standalone .adoc file.

Stages of conversion from ISO/NISO STS XML to Metanorma presentation XML (sts2mn.xsl):

  • conversion from ISO/NISO STS XML to Metanorma presentation XML

  • if non-processed elements in front page (bibliographic) data found, then it will be added at the end of the <bibdata> element with message 'WARNING! There are unprocessed elements in 'front''

  • if non-processed elements found, then such element’s names will be added in comments at the end of XML file

  • checking on repeated bibliography references

  • copy images from the folder, setup by imagesdir (command line parameter, default value images), to the output folder

Stages of conversion from Metanorma presentation XML to ISO/NISO STS XML to (mn2sts.xsl):

  • conversion from Metanorma presentation XML to ISO/NISO STS XML

  • if non-processed elements in front page (bibliographic) data found, then it will be added at the end of the <bibdata> element with message 'WARNING! There are unprocessed elements in bibdata'

Legend:

  • < > - bidirectional rule (Metanorma presentationXML to and from STS NISO/ISO XML)

  • < - unidirectional rule, from Metanorma presentation XML to STS NISO/ISO XML

  • > - unidirectional rule, from STS NISO/ISO XML to Metanorma presentation XML

Note

This mapping is not a full ISO/NISO STS schema comparison and based on 30 XML samples only:

  • BSI ISOSTS sample XMLs

  • ISOSTS: C070907e.xml, C070908e.xml

Note
The corresponding ISO STS mapping rule is not given if it is identical to NISO STS structure.* > - unidirectional rule, from STS NISO/ISO XML to Metanorma presentation XML
Note
The NISO STS schema is available at NISO’s tag library.
Note
In the mapping tables the value 'indirect' is used to indicate that there is no one-to-one mapping from an ISOSTS element to a corresponding Metanorma presentation XML element. This does not mean that the data is ignored, instead it means that the text inside this element will be copied into the resulting Metanorma XML, or that its internal elements is processed into alternative elements.

Main parts (front page, body, annexes)

Root element

NISO STS: <standard>, <adoption>

Metanorma: <abc-standard xmlns="https://www.metanorma.org/ns/abc">, where abc stands for the type of standard: iso or bsi.

Determined automatically in sts2mn.xsl:

  • if /standard/front/nat-meta/@originator = BSI or /standard/front/iso-meta/secretariat = BSI, then bsi

  • else iso,

OR can be set up any value in the command line via parameter --type iso.

Sections

ISO/NISO STS Metanorma presentation XML Metanorma AsciiDoc

front/sec[@sec-type="intro"]

< >

preface/introduction

[[introduction]]

front/sec[@sec-type="foreword"]

< >

preface/foreword

[.preface]
[[foreword]]

front/sec[@sec-type]

< >

preface/clause

[.preface]
[[id]]
if @sec-type = amendment, then [.preface,type=corrigenda]

front/sec

< >

preface/clause

[.preface]

front//sec

< >

preface/clause

[[id]]

front//sec/@sec-type

<sec sec-type="foreword_publishing" id="sec_foreword_1">

< >

preface/clause/@sec-type

<clause id="sec_foreword_1" type="foreword_publishing">
Note
Metanorma presentation XML model doesn’t have sec-type attribute. It is added for round-trip conversion.

front/sec[@id="sec_pub_info_nat" @sec-type="publication_info"]

Note
Publishing and copyright information block

<

boilerplate/ copyright-statement
+ docidentifier[@type = 'ISBN']
+ ext/ics
+ preface/clause[ @type = 'related-refs']
+ preface/clause[ @type = 'corrigenda']

front/sec[@sec-type="publication_info" and node()/@content-type = 'ace-table']

>

[.preface,type=corrigenda]
== node() @content-type = 'ace-table']/caption/title

body

< >

sections

body/sec
[@sec-type="intro"]

if there is /standard/front/nat-meta and there isn’t iso-meta or reg-meta

< >

preface/introduction

[[introduction]]

body/sec
[@sec-type="intro"]

< >

sections/clause[@type="intro"]

[[introduction]]

body//sec[term-sec]

< >

terms

body//sec[term-sec]/@id

<sec id="sec_3" sec-type="terms">
<label>3</label><title>Terms and definitions</title>
<p>For the purposes of this document...</p>
...
<term-sec id="sec_3.1"><label>3.1</label>
...

< >

terms/@id

<terms id="sec_3">
<title>3<tab/>Terms and definitions</title>
<p>For the purposes of this document</p>
...
<term id="term_3.1">
<name>3.1</name>
...

[[id]]

body//sec[array[count(table/col) = 2]]

definitions

body/sec[@sec-type="scope"]

< >

sections/clause[@type="scope"]

sec/@id

< >

clause | introduction | foreword | terms | indexsect | references | definitions /@id

[[id]]

sec/label (if there isn’t 'title')

>

clause[@inline-header="true"]/name

==== {blank}

sec/title

< >

clause/title

Note
title=sec/label<tab/>sec/name

=== …​

Note
count of === depends of section’s depth.

sec[@sec-type = 'norm-refs']

< >

bibliography/references[@normative="true"]

[bibliography]
[NOTE,type=boilerplate]
--
..
--

back/ref-list
no nested ref-list

< >

bibliography/references[@normative="false"]

[bibliography]

back/ref-list/@id
no nested ref-list

< >

bibliography/references[@normative="false"]/@id

back/ref-list
with nested ref-list

< >

bibliography/clause/references[@normative="false"]

[bibliography]

back/ref-list/@id
with nested ref-list

< >

bibliography/clause/@id

[[id]]

back/ref-list/@content-type

content-type="bibl"

>

indirect

back/ref-list/title

< >

references/title

=== …​

Note
count of === depends of section’s depth.

back/ref-list/ref-list

< >

bibliography/clause/references[@normative="false"]

back/ref-list/ref-list/@id

< >

bibliography/clause/references[@normative="false"]/@id

sec[@sec-type = 'index']

< >

indexsect

back/sec[@id = 'ind']

>

indexsect

back

< >

skip processing

Note
see nested elements processing

app-group

< >

skip processing

Note
see nested elements processing

app

< >

annex

[appendix]

app/@id

< >

annex/@id

[[id]]

app/@content-type

content-type="inform-annex"

>

indirect

app/@content-type="inform-annex"

<

indirect

app/@content-type=" norm-annex"

Note
for BSI only

<

indirect

app/annex-type

< >

annex/@obligation
(without '()')

[appendix, obligation=…​]

Note
if annex-type != normative

app/@content-type=inform-annex

<

annex/@obligation = informative

app/@content-type

<

annex/@obligation

app//sec

< >

annex//clause

sec/@sec-type="titlepage","endorsement"

>

indirect

indirect

<

foreword/review

sec[@sec-type="appendix"]

<

annex/appendix

sub-part

Note
realized partially yet (for ADOC output only)

>

metanorma-collection

YAML collection document

directives:
  - documents-inline
bibdata:
  type: collection
  docid:
    type: bsi
...

indirect

<

clause/@obligation
foreword/@obligation
introduction/@obligation
terms/@obligation

obligation="informative"
obligation="normative"`

Front page (bibliographic) data

STS XML can contains nat-meta, iso-meta, reg-meta and std-meta at the same time. The conversion rules are:

  • if there is nat-meta, then

    • nat-meta goes to bibdata

    • iso-meta goes to bibdata/relation[@type = 'adopted-from']/bibitem/contributor[role/@type = 'publisher']/organization[abbreviation = 'xxx'] (xxx = ISO or IEC)

    • reg-meta goes to bibdata/relation[@type = 'adopted-from']/bibitem/contributor[role/@type = 'publisher']/organization[abbreviation = 'xxx'] (xxx = CEN or CENELEC)

    • std-meta goes to bibdata/relation[@type = 'adopted-from']/bibitem/contributor[role/@type = 'publisher']/organization[abbreviation = 'xxx'] (xxx != ISO, IEC, CEN, CENELEC)

  • if there isn’t nat-meta, then

    • iso-meta goes to bibdata

    • reg-meta goes to bibdata/relation[@type = 'adopted-from']/bibitem/contributor[role/@type = 'publisher']/organization[abbreviation = 'xxx'] (xxx = CEN or CENELEC)

    • std-meta goes to bibdata/relation[@type = 'adopted-from']/bibitem/contributor[role/@type = 'publisher']/organization[abbreviation = 'xxx'] (xxx != ISO, IEC, CEN, CENELEC)

In STS→Metanorma AsciiDoc conversion, only first (by priority nat-, iso-, reg-, std-meta) element is using for destination Metanorma AsciiDoc, for all another elements – only document number is populating into ‘:adopted-from:…​’ (see https://github.com/metanorma/sts2mn/issues/31)

ISO/NISO STS Metanorma presentation XML Metanorma AsciiDoc

xxx-meta

(nat-, iso-, reg-, std-meta)

>

bibdata[@type="standard"]

title-wrap/@xml:lang

< >

title/@language

title-wrap/full

>

title[@format="text/plain" @type="main"]

title-wrap/full

Note
values, separated by ' — '

<

title[*]

title-wrap/intro

< >

title[@format="text/plain" @type="title-intro"]

:title-intro-<@xml:lang>: …​

title-wrap/main

<

title[@format="text/plain" @type="title-intro"]

Note
if title[@type="main"] is empty

title-wrap/main

< >

title[@format="text/plain" @type="title-main"]

:title-main-<@xml:lang>: …​

title-wrap/compl

Note
For BSI, in source STS XML not all title components are available as standalone elements (full, intro, main or compl), therefore the XSLT conversion tries to separate title by 'dash' char (decimal 8212) into components (see 'mode="bibdata_title_full"' templates).

< >

title[@format="text/plain" @type="title-part"]

:title-part-<@xml:lang>: …​

title-wrap/compl

Note
amendment title puts after '—'

<

title[@type="title-amd"]

std-ref[@type='dated']

>

docidentifier[@type="iso"]
docidentifier[@type="iso-with-lang"] + (first upper-cased char from doc-ident/language)docidentifier[@type="iso-reference"] + (first upper-cased char from doc-ident/language)

std-ref[@type='dated']

<

docidentifier[1]

std-ref[@type='undated']

>

indirect

std-ref[@type='undated']

<

docidentifier[1], before ':'

doc-ref

>

docidentifier[@type="iso-reference"]

doc-ref

<

docidentifier[@type='iso-reference'][last()]
or
` docidentifier@type='iso-with-lang']`

custom-meta-group/
custom-meta[meta-name = 'ISBN']/
meta-value

< >

docidentifier[@type="ISBN"]

:isbn: …​

custom-meta-group/custom-meta
[meta-name != 'ISBN']

<custom-meta>
<meta-name>price-ref-pages</meta-name>
<meta-value>38</meta-value>
</custom-meta>
<custom-meta>
<meta-name>generation-date</meta-name>
<meta-value>2018-10-29 11:07:31</meta-value>
</custom-meta>
<custom-meta-group>
  <custom-meta>
    <meta-name>Perinorm ID</meta-name>
    <meta-value>000000000030387671</meta-value>
  </custom-meta>
  <custom-meta>
     <meta-name>UPI</meta-name>
    <meta-value>000000000030387671</meta-value>
  </custom-meta>
...
</custom-meta-group>

>

indirect

std-ident

< >

skip processing

Note
see nested elements processing

= originator doc-number-part-number

std-ident/doc-number

< >

docnumber

:docnumber: …​

pub-date

<pub-date>2019-03-15</pub-date>
Note

Comment from NISO-STS-common-metadata1.ent:

  • The <pub-date> was used in ISO STS to name the date this standard was (or was to be) published. This element has been superseded by <release-date> but may still appear in documents for backward compatibility with ISO STS.

  • Remarks: While this element may still be used, for better JATS compatibility, the date of initial publication should be recorded using <release-date> with the appropriate attributes.

  • Remarks: For ISO STS published standards, the <pub-date> recorded the date on whichthe project reached ISO stage 60, and the IS was first published. For the initial publication, the <pub-date> and the <release-date> were the same. For later ISO publications (corrections, new editions,versions in other languages), the <pub-date> would be earlier than the <release-date> (and was be the same across all versions of a given standard).

< >

date[@type="published"]/on

:published-date: …​

release-date

<release-date>2018-10-31</release-date>

>

date[@type="release"]/on

:date: release …​

release-date

Note
if output format is STS NISO

<

date[@type="release"]/on

release-date
or empty:
<release-date/>

Note
if output format is STS ISO

<

date[@type="release"]/on[last()]

doc-ident/sdo

< >

contributor[role type="author"]/organization/abbreviation

:mn-document-class: …​
or iso

std-ident/originator

< >

contributor[role type="publisher"]/ organization/abbreviation

std-ident/edition

< >

edition

:edition: …​

std-ident/version

>

version

indirect

std-ident/version

<

version/revision-date

content-language

< >

language

doc-ident/language

<

language

doc-ident/language

>

skip processing

:language: …​

doc-ident/release-version

>

status
stage:
WD – 20
CD – 30
DIS – 40
FDIS – 50
IS – 60
substage:
WD or CD or DIS or FDIS – 00
IS – 60

WD:
:docstage: 20
:docsubstage: 00
CD:
:docstage: 30
:docsubstage: 00
DIS:
:docstage: 40
:docsubstage: 00
FDIS:
:docstage: 50
:docsubstage: 00
IS:
:docstage: 60
:docsubstage: 60
doctype=standard: :docstage: 60
:docsubstage: 60
else: :docstage:
:docsubstage:

doc-ident/release-version

< >

status/stage/@abbreviation

doc-ident/release-version

>

ext/stagename

std-xref [@type= "isPublishedFormatOf"]

<std-xref type= "isPublishedFormatOf"><std-ref>20/30387670 DC</std-ref></std-xref>
Note
for BSI only.

< >

relation[@type="related"]/bibitem/
title: --
docidentifier: Draft for comment 'std-ref'

<relation type="related">
<bibitem>
<title>--</title>
<docidentifier>Draft for comment
20/30387670 DC</docidentifier>
</bibitem></relation>

:bsi-related: Draft for comment 'std-ref'

comm-ref

Note
for BSI only.

< >

relation[@type="related"]/bibitem/title: --
docidentifier: Committee reference 'text'.

<relation type="related"><bibitem>
<title>--</title>
<docidentifier>Committee reference
DEF/1</docidentifier>
</bibitem>
</relation>

:bsi-related: Committee reference 'text'

comm-ref
NOTE: not for BSI.

<comm-ref>ISO/TC 154</comm-ref>

< >

tries to extract 'TC', 'SC', 'WG` values and put them into:
ext/editorialgroup/technical-committee | subcommittee | workgroup / @number
or
ext/editorialgroup/technical-committee/@number

:technical-committee-type: TC
:technical-committee-number: …​
:subcommittee-type: SC
:subcommittee-number: …​
:workgroup-type: WG
:workgroup-number: …​
:technical-committee-code: …​
:technical-committee-name: …​

secretariat

<secretariat>SAC</secretariat>

< >

editorialgroup/secretariat

:secretariat: …​

std-xref

>

relation

std-xref/@type

relation/@type

Note
value copied for round-trip conversion, in Metanorma presentation XML there aren’t these types.

std-xref/std-ref

<std-xref type="informativelyReferences">
<std-ref type="dated">BS EN ISO 19011:2018</std-ref></std-xref>

< >

relation/bibitem

<relation type="informativelyReferences">
<bibitem>BS EN ISO 19011:2018</bibitem></relation>

reg-meta
iso-meta
std-meta

< >

relation[@type="adopted-from"]

:adopted-from: std-ident/originator std-ident/doc-number - std-ident/ part-number

permissions

< >

copyright

permissions/copyright-year

< >

copyright/from

:copyright-year: …​

permissions/copyright-holder
(if there is space)

< >

copyright/owner/organization/name

permissions/copyright-holder
(if there isn’t space)

< >

copyright/owner/organization/abbreviation

permissions

< >

boilerplate/copyright-statement/clause

permissions/copyright-year
permissions/copyright-holder

>

boilerplate/copyright-statement/clause / p[@id="boilerplate-year"]© {copyright-holder} {copyright-year}

permissions/copyright-statement

>

boilerplate/copyright-statement/clause / p[@id="boilerplate-message"]

Note
conversion gap (ADOC→XML) https://github.com/metanorma/mn-samples-bsi/issues/9

permissions/copyright-statement

<

boilerplate/copyright-statement//title

permissions/copyright-statement

<

boilerplate/copyright-statement//p[@id!="boilerplate-year"]

std-ident/doc-type
depends on
std-ident/originator

Note
for BSI documents

>

ext/doctype
originator starts with 'BS' and 'standard' → standard
originator starts with 'PAS' and 'publicly available specification' or 'standard' → publicly-available-specification
originator starts with 'PD' and 'published document' → published-document
else value 'as-is'

:doc-type: <see rules in left next one column>

std-ident/doc-type

>

ext/doctype
'is' → 'international-standard'
'r' → 'recommendation'
'spec' → 'spec'
else value 'as-is'

:doc-type: …​

std-ident/doc-type

<

ext/doctype
- international-standard → IS
- if BSI document → capitalized value - in another cases – value as is

ics

<ics>01.140.30</ics>

< >

ext/ics/code

:library-ics: …​

indirect

Note
commented in mn→sts conversion.

<

ext/subdoctype

std-ident/part-number

Note
not for BSI.

< >

ext/structuredidentifier/project-number/@part

:partnumber: …​

std-ident/originator
std-ident/doc-number

Note
not for BSI.

ext/structuredidentifier/project-number/ {originator} {doc-number}

std-ident/part-number

< >

ext/structuredidentifier/partnumber

:partnumber: …​

doc-ident/proj-id

< >

ext/structuredidentifier/project-number

doc-ident/urn

<urn>iso:std:iso-iec:29151:ed-1:v1:en</urn>

indirect

indirect

status/iteration

indirect

ext/structuredidentifier/docnumber

indirect

ext/updates-document-type

indirect

release-version-id

indirect

indirect

std-ident/suppl-type
std-ident/suppl-number
std-ident/suppl-version

indirect

meta-date
meta-date/@type

<meta-date type="DOR">2019-10-27</meta-date>
<meta-date type="DOW">2020-07-31</meta-date>
<meta-date type="DOP">2020-07-31</meta-date>
<meta-date type="DOA">2020-04-30</meta-date>
<meta-date type="vote-start">2018-10-31</meta-date>
<meta-date type="vote-end">2018-12-26</meta-date>

indirect

permissions/license

<

boilerplate/license-statement

permissions/license/@xlink:title

<

boilerplate/license-statement/clause[1]/title

indirect
see nested elements processing

<

boilerplate/license-statement/clause

permissions/license/license-p

<

boilerplate/license-statement/clause/p

permissions/license/license-p/@id

Note
the attribute @id isn’r defined in ISO STS DTD

<

boilerplate/license-statement/clause/p/@id

[[id]]

license[@specific-use="legal"]

<

boilerplate/legal-statement

license[@specific-use="legal"]/@xlink:title

<

boilerplate/legal-statement /clause[1]/title

license-p

<

boilerplate/legal-statement/clause

license-p/@id

Note
the attribute @id isn’r defined in ISO STS DTD

<

boilerplate/legal-statement/clause/@id

[[id]]

indirect

script

<script current="true">Latn</script>

fixed:
:mn-output-extensions: XML,html
:local-cache-only:
:data-uri-image:

:imagesdir: value imagesdir from command line parameter (default 'images'

:coverpage-image: images/ coverpage.X.png

Note
only if doc-type = publicly-available-specification

Section title

ISO/NISO STS

Metanorma presentation XML

Metanorma AsciiDoc

sec/label

<label>6.2.2.3</label>

< >

title

  • if there is 'title', then put it before 'tab':
    <title>6.2.2.3<tab/> …​ </title>

  • if there isn’t title: <title>10.1</title>
    and add `inline-header="true"
    to parent clause:
    <clause inline-header="true"…​

sec/title

<title>Prototype design</title>

< >

title (after tab)

<title>...<tab/>Prototype design</title>

=== …​

Note
count of === depends of section’s depth.

skip processing

<

title/@tab

skip processing

<

title/@depth

Terms

ISO/NISO STS

Metanorma presentation XML

Metanorma AsciiDoc

sec[@sec-type = 'terms']//title

>

[.boilerplate]
== …​

If there is no child p:
{blank}
else:
My predefined text

Note
count of == depends on clause depth.

term-sec

<term-sec id="sec_3.1">

>

skip processing

Note
sec 'sec[term-sec]' above

term-sec/@id

>

indirect

term-sec

<

term

term-sec/@id

Note
id=sec_ term/name

<

term

term-sec/label

<label>3.1</label>

< >

term/name

<name>3.1</name>

tbx:termEntry

<tbx:termEntry ...>

< >

term

<term ...>

=== …​

Note
count of === depends of section’s depth.

tbx:termEntry/@id

<tbx:termEntry id="term_3.1">

< >

term/@id

<term id="term_3.1">

[[id]]

tbc:termEntry/tbx:langSet

< >

indirect

tbc:termEntry/tbx:langSet/@xml:lang

<tbx:langSet XML:lang="en">
Note
in all STS examples XML:lang="en"

< >

indirect

tbx:langSet/tbx:tig

<tbx:tig>

>

skip processing

Note
see nested elements processing

tbx:tig/tbx:term
[../tbx:normativeAuthorization/ @value = 'preferredTerm']

<tbx:tig>
<tbx:term>geometrical product specification</tbx:term>
...
<tbx:normativeAuthorization value="preferredTerm"/>
</tbx:tig>

< >

preferred

<preferred>geometrical product specification</preferred>

tbx:tig/tbx:term[../tbx:normativeAuthorization/ @value = 'admittedTerm']

<tbx:tig><tbx:term>GPS</tbx:term>
...<tbx:normativeAuthorization value="admittedTerm"/></tbx:tig>

< >

admitted

<admitted>GPS</admitted>

\alt:[…​]

tbx:tig/tbx:term[../tbx:normativeAuthorization/ @value = 'deprecatedTerm']

< >

deprecates

\deprecated:[…​]

tbx:tig/tbx:term (without ../tbx:normativeAuthorization)

< >

preferred

tbx:tig/tbx:definition

<tbx:definition>aspect of ...

>

definition/p

<definition><p>aspect of ...

tbx:tig/tbx:definition

<

definition

tbx:entailedTerm

<tbx:entailedTerm target="term_3.8">objectives (3.8)</tbx:entailedTerm>

< >

<em>term without (x.y)</em> (<xref target="@target"><strong>x.y if substring in @target after _term equal to x.y</strong></xref>)

<em>objectives</em> (<xref target="term_3.8"><strong>3.8</strong></xref>)

\term:[term]
\term:[term_real,term]
if cited and referenced terms are different, for example:
\term:[systems,system]

tbx:normativeAuthorization

<tbx:normativeAuthorization value="preferredTerm"/>
<tbx:normativeAuthorization value="admittedTerm"/>

>

see above

tbx:partOfSpeech

<tbx:partOfSpeech value="noun"/>
Note
in all STS examples 'value="noun"'. Always creates.in mn→sts conversion.

< >

indirect

tbx:example

<tbx:example>Product, service,

< >

termexample

<termexample>Product, service,

[example]

tbx:source

<tbx:source>BS EN ISO 14044:2006+A1:2018, <bold>3.1</bold>, modified</tbx:source>

< >

termsource/origin/@citeas

<termsource><origin citeas="BS EN ISO 14044:2006+A1:2018, 3.1, modified"/></termsource>

[.source]
<<value1, value2,..>>, modified

Note
value1, value2, - extracted values from text
To do:
https://github.com/metanorma/ mnconvert/issues/7

tbx:source

<

termsource/origin/localityStack

tbx:source

<

termsource/origin/localityStack/locality

tbx:source

<

termsource/origin/localityStack/locality/@type

tbx:source

<

termsource/origin/localityStack/locality/referenceFrom

tbx:source

[example%unnumbered] , modified — …​

<

termsource/modification

tbx:note

<tbx:note>For the definition of

>

termnote/p

<termnote><p>For the definition of

NOTE:
…​

tbx:note

<

termnote

tbx:termType

<tbx:termType value="abbreviation"/>
Note
in all examples 'value="abbreviation"/>'

< >

<‌!--STS: <tbx:termType value="abbreviation"/>-→

Note
commented for round-trip conversion
<term-sec id="sec_3.1.1.1"><label>3.1.1.1</label>
<tbx:termEntry id="term_3.1.1.1"><tbx:langSet XML:lang="en">
<tbx:definition>
<tbx:entailedTerm
target="term_3.1.1.2">time (3.1.1.2)</tbx:entailedTerm> on the
<tbx:entailedTerm
target="term_3.1.1.18">calendar (3.1.1.18)</tbx:entailedTerm>
</tbx:definition>
<tbx:note>Common forms of date include <tbx:entailedTerm
target="term_3.1.2.7">calendar date (3.1.2.7)</tbx:entailedTerm>, <tbx:entailedTerm
target="term_3.1.2.8">ordinal date (3.1.2.8)</tbx:entailedTerm> or <tbx:entailedTerm
target="term_3.1.2.9">week date (3.1.2.9)</tbx:entailedTerm>.</tbx:note>
<tbx:tig id="term_3.1.1.1-1">
<tbx:term>date</tbx:term>
<tbx:partOfSpeech value="noun"/>
</tbx:tig>
</tbx:langSet>
</tbx:termEntry>
</term-sec>
<term id="term_3.1.1.1">
<name>3.1.1.1</name>
<preferred>date</preferred>
<definition>
<p>
<em>time</em> (<xref
target="term_3.1.1.2">
<strong>3.1.1.2</strong></xref>) on the
<em>calendar</em> (<xref
target="term_3.1.1.18">
<strong>3.1.1.18</strong></xref>)
<em>time scale</em> (<xref target="term_3.1.1.5">
<strong>3.1.1.5</strong></xref>)
</p>
</definition>
<termnote>
<p>Common forms of date include
<em>calendar date</em> (<xref
target="term_3.1.2.7">
<strong>3.1.2.7</strong></xref>),
<em>ordinal date</em> (<xref target="term_3.1.2.8">
<strong>3.1.2.8</strong></xref>) or
<em>week date</em> (<xref target="term_3.1.2.9"> <strong>3.1.2.9</strong></xref>).</p></termnote></term>

Text formatting elements

Note for NISO STS→Metanorma AsciiDoc conversion: is some cases unconstrained formatting pair used, see AsciiDoc unconstrained text.

Paragraph

ISO/NISO STS

Metanorma presentation XML

Metanorma AsciiDoc

p

>

p

p

<

p

Note
don’t create in output, if parent element is 'termexample', 'definition', 'termnote', 'modification' or 'dd'

p/@id

>

p/@id

[[id]]

p/@id

Note
if not BSI. (BSI doesn’t use @id for paragraphs)

<

p/@id

p/@style-type

<p style-type="indent">...

< >

p/@style-type

<p style-type="indent">...
Note
in Metanorma presentation XML model there isn’t the attribute @style-type. It’s added for round-trip conversion.

p/@specific-use

<p specific-use="indent">...

< >

p/@specific-use

<p specific-use="indent">...
Note
in Metanorma presentation XML model there isn’t the attribute @specific-use. It’s added for round-trip conversion.

indirect

<

p/@align

Boldface text

ISO/NISO STS

Metanorma presentation XML

Metanorma AsciiDoc

bold

<bold>core</bold>

< >

strong

<strong>core</strong>

*…​*
or
**…​**

*core*
Note
For NISO STS→Metanorma presentation XML conversion: in case of 'bold' inside 'std', then 'bold' will be moved outside 'std'.

NISO STS: <std><bold><std-ref>ISO 10667 series</std-ref></bold></std>

Metanorma: <strong><eref citeas="ISO 10667 series" type="inline">ISO 10667 series</eref></strong>

Italic text

ISO/NISO STS

Metanorma presentation XML

Metanorma AsciiDoc

italic

<italic>security</italic>

< >

em

<em>security</em>

_…​_
or
__…​__

Note
For NISO STS→Metanorma presentation XML conversion: in case of 'italic` inside 'std', then 'italic` will be moved outside std.

NISO STS: <std><italic><std-ref>BS 5839-1:2013</std-ref></italic></std>

Metanorma: <em><eref citeas="BS 5839-1:2013" type="inline">BS 5839-1:2013</eref></em>

Underlined text

ISO/NISO STS

Metanorma presentation XML

Metanorma AsciiDoc

underline

<underline>top</underline>

< >

underline

<underline>top</underline>

[underline]#…​#

Subscript formatting

ISO/NISO STS

Metanorma presentation XML

Metanorma AsciiDoc

sub

<sub>t</sub>

< >

sub

<sub>t</sub>

~…​~
or
~~…​~~

Superscript formatting

ISO/NISO STS

Metanorma presentation XML

Metanorma AsciiDoc

sup

<sup>a</sup>

< >

sup

<sup>a</sup>

^…​^
or
^^…​^^

skip

Note
nested elements will be processed

<

sup[stem]

Note
For NISO STS→Metanorma presentation XML conversion: sup formatting will be ignored if it contains xref[@ref-type='fn'] inside.

NISO STS: <sup><xref ref-type="fn" rid="fn_1"><sup>1)</sup></xref></sup>

Metanorma: <fn reference="1"><p><eref citeas="BS 8889" type="inline" bibitemid="BS_8889">BS 8889</eref> was in development at the time of publication.</p></fn>

Monospaced text

ISO/NISO STS

Metanorma presentation XML

Metanorma AsciiDoc

monospace

<monospace>.tbx.</monospace>

< >

tt

<tt>.tbx.</tt>

`…​`
or
``…​``

Small caps text

ISO/NISO STS

Metanorma presentation XML

Metanorma AsciiDoc

sc

P<sc>ublishers</sc>

< >

smallcap

P<smallcap>ublishers</smallcap>

[smallcap]#…​#

Line break

ISO/NISO STS

Metanorma presentation XML

Metanorma AsciiDoc

break

<break/>

< >

br

<br/>

+

Source code, pre-formatted text

ISO/NISO STS

Metanorma presentation XML

Metanorma AsciiDoc

code

<code language="ruby">puts "Hello, world."
Note
in ISO STS DTD this element isn’t defined

< >

sourcecode

<sourcecode lang="ruby">puts "Hello, world."

[source, language]
--
…​
--

code/@language

< >

sourcecode/@lang

[source, language]

preformat

<preformat>&lt;?xml version="1.0" encoding="UTF-8"?&gt;

< >

sourcecode

<sourcecode>&lt;?xml version="1.0" encoding="UTF-8"?&gt;

[source]
--
…​
--

preformat/@preformat-type

Note
for ISO STS only

<

sourcecode/@lang

Note

ISO/NISO STS

Metanorma presentation XML

Metanorma AsciiDoc

non-normative-note

<non-normative-note>
<label>NOTE 1</label>
<p>Continuous improvement

< >

note

<note>
<name>NOTE 1</name>
<p>Continuous improvement

NOTE:
…​
a few nested elements:
[NOTE]
====
…​
====
in a list item:
+
--
NOTE:
…​
--

non-normative-note/label

<non-normative-note><label>NOTE 1</label>...

< >

note/name

<note><name>NOTE 1</name>...

non-normative-note/label NOTE …​

<

note[not(name)]

non-normative-note/p

< >

note/p

non-normative-note

<

admonition

Note
for more information, see https://github.com/metanorma/mn2sts/issues/8

non-normative-note/@id

<

admonition/@id

non-normative-note/label

<

admonition/@type
(@type="danger", "caution", "warning", "important", "safty_precautions")

Note
uppercased

Example

ISO/NISO STS

Metanorma presentation XML

Metanorma AsciiDoc

non-normative-example

<non-normative-example><label>EXAMPLE</label><p>The ...

< >

example

<example><p>The ...

[example]

non-normative-example/label

<non-normative-example ><label> EXAMPLE </label>...

>

indirect

non-normative-example
/label: EXAMPLE …​

<

example/name

element-citation

indirect

ISO/NISO STS

Metanorma presentation XML

Metanorma AsciiDoc

ext-link

< >

link[text()]

ext-link/text()

< >

link/text()

ext-link/@xlink:type

xlink:type="simple"
Note
conversion gap, fixed value in mn→sts conversion https://github.com/metanorma/mn-samples-bsi/issues/24

< >

indirect

ext-link/@ext-link-type

<ext-link ext-link-type="uri" xlink:href="http://www.iso.org/directives"> www.iso.org/directives</ext-link>

>

indirect

ext-link/@xlink:href

<ext-link xlink:type="simple" xlink:href="http://bsigroup.com/standards"> bsigroup.com/standards</ext-link>

< >

link/@target

<link target="http://bsigroup.com/standards">
bsigroup.com/standards</link>

@xlink:href[@xlink:href]

Note
for BSI documents, non-hyphen minus (U+2011) replaces by minus.

uri

<uri>http://www.iso.org/obp</uri>

< >

link[no text()]/@target

<link target="http://www.iso.org/obp"/>

uri[uri]

Reference

ISO/NISO STS

Metanorma presentation XML

Metanorma AsciiDoc

xref[@ref-type != 'fn' and @ref-type != table-fn']

< >

xref

if @ref-type = 'other':
<..>

if @ref-type = 'sec' and reference to 'term-sec':
\term:[term name from term-sec]

else:
<<@rid>>

xref[@ref-type != 'fn' and @ref-type != table-fn']/@rid

< >

xref/@target

xref/@ref-type

>

indirect

xref/@ref-type

Note
evaluate by xslt, depends on 'referenced to' element (fig, table, app, fn, bibr or sec(default))

<

indirect

named-content

>

xref

term:[
IF @content-type = term and points to term-sec or termEntry, then put term
if text different than term, then put also text before term

ELSE
put xlink:href and text
]

named-content

<

xref[not contains digits or Annex]

named-content/@content-type

>

xref/@content-type

Note
In Metanorma presentation XML model there isn’t the attribute @content-type. It is added for round-trip conversion.

named-content/@content-type
- abbrev, if `@target starts-with 'abbrev'`
- term

<

xref[not contains digits or Annex]/@content-type

named-content/@xlink:href

Note
if empty, then get text content of named-content

>

xref/@target

named-content/@xlink:href

<

xref[not contains digits or Annex]/@target

named-content[@content-type="ace-tag"]

<named-content content-type="ace-tag" specific-use="A1_start"/>

>

indirect

\add:[]

std

< >

eref

<<id,locality,name>>
where
- id – id of ref item in bibliography, found by @std-id
- locality, name – parsed values from @std-id

XML:

<std std-id="iso:std:iso:guide:73:ed-1:en:clause:3.5.1.3" type="dated"><std-ref>ISO Guide 73:2009</std-ref>, 3.5.1.3</std>

ADoc:

<<ref_3,clause=3.5.1.3>>

std/std-ref

>

eref/@citeas

std/std-ref

<

eref/@citeas

Note

Preliminary processing:

  • replace double -- to 8212(decimal) dash

  • remove '[' and ']' around

Note
for BSI documents, replaces space to non-break space (A0(hex))

std/@std-id

Note
conversion gap in @std-id format https://github.com/metanorma/mn-samples-bsi/issues/37
(PAS_2035_2019 vs. PAS 2035:2019)

>

eref/@bibitemid

std/@std-id

<

eref/@bibitemid

NOTE: instead of @bibitemid tries to get bibliography//bibitem[@id = @bibitemid]/urn if exist

std

<

eref/localityStack

Note
get text from nested locality elements

, modified —

<

eref/localityStack/locality/modification

std/@std-id points to non-existing elements with @id=@std-id

<std std-id="BS 0:2011" type="dated">
  <std-ref>BS 0:2011</std-ref>
</std>

there isn’t any entity with id="BS 0:2011".

>

xref
(adoc→mn conversion)

Example:
<<BS_0_2011,BS 0:2011>>

std/@type

type="dated"
type="undated"

>

indirect

std/@type

type="dated"
type="undated"

<

eref/@citeas

Note
Determined programmatically, see template setDatedUndatedType in the module mn2sts.xsl

std/std-ref/processing-instruction('doi')

<std std-id="iso:std:iso:44001:en" type="undated">
  <std-ref>ISO 44001<?doi https://doi.org/10.3403/30353016U?></std-ref>
</std>

>

indirect

xref[@ref-type="other"]

<

callout

xref[@ref-type="other"]/@rid

<

callout/@target

Formula

ISO/NISO STS

Metanorma presentation XML

Metanorma AsciiDoc

disp-formula

< >

formula/stem

\$...\$

mml:*

< >

* XMLns="http://www.w3.org/1998/Math/MathML"

as is in MathML

mml:math/@id

>

formula/@id

[[id]]

disp-formula/@id

<

formula/@id

<disp-formula><mml:math id="mml_m1">...
<formula id="mml_m1">
<stem type="MathML">
<math XMLns="http://www.w3.org/1998/Math/MathML">...

inline-formula

<inline-formula>
<mml:math id="mml_m1"><mml:mrow>

stem

<stem type="MathML">
<math XMLns="http://www.w3.org/1998/Math/MathML">
<mrow>

NO id

stem:[…​]

Quote

ISO/NISO STS

Metanorma presentation XML

Metanorma AsciiDoc

disp-quote

< >

quote

[quote, related-object]
____
…​
____

disp-quote

<

quote/@id

disp-quote/related-object

< >

quote/source

[quote, related-object]

disp-quote/related-object/ text value

<

quote/source/@citeas

indirect

<

quote/source/@type

indirect

<

quote/source/@bibitemid

disp-quote/related-object

<

quote/author

disp-quote/p

< >

quote/p

…​

<disp-quote>
<p>This International Standard ...</p>
<related-object>ISO, ISO 7301:2011, Clause 1</related-object>
</disp-quote>

>

<quote>
<source>ISO, ISO 7301:2011, Clause 1</source>
<p> This International Standard ...</p>
</quote>

skip processing

Note
see nested elements processing

<

quote/localityStack

skip processing

Note
see nested elements processing

<

quote/localityStack/locality

disp-quote/related-object/
Clause
Annex
text value (delimited by ';')

<

quote/localityStack/locality/@type='clause'
quote/localityStack/locality/@type=annex
quote/localityStack/locality/@type

disp-quote/related-object/ text value

<

quote/localityStack/locality/referenceFrom

<disp-quote id="...">
<p id="...">This International Standard ...</p>
<related-object>ISO, ISO 7301:2011, Clause 1</related-object>
</disp-quote>

<

<quote id="...">
<source type="inline" bibitemid="ISO7301"
citeas="ISO 7301:2011"><localityStack><locality type="clause">
<referenceFrom>1</referenceFrom></locality>
</localityStack></source>
<author>ISO</author>
<p id="...">This International Standard ...</p>
</quote>

Footnote

ISO/NISO STS

Metanorma presentation XML

Metanorma AsciiDoc

fn

< >

fn

footnote:[…​]

fn/@id

< >

indirect

fn/label

< >

indirect

xref[@ref-type = "fn"][following-sibling::*[fn][@id = xref/@rid]]/text()

< >

fn/@reference

<xref ref-type="fn" rid="fn_1"><sup>1</sup></xref>
<fn id="fn_1"><label>1</label><p>The Fire...</p></fn>
<fn reference="1"><p>The Fire ...</p></fn>

table-wrap-foot/fn

Note
moving up to the text

>

fn

footnote:[…​]

back/fn-group

Note
moving up to the text (possible conversion gap https://github.com/metanorma/mn-samples-bsi/issues/18)

>

fn

footnote:[…​]

xref[@ref-type="fn"]

< >

fn

footnote:[…​]

xref[@ref-type="fn"]/text()

NOTE:removing ')'

< >

fn/@reference

If xref[@ref-type="fn"] in table-wrap:
table-wrap//fn[@id = xref/@rid]/*

< >

fn/*

else: //fn-group/fn[@id = xrefrid]/*

< >

fn/*

xref[@ref-type="table-fn"]

< >

fn

xref[@ref-type="table-fn"]/text()

Note
removing ')'

< >

fn/@reference

table-wrap//fn[@id = xref/@rid]/*

< >

fn/*

<thead>...
<xref ref-type="table-fn"
rid="table-fn_1.1">
<sup>A)</sup>
</xref>...
</thead>
...
<table-wrap-foot>
<fn id="table-fn_1.1">
<label><sup>A)</sup></label>
<p>These items shall appear in every design brief.</p>
</fn></table-wrap-foot></table-wrap>
<thead>
...
<fn reference="A"><p>These items shall appear in every design brief.</p></fn>
...
</thead>
<list-item>
...
<xref ref-type="fn" rid="fn_1">
<sup>1)</sup>
</xref>
...
</body>
...
<fn-group>
<fn id="fn_1">
<label>1)</label>
<p>Marking...</p>
</fn-group>
</back>
<fn reference="1"><p>Marking...</p></fn>

Amendment

ISO/NISO STS

Metanorma presentation XML

Metanorma AsciiDoc

indirect
see nested elements processing

<

amend

editing-instruction

Note
this rule for NISO STS only.

<

amend/description

editing-instruction/@id

Note
this rule for NISO STS only.

<

amend/@id

editing-instruction/@content-type

Note
this rule for NISO STS only.

<

amend/@change

editing-instruction/p

Note
this rule for NISO STS only.

<

amend/description/p

p

<

amend/description/p

p/@content-type

Note
this rule for ISO STS only.

<

amend/@change

indirect
see nested elements processing

<

amend/newcontent

p

<

amend/newcontent/p

label

Note
adding suffix to label for element @type

<

amend/autonumber/@type

Annotation

ISO/NISO STS Metanorma presentation XML Metanorma AsciiDoc

element-citation

Note
this rule for ISO STS only

<

annotation

element-citation/@id

Note
this rule for ISO STS only

<

annotation/@id

element-citation/annotation

Note
this rule for NISO STS only

<

annotation

element-citation/ annotation/@id

Note
this rule for NISO STS only

<

annotation/@id

element-citation/ annotation/@id

>

<text from node with @rid = annotation/@id>

Other

ISO/NISO STS Metanorma presentation XML Metanorma AsciiDoc

styled-content

<styled-content style-type="normal">(This annex forms an integral part of this
Recommendation | International Standard.)</styled-content>

<styled-content style="color:#009fe3;">•</styled-content>

< >

<‌!--STS: <‌styled-content ...> -->...<‌!--STS: <‌/styled-content> -->
Note
Tags commented for round-trip conversion.
<‌!--STS: <‌styled-content style-type="normal">-->(This annex forms an integral
part of this Recommendation | International Standard.)<‌!--STS: <‌/styled-content>-->

<‌!--STS: <‌styled-content style="color:#009fe3;">-->•<‌!--STS: <‌/styled-content>-->

indirect

boxed-text

<boxed-text>
  <p>Objective: To provide management direction... </p>
</boxed-text>

indirect

th/break th/strong

<

th//br/strong

Tables

Note
In Metanorma presentation XML there aren’t elements for NISO/ISO STS XML elements 'table-wrap', 'table-wrap/label', 'table-wrap/caption', therefore they transform to data inside Metanorma presentation XML element 'table'.

ISO/NISO STS

Metanorma presentation XML

Metanorma AsciiDoc

table-wrap

<table-wrap ...>

< >

skip processing

Note
see nested elements processing

table-wrap/@id

<table-wrap id="tab_D.1" ...>

< >

table/@id

<table id="tab_D.1" ...>

[[id]]

table-wrap/@content-type

content-type="ace-table"

>

indirect

options="unnumbered"

table-wrap/@position

position="float"

indirect

table-wrap/@orientation

orientation="landscape"

< >

<pagebreak orientation="…​"/>
…​
<pagebreak orientation="portrait"/>

<pagebreak orientation="landscape"/>
...
<pagebreak orientation="portrait"/>

before table:
[%…​]
<<<

after table:
[%portrait]
<<<

table-wrap/label

<label>Table D.1</label>

< >

table/name

<name>Table D.1 — ...</name>

table-wrap/caption

<caption>

skip processing

Note
see nested elements processing

table-wrap/caption/title

<title>Table of requirements</title>

< >

table/name

<name>...Table of requirements</name>

. …​

table

<table ...>

< >

table

<table ...>

if parent is array:
[[array_ + array/@id]]
[%unnumbered]
[…​]
|===
…​
|===

array/table

<

figure//table

table/@id

<table id="calendar">

< >

table/@id

<table id="calendar">
Note
if there isn’t source STS table/@id, then it populates from STS table-wrap/@id or array/@id

[[id]]

table/@width

<table width="650">
<table width="80%">
<table width="500px">

< >

table/@width

<table width="650px">
<table width="80%">
<table width="500px">
Note
if in source STS table/@width there isn’t 'px' or '%', then 'px' will be added.

width=…​

Note
if value doesn’t contain '%' or 'px', then 'px' will be added.

table-wrap/table-wrap-foot

</table>
<table-wrap-foot>
  <p>
    <non-normative-note>
      <label>NOTE</label>
      <p>Actual sensitivity might vary by activity or partner.</p>
    </non-normative-note>
  </p>
</table-wrap-foot>
</table-wrap>

< >

</tbody> content of table-wrap-foot </table>

</tbody>
<p>
<note>
<name>NOTE</name>
<p>Actual sensitivity might vary by activity or partner.</p>
</note>
</p>
</table>

options="footer"

table/@style

<table style="border-collapse:collapse;border-color:#009fe3;">

< >

table/@style

<table style="border-collapse:collapse;border-color:#009fe3;">
Note
in Metanorma presentation XML model there isn’t the attribute @style. It adds for round-trip conversion.

indirect

table/@frame

<table frame="hsides">

< >

table/@frame

<table frame="hsides">
Note
in Metanorma presentation XML model there isn’t the attribute @frame. It added for round-trip conversion.

indirect

table/@rules

<table rules="rows">

< >

table/@rules

<table rules="rows">
Note
in Metanorma presentation XML model there isn’t the attribute @rules. It added for round-trip conversion.

indirect

thead

<thead>

< >

thead

<thead>

options="header",
headerrows=count(tr)

tbody

<tbody>

< >

tbody

<tbody>

tfoot

<

tfoot

colgroup

<colgroup>

< >

colgroup

<colgroup>
Note
In some STS XML documents there isn’t 'colgroup' element, but in Metanorma presentation XML it adds always.

col

<col ...>

< >

col

<col ...>

col/@width

<col width="11%"/>

< >

col/@width

<col width="11%"/>

[cols="…​"]

Note
comma separated widths
Note
removes %, cm, and multiply by 100

tr

<tr>

< >

tr

<tr>

th,td

<th ...>

< >

th,td

<th …​

|

th,td/@align

<th align="center">

< >

th,td/@align

<th align=" center ">

^
>

th,td/@valign

<th valign="middle">

< >

th,td/@valign

<th valign="middle">

.^
.>

th,td/@style

<th style="background-color:#009fe3;">

< >

th,td /@style

<th style="background-color:#009fe3;">
Note
in Metanorma presentation XML model there isn’t the attribute @style. It added for round-trip conversion.

th,td/@rowspan

<th rowspan="6">

< >

th,td/@rowspan

<th rowspan="6">

.x+

th,td/@colspan

<th colspan="3">

< >

th,td/@colspan

<th colspan="3">

x+

th,td/@scope

<th scope="row">

< >

th,td/@scope

<th scope="row">
Note
in Metanorma presentation XML model there isn’t the attribute @scope. It is added for round-trip conversion.

List

ISO/NISO STS

Metanorma presentation XML

Metanorma AsciiDoc

list[@list-type = 'bullet' or @list-type = 'simple']

< >

ul

list[@list-type = 'bullet']

<

ul[not(@list-type)]

list[not (@list-type = 'bullet' or @list-type = 'simple')]

>

ol

list[@list-type = 'alpha-lower']

<

ol[not(@list-type)]

list/@list-type='alpha-lower'

< >

ol/@type="alphabet"]

list/@list-type='alpha-upper'

< >

ol/@type="alphabet_upper"

[upperalpha]

list/@list-type='roman-lower'

< >

ol/@type="roman"

[lowerroman]

list/@list-type='roman-upper'

< >

ol/@type="roman_upper"

[upperroman]

list/@list-type=' arabic'

>

ol/@type="arabic"

[arabic]

list/ first char of list/label[1] in 1234567890]

>

ol/@type="arabic"

[arabic]

list/@list-type='order'

<

ol/@type="arabic"

list/ first char of list/label[1] in ixvcm]

>

@type="roman"

[lowerroman]

list first char of list/label[1] in IXVCM]

>

@type="roman_upper"

[upperroman]

list/ first char of list/label[1] in a-z]

>

@type="alphabet"

first char of list/label[1] in A-Z

>

@type="alphabet_upper"

[upperalpha]

list/@list-type

< >

@type

list/@list-type="simple"

indirect

indirect

first char of list/label[1] != 1 or a or A or i or I

>

@start
decimal number for start value determines in the Java function org.metanorma.utils.Util.getListStartValue

list-item

< >

li

if list/@list-type = 'bullet' 'dash' or simple:
* …​

else
. …​

Note
count of '*' and ',' depends on level depth

list-item/label

>

indirect

list-item/label

Note
Evaluate in xslt type of list (ul or ol), @type and @start values.See <xsl:template match="*[local-name() = 'li']"> for rules.

<

Evaluate by ul,ol/@type, @start

Definitions list

ISO/NISO STS

Metanorma presentation XML

Metanorma AsciiDoc

def-list

<def-list ...>

>

dl

<dl>

def-list/title

>

indirect

*…​*

def-list/def-item

<def-item ...>

>

skip processing

Note
see nested elements processing

def-item/term

<term>CBRMS</term>

>

dt

<dt> CBRMS</dt>

…​::

def-list/def-item/id

<def-item id="abbrev_1">

>

dt/@id

<dt id="abbrev_1">...

[[id]]

def-item/def

<def>
<p>intellectual property right</p>
</def>

>

dd

<dd>
<p>intellectual property right</p>
</dd>

text

array [count of table/col =2 or count of table/colgroup/col = 2]

<array id="tab_a">
<table>
<tbody>
<tr>
<td valign="top" scope="row" align="left">cent</td>
<td valign="top" align="left">time scale component century
</td>
</tr>
</tr>
<tr>
<td align="left" valign="top">
<italic>C</italic><sub>dev</sub>
</td>
<td align="left" valign="top">is the cost of developing
the product (for total anticipated quantity);</td>
</tr>....
Note
this rule is not applicable for BSI documents

< >

dl
@key = 'true' if STS `label = 'Key'`

<dl id="tab_a">
<dt>cent</dt>
<dd>
<p id="...">time scale component century</p>
</dd>

tr/td[1]::tr/td[2]

array [count of table/col =2 or count of table/colgroup/col = 2]/@id

< >

dl/@id

array [count of table/col =2 or count of table/colgroup/col = 2]/label = 'Key'

>

dl/@key="true"

*label*

Image

ISO/NISO STS

Metanorma presentation XML

Metanorma AsciiDoc

fig

>

figure

====
…​
====

fig/@id

>

figure/@id

[[id]]

fig

Note
for BSI only

<

figure[figure]

fig/@id

Note
for BSI only

<

figure[figure]/@id

fig-group

<

figure[figure]

fig-group/@id

<

figure[figure]/@id

fig-group/@content-type=figures

<

figure[figure]

fig/@fig-type

<fig fig-type="figure"

indirect

fig/label

<label>Figure 1</label>

< >

figure/name

<name>Figure 1 — ...

if starts with 0:
[number=…​]

fig/caption

<caption><title>Multidimensional relationships</title></caption>

< >

figure/name

<name>... Multidimensional relationships</name>

. …​

fig-group

>

figure

====
…​
====

fig-group/@id

>

figure/@id

[[id]]

graphic[caption]

<graphic xlink:type="simple"
xlink:href="30238432_FigA01a">
<label>a)</label><caption>
<title>Imposed loads for treads
with a span of up to 1 200 mm
</title> </caption></graphic>

< >

figure

====
…​
====

graphic/label (if there isn’t graphic/caption/title)

< >

figure/name

. …​

graphic/label

<label>a)</label><caption>...

< >

figure/name

<name>a)   …​ </name)

graphic/caption/title

<label>a)</label><caption>
<title>Imposed loads for treads
with a span of up to 1 200 mm
</title></caption>

< >

figure/name

<name>... Imposed loads for treads with a span of up to 1 200 mm

. …​

graphic

< >

image height="auto" width="auto"

image:: …​

inline-graphic

>

image height="auto" width="auto"

image:: …​

indirect

image/@height

height="auto"

indirect

image/@width

width="auto"

inline-graphic | graphic/@xlink:href and not processing-instruction('isoimg-id')

Note
if there isn’t processing-instruction('isoimg-id'), then @xlink:href contains image file name.

>

image/@src
string in base64 encoding OR
imagedir path + @xlink:href + .png(optional, if @xlink:href doesn’t have file extension)

image:: …​

graphic/processing-instruction('isoimg-id')

Note
if there is this PI, then it contains image file name (but not @xlink:href)
Note
graphic/@xlink:href
conversion gap
https://github.com/metanorma/mn-samples-bsi/issues/25

>

image/@src
imagedir path + value from 'isoimg-id'

image:: …​

graphic/@xlink:href

<

image/@id

graphic/alt-textinline-graphic/alt-text

< >

image/@alt

image:: …​ [alt-text]

indirect

image/@mimetype

graphic/object-id[@pub-id-type = 'publisher-id']

<object-id pub-id-type="fpi">
+//ISO 9070/RA::A00007::GE::DIN German
Institute for Standardization::Standards
"publisher-id">fig-1</object-id>

>

indirect

image:: …​ [object-id]

Bibliography

ISO/NISO STS

Metanorma presentation XML

Metanorma AsciiDoc

ref

< >

bibitem

* [[[id,(ref)label]]], title
or
* [[[id,ref]]], title

Note
see below for component’s source data.

ref/@id

< >

bibitem/@id

* [[[id,(ref)label]]]

ref/std/@std-id

>

* [[[id,(ref)label]]]

ref/std/@std-ref

>

* [[[id,(ref)label]]]

ref/std/@std-ref

>

* [[[id,(ref)label]]]

ref/std//title

>

* [[[id,(ref)label]]], _title_

ref/@content-type

< >

bibitem/@type

ref/label

< >

docidentifier[@type="metanorma"]

* [[[id,(ref)label]]]

mixed-citation

Note
there is a conversion gap for sub-elements, see https://github.com/metanorma/mn-samples-bsi/issues/10

< >

bibitem/title

mixed-citation/std

>

* [[[id,(ref)label]]]

mixed-citation/@publication-type

>

indirect

ref-list/ref/std/@std-id

< >

bibitem/docidentifier[@type="URN"]

indirect

bibitem/fetched

indirect

bibitem/title/@type

indirect

bibitem/title/@format

indirect

bibitem/title/@language

indirect

bibitem/title/script

indirect

bibitem/uri

indirect

bibitem/uri/@type

indirect

Note
commented

<

bibitem/docnumber

indirect

Note
commented

<

bibitem/date

indirect

NOTE: commented

<

bibitem/date/@type

indirect

NOTE: commented

<

bibitem/date/on

indirect

NOTE: commented

<

bibitem/contributor

indirect

NOTE: commented

<

bibitem/contributor/role

indirect

NOTE: commented

<

bibitem/contributor/role/@type

indirect

NOTE: commented

<

bibitem/contributor/organization

indirect

NOTE: commented

<

bibitem/contributor/organization/name

indirect

NOTE: commented

<

bibitem/contributor/organization/abbreviation

indirect

NOTE: commented

<

bibitem/contributor/organization/uri

indirect

bibitem/edition

indirect

bibitem/language

indirect

bibitem/script

indirect

bibitem/abstract

indirect

bibitem/abstract/@format

indirect

bibitem/abstract/@language

indirect

bibitem/abstract/@script

indirect

bibitem/status

indirect

bibitem/status/stage

indirect

bibitem/status/substage

indirect

bibitem/copyright

indirect

bibitem/copyright/from

indirect

bibitem/copyright/owner

indirect

bibitem/copyright/owner/organization

indirect

bibitem/copyright/owner/organization/name

indirect

bibitem/relation

indirect

bibitem/relation/@type

indirect

bibitem/relation/bibitem /…​

indirect

bibitem/place

ref/std/xref
ref/std/fn

<

bibitem/note

indirect

bibitem/note/@format

ref/title

<

bibitem/formattedref

indirect

bibitem/formattedref/@format

see rules for text formatting elements

bibitem/formattedref/ formatted text

Processing instructions

ISO/NISO STS

Metanorma presentation XML

Metanorma AsciiDoc

<?foreward …​

<?foreward metadata-error?>

>

indirect, ignores

<?doi …​

<?doi https://doi.org/10.3403/30130607?>

< >

copy 'as is', for round-trip conversion

<?QAout …​
<?QA …​

<?QAout enhancements="En-2 En-3 En-4"?>
<?QA valid="true" features="E-1 E-3 M-13 M-15 F-6 En-1" release-version="v2.1"?>

< >

copy 'as is', for round-trip conversion

<?…​ Page_Break?>
<?…​ Page-Break?>

<?Para Page_Break?>
<?Table Page_Break?>
<?Table Page-Break?>

>

<pagebreak />

<<<

Note

conversion gap
for page break between table’s rows:
https://github.com/metanorma/mn-samples-bsi/issues/47

<?Para Page_Break?>

<

<pagebreak />

Note
for pagebreak before table, see rule for <pagebreak orientation="…​"/>

<?isoimg-id …​

<?isoimg-id 44001_ed1fig1.eps?>

>

image/@src
.eps, .EPS extensions replacing by .png

<image src="images/44001_ed1fig1.png"...

image::…​