Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
opoudjis committed Oct 22, 2022
1 parent d73f8d9 commit c5f4f04
Show file tree
Hide file tree
Showing 6 changed files with 290 additions and 289 deletions.
27 changes: 0 additions & 27 deletions lib/metanorma/ribose/basicdoc.rng
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<include href="biblio.rng">
<start>
<ref name="document"/>
</start>
</include>
<define name="document">
<element name="document">
<optional>
Expand Down Expand Up @@ -1125,26 +1120,4 @@
</zeroOrMore>
</element>
</define>
<define name="ext">
<element name="ext">
<ref name="BibDataExtensionType"/>
</element>
</define>
<define name="BibDataExtensionType">
<ref name="doctype"/>
</define>
<define name="doctype">
<element name="doctype">
<ref name="DocumentType"/>
</element>
</define>
<define name="DocumentType">
<value>document</value>
</define>
<define name="BibData">
<ref name="BibliographicItem"/>
<optional>
<ref name="ext"/>
</optional>
</define>
</grammar>
164 changes: 164 additions & 0 deletions lib/metanorma/ribose/biblio-standoc.rng
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
<?xml version="1.0" encoding="UTF-8"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0">
<!--
Add-ons to biblio.rnc for standoc model: defines the extension point BibDataExtensionType
of relaton
Specialisations as for biblio.rnc. Extension point can be redefined completely for a flavour of standoc
(SDO); but other elements in Bibdata can only be extended (more specialised vocabularies for Bibdata)
-->
<include href="biblio.rng">
<define name="BibData">
<ref name="BibliographicItem"/>
<optional>
<ref name="ext"/>
</optional>
</define>
</include>
<define name="ext">
<element name="ext">
<ref name="BibDataExtensionType"/>
</element>
</define>
<define name="BibDataExtensionType">
<optional>
<attribute name="schema-version"/>
</optional>
<ref name="doctype"/>
<optional>
<ref name="docsubtype"/>
</optional>
<optional>
<ref name="editorialgroup"/>
</optional>
<zeroOrMore>
<ref name="ics"/>
</zeroOrMore>
<zeroOrMore>
<ref name="structuredidentifier"/>
</zeroOrMore>
</define>
<define name="doctype">
<element name="doctype">
<optional>
<attribute name="abbreviation"/>
</optional>
<ref name="DocumentType"/>
</element>
</define>
<define name="DocumentType">
<value>document</value>
</define>
<define name="docsubtype">
<element name="subdoctype">
<ref name="DocumentSubtype"/>
</element>
</define>
<define name="DocumentSubtype">
<text/>
</define>
<define name="editorialgroup">
<element name="editorialgroup">
<oneOrMore>
<ref name="technical-committee"/>
</oneOrMore>
</element>
</define>
<define name="technical-committee">
<element name="technical-committee">
<ref name="IsoWorkgroup"/>
</element>
</define>
<define name="IsoWorkgroup">
<optional>
<attribute name="number"/>
</optional>
<optional>
<attribute name="type"/>
</optional>
<optional>
<attribute name="identifier"/>
</optional>
<optional>
<attribute name="prefix"/>
</optional>
<text/>
</define>
<define name="ics">
<element name="ics">
<element name="code">
<text/>
</element>
<optional>
<element name="text">
<text/>
</element>
</optional>
</element>
</define>
<define name="structuredidentifier">
<element name="structuredidentifier">
<optional>
<attribute name="type"/>
</optional>
<oneOrMore>
<element name="agency">
<text/>
</element>
</oneOrMore>
<optional>
<element name="class">
<text/>
</element>
</optional>
<element name="docnumber">
<text/>
</element>
<optional>
<element name="partnumber">
<text/>
</element>
</optional>
<optional>
<element name="edition">
<text/>
</element>
</optional>
<optional>
<element name="version">
<text/>
</element>
</optional>
<optional>
<element name="supplementtype">
<text/>
</element>
</optional>
<optional>
<element name="supplementnumber">
<text/>
</element>
</optional>
<optional>
<element name="amendment">
<text/>
</element>
</optional>
<optional>
<element name="corrigendum">
<text/>
</element>
</optional>
<optional>
<element name="language">
<text/>
</element>
</optional>
<optional>
<element name="year">
<text/>
</element>
</optional>
</element>
</define>
</grammar>
63 changes: 45 additions & 18 deletions lib/metanorma/ribose/biblio.rng
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@
<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>
</data>
</define>
<start>
<ref name="bibitem"/>
</start>
<!-- start = bibitem -->
<define name="BibData">
<ref name="BibliographicItem"/>
</define>
<define name="status">
<element name="status">
<ref name="stage"/>
Expand Down Expand Up @@ -170,27 +171,25 @@
</define>
<define name="contributor">
<element name="contributor">
<zeroOrMore>
<oneOrMore>
<ref name="role"/>
</zeroOrMore>
</oneOrMore>
<ref name="ContributorInfo"/>
</element>
</define>
<define name="role">
<element name="role">
<optional>
<attribute name="type">
<choice>
<value>author</value>
<value>performer</value>
<value>publisher</value>
<value>editor</value>
<value>adapter</value>
<value>translator</value>
<value>distributor</value>
</choice>
</attribute>
</optional>
<attribute name="type">
<choice>
<value>author</value>
<value>performer</value>
<value>publisher</value>
<value>editor</value>
<value>adapter</value>
<value>translator</value>
<value>distributor</value>
</choice>
</attribute>
<zeroOrMore>
<ref name="roledescription"/>
</zeroOrMore>
Expand Down Expand Up @@ -512,6 +511,17 @@
</define>
<define name="localityStack">
<element name="localityStack">
<optional>
<attribute name="connective">
<choice>
<value>and</value>
<value>or</value>
<value>from</value>
<value>to</value>
<value/>
</choice>
</attribute>
</optional>
<zeroOrMore>
<ref name="locality"/>
</zeroOrMore>
Expand All @@ -524,6 +534,17 @@
</define>
<define name="sourceLocalityStack">
<element name="sourceLocalityStack">
<optional>
<attribute name="connective">
<choice>
<value>and</value>
<value>or</value>
<value>from</value>
<value>to</value>
<value/>
</choice>
</attribute>
</optional>
<zeroOrMore>
<ref name="sourceLocality"/>
</zeroOrMore>
Expand Down Expand Up @@ -626,6 +647,9 @@
<ref name="BibItemType"/>
</attribute>
</optional>
<optional>
<attribute name="schema-version"/>
</optional>
<optional>
<ref name="fetched"/>
</optional>
Expand Down Expand Up @@ -720,6 +744,9 @@
<ref name="BibItemType"/>
</attribute>
</optional>
<optional>
<attribute name="schema-version"/>
</optional>
<optional>
<ref name="fetched"/>
</optional>
Expand Down
Loading

0 comments on commit c5f4f04

Please sign in to comment.