relaton-bib 1.13.15 → 1.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.adoc +95 -115
- data/grammars/basicdoc.rng +3 -27
- data/grammars/biblio-compile.rng +11 -0
- data/grammars/biblio-standoc.rng +164 -0
- data/grammars/biblio.rng +75 -19
- data/grammars/versions.json +31 -0
- data/lib/relaton_bib/bibliographic_item.rb +31 -9
- data/lib/relaton_bib/document_relation.rb +1 -1
- data/lib/relaton_bib/hit_collection.rb +31 -6
- data/lib/relaton_bib/version.rb +1 -1
- metadata +9 -8
- data/grammars/isodoc.rng +0 -2807
- data/grammars/reqt.rng +0 -223
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: fbae7bc96bcecd3287ff80420521dc68077b8379e0a901bfff6fc68eeb401abb
         | 
| 4 | 
            +
              data.tar.gz: ad35e800b40a3ad78d645bba084f4d0cc27ab492b15c2438282aeff2401b7a08
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: c28d3f0f63f6dd545fd74f54872425031137c2b40ae10f0e10512ff7651bba9321ff8602785e1a52941c072e26f61917d14aae99ca4a141adc678da522655516
         | 
| 7 | 
            +
              data.tar.gz: a4c21ab249c4993278cef4d3b63f7179fc1b5902752642cdcacb308f987efe67c558cdad97466c1955ceb8bbe016caac1301d3efd9d230c773b51f2a0d75a69d
         | 
    
        data/README.adoc
    CHANGED
    
    | @@ -31,8 +31,12 @@ Or install it yourself as: | |
| 31 31 |  | 
| 32 32 | 
             
            [source,ruby]
         | 
| 33 33 | 
             
            ----
         | 
| 34 | 
            +
            require 'relaton_bib'
         | 
| 35 | 
            +
            => true
         | 
| 36 | 
            +
             | 
| 34 37 | 
             
            hash = YAML.load_file "spec/examples/bib_item.yml"
         | 
| 35 38 | 
             
            => {"id"=>"ISOTC211",
         | 
| 39 | 
            +
            "fetched"=>"2022-05-02",
         | 
| 36 40 | 
             
             "title"=>["Geographic information", {"content"=>"Information géographique", "language"=>"fr", "script"=>"Latn"}],
         | 
| 37 41 | 
             
             ...
         | 
| 38 42 |  | 
| @@ -48,17 +52,25 @@ item = RelatonBib::BibliographicItem.from_hash(hash) | |
| 48 52 | 
             
            [source,ruby]
         | 
| 49 53 | 
             
            ----
         | 
| 50 54 | 
             
            item.title
         | 
| 51 | 
            -
            =>  | 
| 52 | 
            -
             | 
| 53 | 
            -
               | 
| 54 | 
            -
             | 
| 55 | 
            -
             | 
| 56 | 
            -
             | 
| 55 | 
            +
            => #<RelatonBib::TypedTitleStringCollection:0x00007fea821ec6b0
         | 
| 56 | 
            +
             @array=
         | 
| 57 | 
            +
              [#<RelatonBib::TypedTitleString:0x00007fea821ecb60
         | 
| 58 | 
            +
                @title=#<RelatonBib::FormattedString:0x00007fea821eca70 @content="Geographic information", @format="text/plain", @language=nil, @script=nil>,
         | 
| 59 | 
            +
                @type="title-main">,
         | 
| 60 | 
            +
               #<RelatonBib::TypedTitleString:0x00007fea821ec8b8
         | 
| 61 | 
            +
                @title=#<RelatonBib::FormattedString:0x00007fea821ec818 @content="Geographic information", @format="text/plain", @language=nil, @script=nil>,
         | 
| 62 | 
            +
                @type="main">,
         | 
| 63 | 
            +
               #<RelatonBib::TypedTitleString:0x00007fea821ec610
         | 
| 64 | 
            +
                @title=
         | 
| 65 | 
            +
                 #<RelatonBib::FormattedString:0x00007fea821ec570 @content="Information géographique", @format="text/plain", @language=["fr"], @script=["Latn"]>,
         | 
| 66 | 
            +
                @type=nil>]>
         | 
| 57 67 |  | 
| 58 68 | 
             
            item.title lang: "fr"
         | 
| 59 | 
            -
            =>  | 
| 60 | 
            -
             | 
| 61 | 
            -
               | 
| 69 | 
            +
            => #<RelatonBib::TypedTitleStringCollection:0x00007fea8222d908
         | 
| 70 | 
            +
             @array=
         | 
| 71 | 
            +
              [#<RelatonBib::TypedTitleString:0x00007fea821ec610
         | 
| 72 | 
            +
                @title=#<RelatonBib::FormattedString:0x00007fea821ec570 @content="Information géographique", @format="text/plain", @language=["fr"], @script=["Latn"]>,
         | 
| 73 | 
            +
                @type=nil>]>
         | 
| 62 74 | 
             
            ----
         | 
| 63 75 |  | 
| 64 76 | 
             
            === BibliographicItem Formatted Strings
         | 
| @@ -66,20 +78,19 @@ item.title lang: "fr" | |
| 66 78 | 
             
            [source,ruby]
         | 
| 67 79 | 
             
            ----
         | 
| 68 80 | 
             
            item.abstract
         | 
| 69 | 
            -
            => #<RelatonBib:: | 
| 70 | 
            -
             | 
| 71 | 
            -
               | 
| 72 | 
            -
             | 
| 73 | 
            -
             | 
| 74 | 
            -
             | 
| 75 | 
            -
             | 
| 76 | 
            -
             | 
| 77 | 
            -
             | 
| 78 | 
            -
             | 
| 79 | 
            -
                @type=nil>]>
         | 
| 81 | 
            +
            => [#<RelatonBib::FormattedString:0x00007fea82236828
         | 
| 82 | 
            +
              @content="<p>ISO 19115-1:2014 defines the schema required for ...</p>",
         | 
| 83 | 
            +
              @format="text/html",
         | 
| 84 | 
            +
              @language=["en"],
         | 
| 85 | 
            +
              @script=["Latn"]>,
         | 
| 86 | 
            +
             #<RelatonBib::FormattedString:0x00007fea82236670
         | 
| 87 | 
            +
              @content="L'ISO 19115-1:2014 définit le schéma requis pour ...",
         | 
| 88 | 
            +
              @format="text/plain",
         | 
| 89 | 
            +
              @language=["fr"],
         | 
| 90 | 
            +
              @script=["Latn"]>]
         | 
| 80 91 |  | 
| 81 92 | 
             
            item.abstract(lang: "en").to_s
         | 
| 82 | 
            -
            => "ISO 19115-1:2014 defines the schema required for  | 
| 93 | 
            +
            => "<p>ISO 19115-1:2014 defines the schema required for ...</p>"
         | 
| 83 94 | 
             
            ----
         | 
| 84 95 |  | 
| 85 96 | 
             
            === BibliographicItem references
         | 
| @@ -87,7 +98,7 @@ item.abstract(lang: "en").to_s | |
| 87 98 | 
             
            [source,ruby]
         | 
| 88 99 | 
             
            ----
         | 
| 89 100 | 
             
            item.shortref item.docidentifier.first
         | 
| 90 | 
            -
            => " | 
| 101 | 
            +
            => "ISOTC211:2014"
         | 
| 91 102 | 
             
            ----
         | 
| 92 103 |  | 
| 93 104 | 
             
            === XML serialization
         | 
| @@ -95,10 +106,11 @@ item.shortref item.docidentifier.first | |
| 95 106 | 
             
            [source,ruby]
         | 
| 96 107 | 
             
            ----
         | 
| 97 108 | 
             
            item.to_xml
         | 
| 98 | 
            -
            => "<bibitem id=" | 
| 99 | 
            -
                  <fetched> | 
| 100 | 
            -
                  <title type="main"  | 
| 101 | 
            -
                  <title  | 
| 109 | 
            +
            => "<bibitem id="ISOTC211" type="standard" schema-version="v1.2.1">
         | 
| 110 | 
            +
                  <fetched>2022-05-02</fetched>
         | 
| 111 | 
            +
                  <title type="title-main" format="text/plain">Geographic information</title>
         | 
| 112 | 
            +
                  <title type="main" format="text/plain">Geographic information</title>
         | 
| 113 | 
            +
                  <title format="text/plain" language="fr" script="Latn">Information géographique</title>
         | 
| 102 114 | 
             
                  ...
         | 
| 103 115 | 
             
                </bibitem>"
         | 
| 104 116 | 
             
            ----
         | 
| @@ -108,10 +120,15 @@ The default root element is `bibitem`. With argument `bibdata: true` the XML wra | |
| 108 120 | 
             
            [source,ruby]
         | 
| 109 121 | 
             
            ----
         | 
| 110 122 | 
             
            item.to_xml bibdata: true
         | 
| 111 | 
            -
            => "<bibdata type="standard">
         | 
| 112 | 
            -
                  <fetched> | 
| 113 | 
            -
                  <title type="main"  | 
| 123 | 
            +
            => "<bibdata type="standard" schema-version="v1.2.1">
         | 
| 124 | 
            +
                  <fetched>2022-05-02</fetched>
         | 
| 125 | 
            +
                  <title type="title-main" format="text/plain">Geographic information</title>
         | 
| 114 126 | 
             
                  ...
         | 
| 127 | 
            +
                    <ext>
         | 
| 128 | 
            +
                      <doctype>document</doctype>
         | 
| 129 | 
            +
                      <subdoctype>subdocument</subdoctype>
         | 
| 130 | 
            +
                      ...
         | 
| 131 | 
            +
                    </ext>
         | 
| 115 132 | 
             
                </bibdata>"
         | 
| 116 133 | 
             
            ----
         | 
| 117 134 |  | 
| @@ -122,9 +139,9 @@ By default date elements are formatted as a year (yyyy). Option `:date_format` a | |
| 122 139 | 
             
            [source,ruby]
         | 
| 123 140 | 
             
            ----
         | 
| 124 141 | 
             
            item.to_xml date_format: :short
         | 
| 125 | 
            -
            => "<bibitem id=" | 
| 126 | 
            -
                  <fetched> | 
| 127 | 
            -
                  <title type="main"  | 
| 142 | 
            +
            => "<bibitem id="ISOTC211" type="standard" schema-version="v1.2.1">
         | 
| 143 | 
            +
                  <fetched>2022-05-02</fetched>
         | 
| 144 | 
            +
                  <title type="title-main" format="text/plain">Geographic information</title>
         | 
| 128 145 | 
             
                  ...
         | 
| 129 146 | 
             
                  <date type="issued">
         | 
| 130 147 | 
             
                    <on>2014-01</on>
         | 
| @@ -139,7 +156,7 @@ item.to_xml date_format: :short | |
| 139 156 | 
             
                </bibitem>"
         | 
| 140 157 |  | 
| 141 158 | 
             
            item.to_xml date_format: :full
         | 
| 142 | 
            -
            => "<bibitem id=" | 
| 159 | 
            +
            => "<bibitem id="ISOTC211" type="standard" schema-version="v1.2.1">
         | 
| 143 160 | 
             
                  ...
         | 
| 144 161 | 
             
                  <date type="issued">
         | 
| 145 162 | 
             
                    <on>2014-01-01</on>
         | 
| @@ -159,11 +176,11 @@ item.to_xml date_format: :full | |
| 159 176 | 
             
            [source,ruby]
         | 
| 160 177 | 
             
            ----
         | 
| 161 178 | 
             
            item.to_xml note: [{ text: "Note", type: "note" }]
         | 
| 162 | 
            -
            =>"<bibitem id=" | 
| 163 | 
            -
             | 
| 164 | 
            -
             | 
| 165 | 
            -
             | 
| 166 | 
            -
            </bibitem>"
         | 
| 179 | 
            +
            => "<bibitem id="ISOTC211" type="standard" schema-version="v1.2.1">
         | 
| 180 | 
            +
                  ...
         | 
| 181 | 
            +
                  <note format="text/plain" type="note">Note</note>
         | 
| 182 | 
            +
                  ...
         | 
| 183 | 
            +
                </bibitem>"
         | 
| 167 184 | 
             
            ----
         | 
| 168 185 |  | 
| 169 186 | 
             
            === Create bibliographic item form YAML
         | 
| @@ -171,7 +188,7 @@ item.to_xml note: [{ text: "Note", type: "note" }] | |
| 171 188 | 
             
            [source,ruby]
         | 
| 172 189 | 
             
            ----
         | 
| 173 190 | 
             
            hash = YAML.load_file 'spec/examples/bib_item.yml'
         | 
| 174 | 
            -
            => {"id"=>" | 
| 191 | 
            +
            => {"id"=>"ISOTC211"
         | 
| 175 192 | 
             
            ...
         | 
| 176 193 |  | 
| 177 194 | 
             
            RelatonBib::BibliographicItem.from_hash hash
         | 
| @@ -196,11 +213,13 @@ RelatonBib::BibXMLParser.parse bibxml | |
| 196 213 | 
             
            [source,ruby]
         | 
| 197 214 | 
             
            ----
         | 
| 198 215 | 
             
            item.to_hash
         | 
| 199 | 
            -
            => {" | 
| 200 | 
            -
             | 
| 201 | 
            -
             | 
| 202 | 
            -
             | 
| 203 | 
            -
             | 
| 216 | 
            +
            => {"schema-version"=>"v1.2.1",
         | 
| 217 | 
            +
                "id"=>"ISOTC211",
         | 
| 218 | 
            +
                "title"=>
         | 
| 219 | 
            +
                  [{"content"=>"Geographic information", "format"=>"text/plain", "type"=>"title-main"},
         | 
| 220 | 
            +
                  {"content"=>"Geographic information", "format"=>"text/plain", "type"=>"main"},
         | 
| 221 | 
            +
                  {"content"=>"Information géographique", "language"=>["fr"], "script"=>["Latn"], "format"=>"text/plain"}],
         | 
| 222 | 
            +
                  ...
         | 
| 204 223 | 
             
            ----
         | 
| 205 224 |  | 
| 206 225 | 
             
            === Create bibliographic item from BibTeX
         | 
| @@ -218,11 +237,11 @@ RelatonBib::BibtexParser.from_bibtex File.read('spec/examples/techreport.bib') | |
| 218 237 | 
             
            [source,ruby]
         | 
| 219 238 | 
             
            ----
         | 
| 220 239 | 
             
            item.to_bibtex
         | 
| 221 | 
            -
            @misc{ISOTC211,
         | 
| 222 | 
            -
             | 
| 223 | 
            -
             | 
| 224 | 
            -
             | 
| 225 | 
            -
             | 
| 240 | 
            +
            => @misc{ISOTC211,
         | 
| 241 | 
            +
                title = {Geographic information},
         | 
| 242 | 
            +
                edition = {Edition 1},
         | 
| 243 | 
            +
                author = {Bierman, A. and Bierman, Arnold and Bierman, Arnold B},
         | 
| 244 | 
            +
                ...
         | 
| 226 245 | 
             
            ----
         | 
| 227 246 |  | 
| 228 247 | 
             
            === Export bibliographic item to Citeproc
         | 
| @@ -231,11 +250,11 @@ item.to_bibtex | |
| 231 250 | 
             
            ----
         | 
| 232 251 | 
             
            item.to_citeproc
         | 
| 233 252 | 
             
            => [{"title"=>"Geographic information",
         | 
| 234 | 
            -
             | 
| 235 | 
            -
             | 
| 236 | 
            -
             | 
| 237 | 
            -
             | 
| 238 | 
            -
             | 
| 253 | 
            +
                 "edition"=>"Edition 1",
         | 
| 254 | 
            +
                 "author"=>[{"family"=>"Bierman", "given"=>"A."}, {"family"=>"Bierman", "given"=>"Arnold"}, {"family"=>"Bierman", "given"=>"Arnold B"}],
         | 
| 255 | 
            +
                 "publisher"=>"Institute of Electrical and Electronics Engineers",
         | 
| 256 | 
            +
                 "publisher-place"=>"bib place",
         | 
| 257 | 
            +
                 ...
         | 
| 239 258 | 
             
            ----
         | 
| 240 259 |  | 
| 241 260 | 
             
            === Exporting bibliographic item to AsciiBib
         | 
| @@ -243,15 +262,15 @@ item.to_citeproc | |
| 243 262 | 
             
            [source,ruby]
         | 
| 244 263 | 
             
            ----
         | 
| 245 264 | 
             
            item.to_asciibib
         | 
| 246 | 
            -
            [%bibitem]
         | 
| 247 | 
            -
            == {blank}
         | 
| 248 | 
            -
            id:: ISOTC211
         | 
| 249 | 
            -
            fetched::  | 
| 250 | 
            -
            title::
         | 
| 251 | 
            -
            title.type:: title-main
         | 
| 252 | 
            -
            title.content:: Geographic information
         | 
| 253 | 
            -
            title.format:: text/plain
         | 
| 254 | 
            -
            ...
         | 
| 265 | 
            +
            => [%bibitem]
         | 
| 266 | 
            +
               == {blank}
         | 
| 267 | 
            +
               id:: ISOTC211
         | 
| 268 | 
            +
               fetched:: 2022-05-02
         | 
| 269 | 
            +
               title::
         | 
| 270 | 
            +
               title.type:: title-main
         | 
| 271 | 
            +
               title.content:: Geographic information
         | 
| 272 | 
            +
               title.format:: text/plain
         | 
| 273 | 
            +
               ...
         | 
| 255 274 | 
             
            ----
         | 
| 256 275 |  | 
| 257 276 | 
             
            === Export bibliographic item to BibXML (RFC)
         | 
| @@ -259,58 +278,19 @@ title.format:: text/plain | |
| 259 278 | 
             
            [source,ruby]
         | 
| 260 279 | 
             
            ----
         | 
| 261 280 | 
             
            item.to_bibxml
         | 
| 262 | 
            -
            <reference anchor="ISO.TC.211" target="https://www.iso.org/standard/53798.html">
         | 
| 263 | 
            -
             | 
| 264 | 
            -
             | 
| 265 | 
            -
             | 
| 266 | 
            -
             | 
| 267 | 
            -
             | 
| 268 | 
            -
             | 
| 269 | 
            -
                   | 
| 270 | 
            -
                  < | 
| 271 | 
            -
             | 
| 272 | 
            -
             | 
| 273 | 
            -
             | 
| 274 | 
            -
             | 
| 275 | 
            -
                      <region>State</region>
         | 
| 276 | 
            -
                      <street>Street</street>
         | 
| 277 | 
            -
                    </postal>
         | 
| 278 | 
            -
                    <phone>223322</phone>
         | 
| 279 | 
            -
                  </address>
         | 
| 280 | 
            -
                </author>
         | 
| 281 | 
            -
                <author role="editor">
         | 
| 282 | 
            -
                  <organization abbrev="IEEE">IEEE</organization>
         | 
| 283 | 
            -
                </author>
         | 
| 284 | 
            -
                <author fullname="Forename Bierman" initials="A." surname="Bierman">
         | 
| 285 | 
            -
                  <organization abbrev="IETF">IETF</organization>
         | 
| 286 | 
            -
                  <address>
         | 
| 287 | 
            -
                    <postal>
         | 
| 288 | 
            -
                      <city>City</city>
         | 
| 289 | 
            -
                      <code>123456</code>
         | 
| 290 | 
            -
                      <country>Country</country>
         | 
| 291 | 
            -
                      <region>State</region>
         | 
| 292 | 
            -
                      <street>Street</street>
         | 
| 293 | 
            -
                    </postal>
         | 
| 294 | 
            -
                    <phone>223322</phone>
         | 
| 295 | 
            -
                  </address>
         | 
| 296 | 
            -
                </author>
         | 
| 297 | 
            -
                <author>
         | 
| 298 | 
            -
                  <organization>W3C</organization>
         | 
| 299 | 
            -
                </author>
         | 
| 300 | 
            -
                <date year="2014" month="April"/>
         | 
| 301 | 
            -
                <workgroup>Editorial group</workgroup>
         | 
| 302 | 
            -
                <abstract>
         | 
| 303 | 
            -
                  <t>ISO 19115-1:2014 defines the schema required for ...</t>
         | 
| 304 | 
            -
                </abstract>
         | 
| 305 | 
            -
              </front>
         | 
| 306 | 
            -
              <seriesInfo name="DOI" value="10.17487/rfc1149"/>
         | 
| 307 | 
            -
              <seriesInfo name="Internet-Draft" value="draft-ietf-somewg-someprotocol-07"/>
         | 
| 308 | 
            -
              <seriesInfo name="ISO/IEC FDIS 10118-3" value="serie1234"/>
         | 
| 309 | 
            -
              <seriesInfo name="Formattedref"/>
         | 
| 310 | 
            -
              <seriesInfo name="Journal" value="7"/>
         | 
| 311 | 
            -
              <seriesInfo name="Series"/>
         | 
| 312 | 
            -
              <seriesInfo name="RFC" value="4"/>
         | 
| 313 | 
            -
            </reference>
         | 
| 281 | 
            +
            => "<reference anchor="ISO.TC.211" target="https://www.iso.org/standard/53798.html">
         | 
| 282 | 
            +
                  <front>
         | 
| 283 | 
            +
                    <title>Geographic information</title>
         | 
| 284 | 
            +
                    <author>
         | 
| 285 | 
            +
                      <organization abbrev="ISO">International Organization for Standardization</organization>
         | 
| 286 | 
            +
                    </author>
         | 
| 287 | 
            +
                    ..
         | 
| 288 | 
            +
                  </front>
         | 
| 289 | 
            +
                  <seriesInfo name="DOI" value="10.17487/rfc1149"/>
         | 
| 290 | 
            +
                  <seriesInfo name="Internet-Draft" value="draft-ietf-somewg-someprotocol-07"/>
         | 
| 291 | 
            +
                  <seriesInfo name="ISO/IEC FDIS 10118-3" value="serie1234"/>
         | 
| 292 | 
            +
                  ...
         | 
| 293 | 
            +
                </reference>"
         | 
| 314 294 | 
             
            ----
         | 
| 315 295 |  | 
| 316 296 | 
             
            == Development
         | 
    
        data/grammars/basicdoc.rng
    CHANGED
    
    | @@ -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>
         | 
| @@ -688,6 +683,9 @@ | |
| 688 683 | 
             
              </define>
         | 
| 689 684 | 
             
              <define name="underline">
         | 
| 690 685 | 
             
                <element name="underline">
         | 
| 686 | 
            +
                  <optional>
         | 
| 687 | 
            +
                    <attribute name="style"/>
         | 
| 688 | 
            +
                  </optional>
         | 
| 691 689 | 
             
                  <zeroOrMore>
         | 
| 692 690 | 
             
                    <ref name="PureTextElement"/>
         | 
| 693 691 | 
             
                  </zeroOrMore>
         | 
| @@ -1125,26 +1123,4 @@ | |
| 1125 1123 | 
             
                  </zeroOrMore>
         | 
| 1126 1124 | 
             
                </element>
         | 
| 1127 1125 | 
             
              </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 1126 | 
             
            </grammar>
         | 
| @@ -0,0 +1,11 @@ | |
| 1 | 
            +
            <?xml version="1.0" encoding="UTF-8"?>
         | 
| 2 | 
            +
            <grammar xmlns="http://relaxng.org/ns/structure/1.0">
         | 
| 3 | 
            +
              <include href="basicdoc.rng"/>
         | 
| 4 | 
            +
              <include href="biblio-standoc.rng"/>
         | 
| 5 | 
            +
              <start>
         | 
| 6 | 
            +
                <choice>
         | 
| 7 | 
            +
                  <ref name="bibitem"/>
         | 
| 8 | 
            +
                  <ref name="bibdata"/>
         | 
| 9 | 
            +
                </choice>
         | 
| 10 | 
            +
              </start>
         | 
| 11 | 
            +
            </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 | 
            +
                <text/>
         | 
| 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>
         |