metanorma-un 0.9.10 → 0.9.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/un/html/htmlstyle.css +1 -1
- data/lib/isodoc/un/un.plenary-attachment.xsl +119 -24
- data/lib/isodoc/un/un.plenary.xsl +119 -24
- data/lib/isodoc/un/un.recommendation.xsl +136 -18
- data/lib/metanorma/un/basicdoc.rng +0 -27
- data/lib/metanorma/un/biblio-standoc.rng +164 -0
- data/lib/metanorma/un/biblio.rng +50 -18
- data/lib/metanorma/un/isodoc.rng +68 -206
- data/lib/metanorma/un/relaton-un.rng +149 -0
- data/lib/metanorma/un/un.rng +2 -141
- data/lib/metanorma/un/version.rb +1 -1
- data/metanorma-un.gemspec +3 -2
- metadata +6 -10
- data/.github/workflows/rake.yml +0 -15
- data/.github/workflows/release.yml +0 -24
- data/Rakefile +0 -8
- data/bin/console +0 -14
- data/bin/rspec +0 -17
- data/bin/setup +0 -8
@@ -243,6 +243,9 @@
|
|
243
243
|
<fo:block role="TOCI">
|
244
244
|
<fo:block text-align-last="justify" margin-left="12mm" text-indent="-12mm">
|
245
245
|
<fo:basic-link internal-destination="{@id}" fox:alt-text="{@section}">
|
246
|
+
<xsl:if test="@section = ''">
|
247
|
+
<xsl:attribute name="fox:alt-text">Annex</xsl:attribute>
|
248
|
+
</xsl:if>
|
246
249
|
<xsl:if test="@section != ''">
|
247
250
|
<fo:inline padding-right="3mm">
|
248
251
|
<xsl:choose>
|
@@ -701,7 +704,19 @@
|
|
701
704
|
|
702
705
|
<xsl:choose>
|
703
706
|
<xsl:when test="ancestor::un:sections">
|
704
|
-
<
|
707
|
+
<xsl:variable name="section">
|
708
|
+
<xsl:for-each select="..">
|
709
|
+
<xsl:call-template name="getSection"/>
|
710
|
+
</xsl:for-each>
|
711
|
+
</xsl:variable>
|
712
|
+
<xsl:variable name="margin-left">
|
713
|
+
<xsl:choose>
|
714
|
+
<xsl:when test="string-length($section) = 3">11mm</xsl:when>
|
715
|
+
<xsl:when test="string-length($section) > 3">13mm</xsl:when>
|
716
|
+
<xsl:otherwise>9.5mm</xsl:otherwise>
|
717
|
+
</xsl:choose>
|
718
|
+
</xsl:variable>
|
719
|
+
<fo:block font-size="{$font-size}" font-weight="bold" space-before="3pt" margin-bottom="12pt" margin-left="-{$margin-left}" line-height="108%" keep-with-next="always" role="H{$level}"> <!-- line-height="14.5pt" text-indent="-9.5mm" -->
|
705
720
|
<xsl:if test="$level = 1">
|
706
721
|
<!-- <xsl:attribute name="margin-left">-8.5mm</xsl:attribute> -->
|
707
722
|
<xsl:attribute name="margin-top">18pt</xsl:attribute>
|
@@ -713,7 +728,9 @@
|
|
713
728
|
<xsl:if test="$level = 3">
|
714
729
|
<xsl:attribute name="margin-top">16pt</xsl:attribute>
|
715
730
|
</xsl:if>
|
716
|
-
<xsl:call-template name="insertTitleAsListItem"
|
731
|
+
<xsl:call-template name="insertTitleAsListItem">
|
732
|
+
<xsl:with-param name="provisional-distance-between-starts" select="$margin-left"/>
|
733
|
+
</xsl:call-template>
|
717
734
|
</fo:block>
|
718
735
|
</xsl:when>
|
719
736
|
|
@@ -1311,6 +1328,11 @@
|
|
1311
1328
|
</xsl:variable>
|
1312
1329
|
<xsl:variable name="table-border" select="normalize-space($table-border_)"/>
|
1313
1330
|
|
1331
|
+
<xsl:variable name="table-cell-border_">
|
1332
|
+
|
1333
|
+
</xsl:variable>
|
1334
|
+
<xsl:variable name="table-cell-border" select="normalize-space($table-cell-border_)"/>
|
1335
|
+
|
1314
1336
|
<xsl:attribute-set name="table-container-style">
|
1315
1337
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
1316
1338
|
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
@@ -1322,8 +1344,6 @@
|
|
1322
1344
|
<xsl:attribute-set name="table-style">
|
1323
1345
|
<xsl:attribute name="table-omit-footer-at-break">true</xsl:attribute>
|
1324
1346
|
<xsl:attribute name="table-layout">fixed</xsl:attribute>
|
1325
|
-
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
1326
|
-
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
1327
1347
|
|
1328
1348
|
</xsl:attribute-set><!-- table-style -->
|
1329
1349
|
|
@@ -1682,7 +1702,7 @@
|
|
1682
1702
|
|
1683
1703
|
<xsl:attribute-set name="list-style">
|
1684
1704
|
|
1685
|
-
<xsl:attribute name="provisional-distance-between-starts">
|
1705
|
+
<xsl:attribute name="provisional-distance-between-starts">3.5mm</xsl:attribute>
|
1686
1706
|
<xsl:attribute name="margin-left">7mm</xsl:attribute>
|
1687
1707
|
<xsl:attribute name="text-indent">0mm</xsl:attribute>
|
1688
1708
|
|
@@ -2424,10 +2444,18 @@
|
|
2424
2444
|
<xsl:variable name="table_attributes">
|
2425
2445
|
|
2426
2446
|
<xsl:element name="table_attributes" use-attribute-sets="table-style">
|
2447
|
+
|
2448
|
+
<xsl:if test="$margin-side != 0">
|
2449
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2450
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
2451
|
+
</xsl:if>
|
2452
|
+
|
2427
2453
|
<xsl:attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></xsl:attribute>
|
2428
2454
|
|
2429
|
-
<xsl:
|
2430
|
-
|
2455
|
+
<xsl:if test="$margin-side != 0">
|
2456
|
+
<xsl:attribute name="margin-left"><xsl:value-of select="$margin-side"/>mm</xsl:attribute>
|
2457
|
+
<xsl:attribute name="margin-right"><xsl:value-of select="$margin-side"/>mm</xsl:attribute>
|
2458
|
+
</xsl:if>
|
2431
2459
|
|
2432
2460
|
<xsl:if test="ancestor::*[local-name()='sections']">
|
2433
2461
|
<xsl:attribute name="border-top">1.5pt solid black</xsl:attribute>
|
@@ -3185,6 +3213,10 @@
|
|
3185
3213
|
<xsl:template match="*[local-name()='tr']">
|
3186
3214
|
<fo:table-row xsl:use-attribute-sets="table-body-row-style">
|
3187
3215
|
|
3216
|
+
<xsl:if test="*[local-name() = 'th']">
|
3217
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
3218
|
+
</xsl:if>
|
3219
|
+
|
3188
3220
|
<xsl:call-template name="setTableRowAttributes"/>
|
3189
3221
|
<xsl:apply-templates/>
|
3190
3222
|
</fo:table-row>
|
@@ -4244,8 +4276,17 @@
|
|
4244
4276
|
</fo:inline>
|
4245
4277
|
</xsl:template> <!-- tt -->
|
4246
4278
|
|
4279
|
+
<xsl:variable name="regex_url_start">^(http://|https://|www\.)?(.*)</xsl:variable>
|
4247
4280
|
<xsl:template match="*[local-name()='tt']/text()" priority="2">
|
4248
|
-
<xsl:
|
4281
|
+
<xsl:choose>
|
4282
|
+
<xsl:when test="java:replaceAll(java:java.lang.String.new(.), '$2', '') != ''">
|
4283
|
+
<!-- url -->
|
4284
|
+
<xsl:call-template name="add-zero-spaces-link-java"/>
|
4285
|
+
</xsl:when>
|
4286
|
+
<xsl:otherwise>
|
4287
|
+
<xsl:call-template name="add_spaces_to_sourcecode"/>
|
4288
|
+
</xsl:otherwise>
|
4289
|
+
</xsl:choose>
|
4249
4290
|
</xsl:template>
|
4250
4291
|
|
4251
4292
|
<xsl:template match="*[local-name()='underline']">
|
@@ -4601,8 +4642,11 @@
|
|
4601
4642
|
|
4602
4643
|
<xsl:template name="add-zero-spaces-link-java">
|
4603
4644
|
<xsl:param name="text" select="."/>
|
4645
|
+
|
4646
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$1')"/> <!-- http://. https:// or www. -->
|
4647
|
+
<xsl:variable name="url_continue" select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$2')"/>
|
4604
4648
|
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
|
4605
|
-
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($
|
4649
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($url_continue),'(-|\.|:|=|_|—| |,|/)','$1')"/>
|
4606
4650
|
</xsl:template>
|
4607
4651
|
|
4608
4652
|
<!-- add zero space after dash character (for table's entries) -->
|
@@ -5159,6 +5203,9 @@
|
|
5159
5203
|
<xsl:value-of select="substring($str, 2)"/>
|
5160
5204
|
</xsl:template>
|
5161
5205
|
|
5206
|
+
<!-- ======================================= -->
|
5207
|
+
<!-- math -->
|
5208
|
+
<!-- ======================================= -->
|
5162
5209
|
<xsl:template match="mathml:math">
|
5163
5210
|
<xsl:variable name="isAdded" select="@added"/>
|
5164
5211
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
@@ -5209,14 +5256,57 @@
|
|
5209
5256
|
<xsl:value-of select="$comment_text"/>
|
5210
5257
|
</xsl:template>
|
5211
5258
|
|
5259
|
+
<xsl:template match="*[local-name() = 'asciimath']">
|
5260
|
+
<xsl:param name="process" select="'false'"/>
|
5261
|
+
<xsl:if test="$process = 'true'">
|
5262
|
+
<xsl:apply-templates/>
|
5263
|
+
</xsl:if>
|
5264
|
+
</xsl:template>
|
5265
|
+
|
5266
|
+
<xsl:template match="*[local-name() = 'latexmath']"/>
|
5267
|
+
|
5268
|
+
<xsl:template name="getMathml_asciimath_text">
|
5269
|
+
<xsl:variable name="asciimath" select="../*[local-name() = 'asciimath']"/>
|
5270
|
+
<xsl:variable name="latexmath">
|
5271
|
+
|
5272
|
+
</xsl:variable>
|
5273
|
+
<xsl:variable name="asciimath_text_following">
|
5274
|
+
<xsl:choose>
|
5275
|
+
<xsl:when test="normalize-space($latexmath) != ''">
|
5276
|
+
<xsl:value-of select="$latexmath"/>
|
5277
|
+
</xsl:when>
|
5278
|
+
<xsl:when test="normalize-space($asciimath) != ''">
|
5279
|
+
<xsl:value-of select="$asciimath"/>
|
5280
|
+
</xsl:when>
|
5281
|
+
<xsl:otherwise>
|
5282
|
+
<xsl:value-of select="following-sibling::node()[1][self::comment()]"/>
|
5283
|
+
</xsl:otherwise>
|
5284
|
+
</xsl:choose>
|
5285
|
+
</xsl:variable>
|
5286
|
+
<xsl:variable name="asciimath_text_">
|
5287
|
+
<xsl:choose>
|
5288
|
+
<xsl:when test="normalize-space($asciimath_text_following) != ''">
|
5289
|
+
<xsl:value-of select="$asciimath_text_following"/>
|
5290
|
+
</xsl:when>
|
5291
|
+
<xsl:otherwise>
|
5292
|
+
<xsl:value-of select="normalize-space(translate(.,' ',' '))"/>
|
5293
|
+
</xsl:otherwise>
|
5294
|
+
</xsl:choose>
|
5295
|
+
</xsl:variable>
|
5296
|
+
<xsl:variable name="asciimath_text_2" select="java:org.metanorma.fop.Util.unescape($asciimath_text_)"/>
|
5297
|
+
<xsl:variable name="asciimath_text" select="java:trim(java:java.lang.String.new($asciimath_text_2))"/>
|
5298
|
+
<xsl:value-of select="$asciimath_text"/>
|
5299
|
+
</xsl:template>
|
5300
|
+
|
5212
5301
|
<xsl:template name="mathml_instream_object">
|
5213
|
-
<xsl:param name="
|
5302
|
+
<xsl:param name="asciimath_text"/>
|
5214
5303
|
<xsl:param name="mathml_content"/>
|
5215
5304
|
|
5216
|
-
<xsl:variable name="
|
5305
|
+
<xsl:variable name="asciimath_text_">
|
5217
5306
|
<xsl:choose>
|
5218
|
-
<xsl:when test="normalize-space($
|
5219
|
-
<xsl:otherwise><xsl:call-template name="getMathml_comment_text"/></xsl:otherwise>
|
5307
|
+
<xsl:when test="normalize-space($asciimath_text) != ''"><xsl:value-of select="$asciimath_text"/></xsl:when>
|
5308
|
+
<!-- <xsl:otherwise><xsl:call-template name="getMathml_comment_text"/></xsl:otherwise> -->
|
5309
|
+
<xsl:otherwise><xsl:call-template name="getMathml_asciimath_text"/></xsl:otherwise>
|
5220
5310
|
</xsl:choose>
|
5221
5311
|
</xsl:variable>
|
5222
5312
|
|
@@ -5233,10 +5323,10 @@
|
|
5233
5323
|
</xsl:attribute>
|
5234
5324
|
|
5235
5325
|
<!-- <xsl:if test="$add_math_as_text = 'true'"> -->
|
5236
|
-
<xsl:if test="normalize-space($
|
5326
|
+
<xsl:if test="normalize-space($asciimath_text_) != ''">
|
5237
5327
|
<!-- put Mathin Alternate Text -->
|
5238
5328
|
<xsl:attribute name="fox:alt-text">
|
5239
|
-
<xsl:value-of select="$
|
5329
|
+
<xsl:value-of select="$asciimath_text_"/>
|
5240
5330
|
</xsl:attribute>
|
5241
5331
|
</xsl:if>
|
5242
5332
|
<!-- </xsl:if> -->
|
@@ -5309,6 +5399,29 @@
|
|
5309
5399
|
<xsl:value-of select="."/><xsl:value-of select="$zero_width_space"/>
|
5310
5400
|
</xsl:template>
|
5311
5401
|
|
5402
|
+
<!-- Examples:
|
5403
|
+
<stem type="AsciiMath">x = 1</stem>
|
5404
|
+
<stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
|
5405
|
+
<stem type="AsciiMath"><asciimath>x = 1</asciimath><latexmath>x = 1</latexmath></stem>
|
5406
|
+
-->
|
5407
|
+
<xsl:template match="*[local-name() = 'stem'][@type = 'AsciiMath'][count(*) = 0]/text() | *[local-name() = 'stem'][@type = 'AsciiMath'][*[local-name() = 'asciimath']]" priority="3">
|
5408
|
+
<fo:inline xsl:use-attribute-sets="mathml-style">
|
5409
|
+
|
5410
|
+
<xsl:choose>
|
5411
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
5412
|
+
<xsl:otherwise>
|
5413
|
+
<xsl:apply-templates>
|
5414
|
+
<xsl:with-param name="process">true</xsl:with-param>
|
5415
|
+
</xsl:apply-templates>
|
5416
|
+
</xsl:otherwise>
|
5417
|
+
</xsl:choose>
|
5418
|
+
|
5419
|
+
</fo:inline>
|
5420
|
+
</xsl:template>
|
5421
|
+
<!-- ======================================= -->
|
5422
|
+
<!-- END: math -->
|
5423
|
+
<!-- ======================================= -->
|
5424
|
+
|
5312
5425
|
<xsl:template match="*[local-name()='localityStack']"/>
|
5313
5426
|
|
5314
5427
|
<xsl:template match="*[local-name()='link']" name="link">
|
@@ -8016,6 +8129,10 @@
|
|
8016
8129
|
|
8017
8130
|
<fo:list-block xsl:use-attribute-sets="list-style">
|
8018
8131
|
|
8132
|
+
<xsl:if test="local-name() = 'ol'">
|
8133
|
+
<xsl:attribute name="provisional-distance-between-starts">6mm</xsl:attribute>
|
8134
|
+
</xsl:if>
|
8135
|
+
|
8019
8136
|
<xsl:if test="*[local-name() = 'name']">
|
8020
8137
|
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
8021
8138
|
</xsl:if>
|
@@ -9014,7 +9131,7 @@
|
|
9014
9131
|
|
9015
9132
|
<xsl:variable name="element_name_keep-together_within-line">keep-together_within-line</xsl:variable>
|
9016
9133
|
|
9017
|
-
<xsl:template match="text()[not(ancestor::*[local-name() = 'bibdata'] or ancestor::*[local-name() = 'sourcecode'] or
|
9134
|
+
<xsl:template match="text()[not(ancestor::*[local-name() = 'bibdata'] or ancestor::*[local-name() = 'link'][not(contains(.,' '))] or ancestor::*[local-name() = 'sourcecode'] or ancestor::*[local-name() = 'math'] or starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.') )]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
|
9018
9135
|
|
9019
9136
|
<!-- enclose standard's number into tag 'keep-together_within-line' -->
|
9020
9137
|
<xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
|
@@ -9490,13 +9607,14 @@
|
|
9490
9607
|
</xsl:template>
|
9491
9608
|
|
9492
9609
|
<xsl:template name="setId">
|
9610
|
+
<xsl:param name="prefix"/>
|
9493
9611
|
<xsl:attribute name="id">
|
9494
9612
|
<xsl:choose>
|
9495
9613
|
<xsl:when test="@id">
|
9496
|
-
<xsl:value-of select="@id"/>
|
9614
|
+
<xsl:value-of select="concat($prefix, @id)"/>
|
9497
9615
|
</xsl:when>
|
9498
9616
|
<xsl:otherwise>
|
9499
|
-
<xsl:value-of select="generate-id()"/>
|
9617
|
+
<xsl:value-of select="concat($prefix, generate-id())"/>
|
9500
9618
|
</xsl:otherwise>
|
9501
9619
|
</xsl:choose>
|
9502
9620
|
</xsl:attribute>
|
@@ -1,10 +1,5 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
2
|
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
3
|
-
<include href="biblio.rng">
|
4
|
-
<start>
|
5
|
-
<ref name="document"/>
|
6
|
-
</start>
|
7
|
-
</include>
|
8
3
|
<define name="document">
|
9
4
|
<element name="document">
|
10
5
|
<optional>
|
@@ -1125,26 +1120,4 @@
|
|
1125
1120
|
</zeroOrMore>
|
1126
1121
|
</element>
|
1127
1122
|
</define>
|
1128
|
-
<define name="ext">
|
1129
|
-
<element name="ext">
|
1130
|
-
<ref name="BibDataExtensionType"/>
|
1131
|
-
</element>
|
1132
|
-
</define>
|
1133
|
-
<define name="BibDataExtensionType">
|
1134
|
-
<ref name="doctype"/>
|
1135
|
-
</define>
|
1136
|
-
<define name="doctype">
|
1137
|
-
<element name="doctype">
|
1138
|
-
<ref name="DocumentType"/>
|
1139
|
-
</element>
|
1140
|
-
</define>
|
1141
|
-
<define name="DocumentType">
|
1142
|
-
<value>document</value>
|
1143
|
-
</define>
|
1144
|
-
<define name="BibData">
|
1145
|
-
<ref name="BibliographicItem"/>
|
1146
|
-
<optional>
|
1147
|
-
<ref name="ext"/>
|
1148
|
-
</optional>
|
1149
|
-
</define>
|
1150
1123
|
</grammar>
|
@@ -0,0 +1,164 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<grammar xmlns="http://relaxng.org/ns/structure/1.0">
|
3
|
+
<!--
|
4
|
+
Add-ons to biblio.rnc for standoc model: defines the extension point BibDataExtensionType
|
5
|
+
of relaton
|
6
|
+
|
7
|
+
Specialisations as for biblio.rnc. Extension point can be redefined completely for a flavour of standoc
|
8
|
+
(SDO); but other elements in Bibdata can only be extended (more specialised vocabularies for Bibdata)
|
9
|
+
-->
|
10
|
+
<include href="biblio.rng">
|
11
|
+
<define name="BibData">
|
12
|
+
<ref name="BibliographicItem"/>
|
13
|
+
<optional>
|
14
|
+
<ref name="ext"/>
|
15
|
+
</optional>
|
16
|
+
</define>
|
17
|
+
</include>
|
18
|
+
<define name="ext">
|
19
|
+
<element name="ext">
|
20
|
+
<ref name="BibDataExtensionType"/>
|
21
|
+
</element>
|
22
|
+
</define>
|
23
|
+
<define name="BibDataExtensionType">
|
24
|
+
<optional>
|
25
|
+
<attribute name="schema-version"/>
|
26
|
+
</optional>
|
27
|
+
<ref name="doctype"/>
|
28
|
+
<optional>
|
29
|
+
<ref name="docsubtype"/>
|
30
|
+
</optional>
|
31
|
+
<optional>
|
32
|
+
<ref name="editorialgroup"/>
|
33
|
+
</optional>
|
34
|
+
<zeroOrMore>
|
35
|
+
<ref name="ics"/>
|
36
|
+
</zeroOrMore>
|
37
|
+
<zeroOrMore>
|
38
|
+
<ref name="structuredidentifier"/>
|
39
|
+
</zeroOrMore>
|
40
|
+
</define>
|
41
|
+
<define name="doctype">
|
42
|
+
<element name="doctype">
|
43
|
+
<optional>
|
44
|
+
<attribute name="abbreviation"/>
|
45
|
+
</optional>
|
46
|
+
<ref name="DocumentType"/>
|
47
|
+
</element>
|
48
|
+
</define>
|
49
|
+
<define name="DocumentType">
|
50
|
+
<value>document</value>
|
51
|
+
</define>
|
52
|
+
<define name="docsubtype">
|
53
|
+
<element name="subdoctype">
|
54
|
+
<ref name="DocumentSubtype"/>
|
55
|
+
</element>
|
56
|
+
</define>
|
57
|
+
<define name="DocumentSubtype">
|
58
|
+
<text/>
|
59
|
+
</define>
|
60
|
+
<define name="editorialgroup">
|
61
|
+
<element name="editorialgroup">
|
62
|
+
<oneOrMore>
|
63
|
+
<ref name="technical-committee"/>
|
64
|
+
</oneOrMore>
|
65
|
+
</element>
|
66
|
+
</define>
|
67
|
+
<define name="technical-committee">
|
68
|
+
<element name="technical-committee">
|
69
|
+
<ref name="IsoWorkgroup"/>
|
70
|
+
</element>
|
71
|
+
</define>
|
72
|
+
<define name="IsoWorkgroup">
|
73
|
+
<optional>
|
74
|
+
<attribute name="number"/>
|
75
|
+
</optional>
|
76
|
+
<optional>
|
77
|
+
<attribute name="type"/>
|
78
|
+
</optional>
|
79
|
+
<optional>
|
80
|
+
<attribute name="identifier"/>
|
81
|
+
</optional>
|
82
|
+
<optional>
|
83
|
+
<attribute name="prefix"/>
|
84
|
+
</optional>
|
85
|
+
<text/>
|
86
|
+
</define>
|
87
|
+
<define name="ics">
|
88
|
+
<element name="ics">
|
89
|
+
<element name="code">
|
90
|
+
<text/>
|
91
|
+
</element>
|
92
|
+
<optional>
|
93
|
+
<element name="text">
|
94
|
+
<text/>
|
95
|
+
</element>
|
96
|
+
</optional>
|
97
|
+
</element>
|
98
|
+
</define>
|
99
|
+
<define name="structuredidentifier">
|
100
|
+
<element name="structuredidentifier">
|
101
|
+
<optional>
|
102
|
+
<attribute name="type"/>
|
103
|
+
</optional>
|
104
|
+
<oneOrMore>
|
105
|
+
<element name="agency">
|
106
|
+
<text/>
|
107
|
+
</element>
|
108
|
+
</oneOrMore>
|
109
|
+
<optional>
|
110
|
+
<element name="class">
|
111
|
+
<text/>
|
112
|
+
</element>
|
113
|
+
</optional>
|
114
|
+
<element name="docnumber">
|
115
|
+
<text/>
|
116
|
+
</element>
|
117
|
+
<optional>
|
118
|
+
<element name="partnumber">
|
119
|
+
<text/>
|
120
|
+
</element>
|
121
|
+
</optional>
|
122
|
+
<optional>
|
123
|
+
<element name="edition">
|
124
|
+
<text/>
|
125
|
+
</element>
|
126
|
+
</optional>
|
127
|
+
<optional>
|
128
|
+
<element name="version">
|
129
|
+
<text/>
|
130
|
+
</element>
|
131
|
+
</optional>
|
132
|
+
<optional>
|
133
|
+
<element name="supplementtype">
|
134
|
+
<text/>
|
135
|
+
</element>
|
136
|
+
</optional>
|
137
|
+
<optional>
|
138
|
+
<element name="supplementnumber">
|
139
|
+
<text/>
|
140
|
+
</element>
|
141
|
+
</optional>
|
142
|
+
<optional>
|
143
|
+
<element name="amendment">
|
144
|
+
<text/>
|
145
|
+
</element>
|
146
|
+
</optional>
|
147
|
+
<optional>
|
148
|
+
<element name="corrigendum">
|
149
|
+
<text/>
|
150
|
+
</element>
|
151
|
+
</optional>
|
152
|
+
<optional>
|
153
|
+
<element name="language">
|
154
|
+
<text/>
|
155
|
+
</element>
|
156
|
+
</optional>
|
157
|
+
<optional>
|
158
|
+
<element name="year">
|
159
|
+
<text/>
|
160
|
+
</element>
|
161
|
+
</optional>
|
162
|
+
</element>
|
163
|
+
</define>
|
164
|
+
</grammar>
|
data/lib/metanorma/un/biblio.rng
CHANGED
@@ -33,9 +33,10 @@
|
|
33
33
|
<param name="pattern">([\+\-]?\d{4})((-?)((0[1-9]|1[0-2])((-?)([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6]))))?</param>
|
34
34
|
</data>
|
35
35
|
</define>
|
36
|
-
|
37
|
-
|
38
|
-
|
36
|
+
<!-- start = bibitem -->
|
37
|
+
<define name="BibData">
|
38
|
+
<ref name="BibliographicItem"/>
|
39
|
+
</define>
|
39
40
|
<define name="status">
|
40
41
|
<element name="status">
|
41
42
|
<ref name="stage"/>
|
@@ -170,27 +171,30 @@
|
|
170
171
|
</define>
|
171
172
|
<define name="contributor">
|
172
173
|
<element name="contributor">
|
173
|
-
<
|
174
|
+
<oneOrMore>
|
174
175
|
<ref name="role"/>
|
175
|
-
</
|
176
|
+
</oneOrMore>
|
176
177
|
<ref name="ContributorInfo"/>
|
177
178
|
</element>
|
178
179
|
</define>
|
179
180
|
<define name="role">
|
180
181
|
<element name="role">
|
181
|
-
<
|
182
|
-
<
|
183
|
-
<
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
</
|
192
|
-
|
193
|
-
|
182
|
+
<attribute name="type">
|
183
|
+
<choice>
|
184
|
+
<value>author</value>
|
185
|
+
<value>performer</value>
|
186
|
+
<value>publisher</value>
|
187
|
+
<value>editor</value>
|
188
|
+
<value>adapter</value>
|
189
|
+
<value>translator</value>
|
190
|
+
<value>distributor</value>
|
191
|
+
<value>realizer</value>
|
192
|
+
<value>owner</value>
|
193
|
+
<value>authorizer</value>
|
194
|
+
<value>enabler</value>
|
195
|
+
<value>subject</value>
|
196
|
+
</choice>
|
197
|
+
</attribute>
|
194
198
|
<zeroOrMore>
|
195
199
|
<ref name="roledescription"/>
|
196
200
|
</zeroOrMore>
|
@@ -512,6 +516,17 @@
|
|
512
516
|
</define>
|
513
517
|
<define name="localityStack">
|
514
518
|
<element name="localityStack">
|
519
|
+
<optional>
|
520
|
+
<attribute name="connective">
|
521
|
+
<choice>
|
522
|
+
<value>and</value>
|
523
|
+
<value>or</value>
|
524
|
+
<value>from</value>
|
525
|
+
<value>to</value>
|
526
|
+
<value/>
|
527
|
+
</choice>
|
528
|
+
</attribute>
|
529
|
+
</optional>
|
515
530
|
<zeroOrMore>
|
516
531
|
<ref name="locality"/>
|
517
532
|
</zeroOrMore>
|
@@ -524,6 +539,17 @@
|
|
524
539
|
</define>
|
525
540
|
<define name="sourceLocalityStack">
|
526
541
|
<element name="sourceLocalityStack">
|
542
|
+
<optional>
|
543
|
+
<attribute name="connective">
|
544
|
+
<choice>
|
545
|
+
<value>and</value>
|
546
|
+
<value>or</value>
|
547
|
+
<value>from</value>
|
548
|
+
<value>to</value>
|
549
|
+
<value/>
|
550
|
+
</choice>
|
551
|
+
</attribute>
|
552
|
+
</optional>
|
527
553
|
<zeroOrMore>
|
528
554
|
<ref name="sourceLocality"/>
|
529
555
|
</zeroOrMore>
|
@@ -626,6 +652,9 @@
|
|
626
652
|
<ref name="BibItemType"/>
|
627
653
|
</attribute>
|
628
654
|
</optional>
|
655
|
+
<optional>
|
656
|
+
<attribute name="schema-version"/>
|
657
|
+
</optional>
|
629
658
|
<optional>
|
630
659
|
<ref name="fetched"/>
|
631
660
|
</optional>
|
@@ -720,6 +749,9 @@
|
|
720
749
|
<ref name="BibItemType"/>
|
721
750
|
</attribute>
|
722
751
|
</optional>
|
752
|
+
<optional>
|
753
|
+
<attribute name="schema-version"/>
|
754
|
+
</optional>
|
723
755
|
<optional>
|
724
756
|
<ref name="fetched"/>
|
725
757
|
</optional>
|