metanorma-itu 2.1.9 → 2.1.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -395,10 +395,18 @@
395
395
  </xsl:variable>
396
396
  <xsl:value-of select="java:toUpperCase(java:java.lang.String.new($tsb_full))"/>
397
397
  </fo:block>
398
- <fo:block-container height="20mm" display-align="center">
398
+ <fo:block-container height="20mm" display-align="center" width="90%">
399
399
  <fo:block font-weight="bold">
400
400
  <!-- complements -->
401
401
  <!-- To do: Example: COMPLEMENT TO ITU-T RECOMMENDATIONS F.69 (06/1994) AND F.68 (11/1988) -->
402
+ <fo:inline>COMPLEMENT TO ITU-T RECOMMENDATIONS </fo:inline>
403
+ <xsl:for-each select="/*/itu:bibdata/itu:relation[@type = 'complements']">
404
+ <xsl:value-of select="translate(itu:bibitem/itu:docidentifier, ' ', ' ')"/>
405
+ <xsl:choose>
406
+ <xsl:when test="count(following-sibling::itu:relation[@type = 'complements']) = 1"> AND </xsl:when>
407
+ <xsl:when test="following-sibling::itu:relation[@type = 'complements']">, </xsl:when>
408
+ </xsl:choose>
409
+ </xsl:for-each>
402
410
  </fo:block>
403
411
  </fo:block-container>
404
412
  <fo:block-container>
@@ -678,7 +686,7 @@
678
686
  <fo:table-cell>
679
687
  <fo:block> </fo:block>
680
688
  </fo:table-cell>
681
- <fo:table-cell font-size="16pt" number-columns-spanned="3" border-bottom="0.5mm solid black" padding-right="2mm" display-align="after">
689
+ <fo:table-cell font-size="16pt" number-columns-spanned="3" border-bottom="0.5mm solid black" display-align="after">
682
690
  <fo:block-container>
683
691
  <xsl:call-template name="setWritingMode"/>
684
692
  <fo:block padding-bottom="7mm">
@@ -722,8 +730,18 @@
722
730
  </xsl:if>
723
731
  </fo:block>
724
732
  </xsl:if>
733
+ <xsl:if test="$doctype = 'focus-group'">
734
+ <xsl:attribute name="padding-bottom">0mm</xsl:attribute>
735
+ <xsl:attribute name="border-bottom">1pt solid black</xsl:attribute>
736
+ </xsl:if>
725
737
  <fo:block text-transform="uppercase">
726
- <xsl:variable name="series_title" select="normalize-space(/itu:itu-standard/itu:bibdata/itu:series[@type = 'main']/itu:title[@type = 'full'])"/>
738
+ <xsl:variable name="series_title_full" select="normalize-space(/itu:itu-standard/itu:bibdata/itu:series[@type = 'main']/itu:title[@type = 'full'])"/>
739
+ <xsl:variable name="series_title">
740
+ <xsl:value-of select="$series_title_full"/>
741
+ <xsl:if test="$series_title_full = ''">
742
+ <xsl:value-of select="normalize-space(/itu:itu-standard/itu:bibdata/itu:series[@type = 'main']/itu:title[@type != 'full' and @type != 'abbrev'])"/>
743
+ </xsl:if>
744
+ </xsl:variable>
727
745
  <xsl:if test="$series_title != ''">
728
746
  <xsl:variable name="title">
729
747
  <xsl:if test="$doctype != 'resolution'">
@@ -1296,6 +1314,7 @@
1296
1314
  </fo:block>
1297
1315
  <xsl:apply-templates/>
1298
1316
  </xsl:template>
1317
+ <xsl:template match="itu:itu-standard/itu:preface/itu:abstract[@id = '_summary']/itu:title" priority="4"/>
1299
1318
 
1300
1319
  <xsl:template match="itu:preface/itu:clause" priority="3">
1301
1320
  <xsl:if test="$doctype != 'service-publication'">
@@ -3053,8 +3072,6 @@
3053
3072
  <xsl:attribute-set name="bibitem-non-normative-style">
3054
3073
 
3055
3074
  <xsl:attribute name="margin-top">6pt</xsl:attribute>
3056
- <xsl:attribute name="margin-left">14mm</xsl:attribute>
3057
- <xsl:attribute name="text-indent">-14mm</xsl:attribute>
3058
3075
 
3059
3076
  </xsl:attribute-set> <!-- bibitem-non-normative-style -->
3060
3077
 
@@ -5548,8 +5565,17 @@
5548
5565
  </fo:inline>
5549
5566
  </xsl:template> <!-- tt -->
5550
5567
 
5568
+ <xsl:variable name="regex_url_start">^(http://|https://|www\.)?(.*)</xsl:variable>
5551
5569
  <xsl:template match="*[local-name()='tt']/text()" priority="2">
5552
- <xsl:call-template name="add_spaces_to_sourcecode"/>
5570
+ <xsl:choose>
5571
+ <xsl:when test="java:replaceAll(java:java.lang.String.new(.), '$2', '') != ''">
5572
+ <!-- url -->
5573
+ <xsl:call-template name="add-zero-spaces-link-java"/>
5574
+ </xsl:when>
5575
+ <xsl:otherwise>
5576
+ <xsl:call-template name="add_spaces_to_sourcecode"/>
5577
+ </xsl:otherwise>
5578
+ </xsl:choose>
5553
5579
  </xsl:template>
5554
5580
 
5555
5581
  <xsl:template match="*[local-name()='underline']">
@@ -5905,8 +5931,11 @@
5905
5931
 
5906
5932
  <xsl:template name="add-zero-spaces-link-java">
5907
5933
  <xsl:param name="text" select="."/>
5934
+
5935
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$1')"/> <!-- http://. https:// or www. -->
5936
+ <xsl:variable name="url_continue" select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$2')"/>
5908
5937
  <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
5909
- <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| |,)','$1​')"/>
5938
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($url_continue),'(-|\.|:|=|_|—| |,|/)','$1​')"/>
5910
5939
  </xsl:template>
5911
5940
 
5912
5941
  <!-- add zero space after dash character (for table's entries) -->
@@ -8865,7 +8894,7 @@
8865
8894
  <!-- ====== -->
8866
8895
  <!-- eref -->
8867
8896
  <!-- ====== -->
8868
- <xsl:template match="*[local-name() = 'eref']">
8897
+ <xsl:template match="*[local-name() = 'eref']" name="eref">
8869
8898
  <xsl:variable name="current_bibitemid" select="@bibitemid"/>
8870
8899
  <!-- <xsl:variable name="external-destination" select="normalize-space(key('bibitems', $current_bibitemid)/*[local-name() = 'uri'][@type = 'citation'])"/> -->
8871
8900
  <xsl:variable name="external-destination" select="normalize-space($bibitems/*[local-name() ='bibitem'][@id = $current_bibitemid]/*[local-name() = 'uri'][@type = 'citation'])"/>
@@ -9711,28 +9740,42 @@
9711
9740
  <xsl:attribute name="text-indent">0mm</xsl:attribute>
9712
9741
  </xsl:if>
9713
9742
 
9743
+ <xsl:variable name="docidentifier_metanorma" select="normalize-space(itu:docidentifier[@type = 'metanorma'])"/>
9744
+ <xsl:variable name="docidentifier_metanorma_ordinal" select="normalize-space(itu:docidentifier[@type = 'metanorma-ordinal'])"/>
9745
+
9714
9746
  <xsl:variable name="bibitem_label">
9715
- <xsl:value-of select="itu:docidentifier[@type = 'metanorma']"/>
9716
- <xsl:if test="not(itu:docidentifier[@type = 'metanorma'])">
9747
+ <xsl:value-of select="$docidentifier_metanorma"/>
9748
+ <xsl:if test="$docidentifier_metanorma = ''">
9717
9749
  <fo:inline padding-right="5mm">
9718
- <xsl:text>[</xsl:text>
9719
- <xsl:value-of select="itu:docidentifier[not(@type = 'metanorma-ordinal')]"/>
9720
- <xsl:text>] </xsl:text>
9750
+ <xsl:variable name="docidentifier" select="normalize-space(itu:docidentifier[not(@type = 'metanorma-ordinal')])"/>
9751
+ <xsl:choose>
9752
+ <xsl:when test="$docidentifier != ''">
9753
+ <xsl:text>[</xsl:text>
9754
+ <xsl:value-of select="$docidentifier"/>
9755
+ <xsl:text>] </xsl:text>
9756
+ </xsl:when>
9757
+ <xsl:otherwise>
9758
+ <xsl:value-of select="$docidentifier_metanorma_ordinal"/>
9759
+ </xsl:otherwise>
9760
+ </xsl:choose>
9721
9761
  </fo:inline>
9722
9762
  </xsl:if>
9723
9763
  </xsl:variable>
9724
9764
 
9725
9765
  <xsl:variable name="bibitem_body">
9726
- <xsl:text> </xsl:text>
9727
- <xsl:choose>
9728
- <xsl:when test="itu:docidentifier[@type = 'metanorma']">
9729
- <xsl:value-of select="itu:docidentifier[not(@type) or not(@type = 'metanorma' or @type = 'metanorma-ordinal')]"/>
9730
- </xsl:when>
9731
- <xsl:otherwise>
9732
- <xsl:value-of select="itu:docidentifier[not(@type = 'metanorma-ordinal')]"/>
9733
- </xsl:otherwise>
9734
- </xsl:choose>
9735
- <xsl:if test="itu:formattedref and not(itu:docidentifier[@type = 'metanorma'])">, </xsl:if>
9766
+ <xsl:variable name="docidentifier">
9767
+ <xsl:text> </xsl:text>
9768
+ <xsl:choose>
9769
+ <xsl:when test="$docidentifier_metanorma != ''">
9770
+ <xsl:value-of select="itu:docidentifier[not(@type) or not(@type = 'metanorma' or @type = 'metanorma-ordinal')]"/>
9771
+ </xsl:when>
9772
+ <xsl:otherwise>
9773
+ <xsl:value-of select="itu:docidentifier[not(@type = 'metanorma-ordinal')]"/>
9774
+ </xsl:otherwise>
9775
+ </xsl:choose>
9776
+ </xsl:variable>
9777
+ <xsl:value-of select="$docidentifier"/>
9778
+ <xsl:if test="normalize-space($docidentifier) != ''">, </xsl:if>
9736
9779
  <xsl:apply-templates select="itu:formattedref"/>
9737
9780
  </xsl:variable>
9738
9781
 
@@ -9749,9 +9792,27 @@
9749
9792
  </fo:table-body>
9750
9793
  </fo:table>
9751
9794
  </xsl:when> <!-- $doctype = 'implementers-guide' -->
9752
- <xsl:otherwise>
9795
+ <xsl:when test="$bibitem_label != $docidentifier_metanorma_ordinal">
9796
+ <xsl:attribute name="margin-left">14mm</xsl:attribute>
9797
+ <xsl:attribute name="text-indent">-14mm</xsl:attribute>
9753
9798
  <xsl:copy-of select="$bibitem_label"/>
9754
9799
  <xsl:copy-of select="$bibitem_body"/>
9800
+ </xsl:when>
9801
+ <xsl:otherwise>
9802
+ <fo:list-block provisional-distance-between-starts="14mm">
9803
+ <fo:list-item>
9804
+ <fo:list-item-label end-indent="label-end()">
9805
+ <fo:block>
9806
+ <xsl:copy-of select="$bibitem_label"/>
9807
+ </fo:block>
9808
+ </fo:list-item-label>
9809
+ <fo:list-item-body start-indent="body-start()">
9810
+ <fo:block>
9811
+ <xsl:copy-of select="$bibitem_body"/>
9812
+ </fo:block>
9813
+ </fo:list-item-body>
9814
+ </fo:list-item>
9815
+ </fo:list-block>
9755
9816
  </xsl:otherwise>
9756
9817
  </xsl:choose>
9757
9818
 
@@ -10339,7 +10400,7 @@
10339
10400
 
10340
10401
  <xsl:variable name="element_name_keep-together_within-line">keep-together_within-line</xsl:variable>
10341
10402
 
10342
- <xsl:template match="text()[not(ancestor::*[local-name() = 'bibdata'] or ancestor::*[local-name() = 'sourcecode'] or ancestor::*[local-name() = 'math'])]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
10403
+ <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">
10343
10404
 
10344
10405
  <!-- enclose standard's number into tag 'keep-together_within-line' -->
10345
10406
  <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
@@ -11,8 +11,8 @@ module IsoDoc
11
11
  super
12
12
  end
13
13
 
14
- def prefix_container(container, linkend, _target)
15
- l10n("#{linkend} #{@i18n.get['in']} #{@xrefs.anchor(container, :xref)}")
14
+ def prefix_container(container, linkend, node, _target)
15
+ l10n("#{linkend} #{@i18n.get['in']} #{anchor_xref(node, container)}")
16
16
  end
17
17
 
18
18
  def eref(docxml)
@@ -175,13 +175,12 @@ module IsoDoc
175
175
  end
176
176
 
177
177
  def annex1(elem)
178
- return super unless elem&.at(ns("//bibdata/ext/doctype"))&.text ==
178
+ return super unless elem.at(ns("//bibdata/ext/doctype"))&.text ==
179
179
  "resolution"
180
180
 
181
181
  lbl = @xrefs.anchor(elem["id"], :label)
182
- subhead = (@i18n.l10n("(#{@i18n.get['to']} ") +
183
- elem.at(ns("//bibdata/title[@type = 'resolution']"))
184
- .children.to_xml + @i18n.l10n(")"))
182
+ res = elem.at(ns("//bibdata/title[@type = 'resolution']"))
183
+ subhead = @i18n.l10n("(#{@i18n.get['to']} #{res.children.to_xml})")
185
184
  elem.elements.first.previous =
186
185
  "<p class='supertitle'>#{lbl}<br/>#{subhead}</p>"
187
186
  t = elem.at(ns("./title")) and
@@ -97,21 +97,24 @@ module IsoDoc
97
97
  end
98
98
  end
99
99
 
100
- def sequential_figure_body(subfignum, counter, block)
100
+ def sequential_figure_body(subfignum, counter, block, klass)
101
101
  label = counter.print
102
102
  label &&= label +
103
103
  (subfignum.zero? ? "" : "#{hierfigsep}#{(subfignum + 96).chr}")
104
104
  @anchors[block["id"]] = anchor_struct(
105
- label, nil, @labels["figure"], "figure", block["unnumbered"]
105
+ label, nil, @labels[klass] || klass.capitalize, klass,
106
+ block["unnumbered"]
106
107
  )
107
108
  end
108
109
 
109
- def hierarchical_figure_body(num, subfignum, counter, block)
110
+ def hierarchical_figure_body(num, subfignum, counter, block, klass)
110
111
  label = "#{num}#{hiersep}#{counter.print}" +
111
112
  (subfignum.zero? ? "" : "#{hierfigsep}#{(subfignum + 96).chr}")
112
113
 
113
- @anchors[block["id"]] = anchor_struct(label, nil, @labels["figure"],
114
- "figure", block["unnumbered"])
114
+ @anchors[block["id"]] = anchor_struct(
115
+ label, nil, @labels[klass] || klass.capitalize,
116
+ klass, block["unnumbered"]
117
+ )
115
118
  end
116
119
 
117
120
  def sequential_formula_names(clause)
@@ -16,12 +16,13 @@ module IsoDoc
16
16
  end
17
17
  end
18
18
 
19
- def annex_name_anchors(clause, num)
19
+ def annex_name_anchors(clause, num, level)
20
20
  lbl = annextype(clause)
21
- { label: annex_name_lbl(clause, num),
22
- elem: lbl,
23
- type: "clause", value: num.to_s, level: 1,
24
- xref: l10n("#{lbl} #{num}") }
21
+ @anchors[clause["id"]] =
22
+ { label: annex_name_lbl(clause, num),
23
+ elem: lbl,
24
+ type: "clause", value: num.to_s, level: level,
25
+ xref: l10n("#{lbl} #{num}") }
25
26
  end
26
27
 
27
28
  def annex_names1(clause, num, level)
@@ -38,7 +39,7 @@ module IsoDoc
38
39
  end
39
40
 
40
41
  def clause_names(docxml, sect_num)
41
- docxml.xpath(ns("//sections/clause[not(@unnumbered = 'true')]"\
42
+ docxml.xpath(ns("//sections/clause[not(@unnumbered = 'true')]" \
42
43
  "[not(@type = 'scope')][not(descendant::terms)]"))
43
44
  .each do |c|
44
45
  section_names(c, sect_num, 1)
@@ -65,10 +66,11 @@ module IsoDoc
65
66
  end
66
67
 
67
68
  def section_names1(clause, num, level)
69
+ x = @doctype == "resolution" ? num : l10n("#{@labels['clause']} #{num}")
68
70
  @anchors[clause["id"]] =
69
71
  { label: num, level: level,
70
72
  elem: @doctype == "resolution" ? "" : @labels["clause"],
71
- xref: @doctype == "resolution" ? num : l10n("#{@labels['clause']} #{num}") }
73
+ xref: x }
72
74
  i = Counter.new
73
75
  clause.xpath(ns(SUBCLAUSES)).each do |c|
74
76
  i.increment(c)
@@ -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>
@@ -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
- <start>
37
- <ref name="bibitem"/>
38
- </start>
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,25 @@
170
171
  </define>
171
172
  <define name="contributor">
172
173
  <element name="contributor">
173
- <zeroOrMore>
174
+ <oneOrMore>
174
175
  <ref name="role"/>
175
- </zeroOrMore>
176
+ </oneOrMore>
176
177
  <ref name="ContributorInfo"/>
177
178
  </element>
178
179
  </define>
179
180
  <define name="role">
180
181
  <element name="role">
181
- <optional>
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
- </choice>
192
- </attribute>
193
- </optional>
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
+ </choice>
192
+ </attribute>
194
193
  <zeroOrMore>
195
194
  <ref name="roledescription"/>
196
195
  </zeroOrMore>
@@ -512,6 +511,17 @@
512
511
  </define>
513
512
  <define name="localityStack">
514
513
  <element name="localityStack">
514
+ <optional>
515
+ <attribute name="connective">
516
+ <choice>
517
+ <value>and</value>
518
+ <value>or</value>
519
+ <value>from</value>
520
+ <value>to</value>
521
+ <value/>
522
+ </choice>
523
+ </attribute>
524
+ </optional>
515
525
  <zeroOrMore>
516
526
  <ref name="locality"/>
517
527
  </zeroOrMore>
@@ -524,6 +534,17 @@
524
534
  </define>
525
535
  <define name="sourceLocalityStack">
526
536
  <element name="sourceLocalityStack">
537
+ <optional>
538
+ <attribute name="connective">
539
+ <choice>
540
+ <value>and</value>
541
+ <value>or</value>
542
+ <value>from</value>
543
+ <value>to</value>
544
+ <value/>
545
+ </choice>
546
+ </attribute>
547
+ </optional>
527
548
  <zeroOrMore>
528
549
  <ref name="sourceLocality"/>
529
550
  </zeroOrMore>
@@ -626,6 +647,9 @@
626
647
  <ref name="BibItemType"/>
627
648
  </attribute>
628
649
  </optional>
650
+ <optional>
651
+ <attribute name="schema-version"/>
652
+ </optional>
629
653
  <optional>
630
654
  <ref name="fetched"/>
631
655
  </optional>
@@ -720,6 +744,9 @@
720
744
  <ref name="BibItemType"/>
721
745
  </attribute>
722
746
  </optional>
747
+ <optional>
748
+ <attribute name="schema-version"/>
749
+ </optional>
723
750
  <optional>
724
751
  <ref name="fetched"/>
725
752
  </optional>