Newer
Older
ade-outils-xml / dtd / Wileyml3gv20-rng / Wileyml3g-high.rng
@niederle niederle on 29 Dec 2015 10 KB 1er commit
<?xml version="1.0" encoding="UTF-8"?>
<!--
  =============================================================================================
  WileyML 3G
  
  A model for the content of John Wiley &amp; Sons. 
  
  This file conforms to ISO/IEC 19757-2:2003 AMENDMENT 1 (RELAX NG Compact Syntax). The
  collection of these files normatively defines the XML grammar for WileyNG instances.
  
  Copyright (c) 2011 John Wiley & Sons Inc. All rights reserved worldwide.
  
  $Id: Wileyml3g-high.rnc,v 1.34 2011/07/24 11:52:35 johnp Exp $
  =============================================================================================
-->
<grammar xmlns:wng="http://www.wiley.com/namespaces/wiley" xmlns:aux="http://www.wiley.com/namespaces/wiley/aux" xmlns="http://relaxng.org/ns/structure/1.0">
  <!--
    Changes for v2.0
      1. <component>/@version changed to "2.0"
      2. <body>: added mandatory @sectionsNumbered="yes|no", to be 
                   inherited by its <section>s, <appendix>es, and
                   <protocol>s, unless they override.
      3. <appendix>: added optional @numbered="yes|no"
      4. <definitionListGenerated>: added optional @style
  -->
  <!--
    Changes for v1.0.3
      1. <component>/@version changed to "1.0.3"
      2. <body>,<appendix>: allowed <feature> parallel to <section>, by 
               adding it to pattern.model.fragment.high.appendix
      3. <appendix>: added <label> and @resumeNumberingAt
      4. <subComponent>: added optional @xml:lang
  -->
  <!--
    =============================================================================================
    appendix
    =============================================================================================
  -->
  <define name="wng.appendix.attlist">
    <interleave>
      <ref name="pattern.global.attributes"/>
      <optional>
        <ref name="pattern.id.attribute"/>
      </optional>
      <optional>
        <ref name="pattern.autonumber.attribute"/>
      </optional>
      <optional>
        <attribute name="numbered">
          <aux:desc>whether the appendix is numbered (only needed if different from value of 'sectionsNumbered' on &lt;body&gt;)</aux:desc>
          <ref name="pattern.boolean.tokens"/>
        </attribute>
      </optional>
    </interleave>
  </define>
  <define name="wng.appendix">
    <element name="wng:appendix">
      <aux:desc aux:cat="high">An appendix within a chapter or article.</aux:desc>
      <ref name="wng.appendix.attlist"/>
      <optional>
        <ref name="wng.label"/>
      </optional>
      <ref name="pattern.model.fragment.titling"/>
      <oneOrMore>
        <ref name="pattern.model.fragment.high.appendix"/>
      </oneOrMore>
    </element>
  </define>
  <!--
    =============================================================================================
    body 
    =============================================================================================
  -->
  <define name="wng.body.attlist">
    <interleave>
      <ref name="pattern.global.attributes"/>
      <optional>
        <ref name="pattern.id.attribute"/>
      </optional>
      <attribute name="sectionsNumbered">
        <aux:desc>whether the sections, appendices, and protocols of this body are numbered (unless overridden on those elements)</aux:desc>
        <ref name="pattern.boolean.tokens"/>
      </attribute>
    </interleave>
  </define>
  <define name="wng.body">
    <element name="wng:body">
      <aux:desc aux:cat="high">The narrative content of a document.</aux:desc>
      <ref name="wng.body.attlist"/>
      <oneOrMore>
        <choice>
          <ref name="pattern.model.fragment.high.appendix"/>
          <ref name="wng.appendix"/>
          <ref name="wng.definitionList"/>
          <ref name="wng.definitionListGenerated"/>
        </choice>
      </oneOrMore>
    </element>
  </define>
  <!--
    =============================================================================================
    component 
    =============================================================================================
  -->
  <define name="wng.component.attlist">
    <interleave>
      <ref name="pattern.global.attributes"/>
      <optional>
        <ref name="pattern.type.attribute"/>
      </optional>
      <optional>
        <ref name="pattern.id.attribute"/>
      </optional>
      <attribute name="version">
        <aux:desc>the model version, which must be '2.0'</aux:desc>
        <value>2.0</value>
      </attribute>
      <ref name="pattern.lang.attribute"/>
    </interleave>
  </define>
  <define name="wng.component">
    <element name="wng:component">
      <aux:desc aux:cat="high">A root element (top-level structure) that is divided into a &lt;header&gt; and a &lt;body&gt;.</aux:desc>
      <ref name="wng.component.attlist"/>
      <ref name="wng.header"/>
      <optional>
        <choice>
          <ref name="wng.body"/>
          <ref name="wng.index"/>
        </choice>
      </optional>
    </element>
  </define>
  <!--
    =============================================================================================
    definitionList
    =============================================================================================
  -->
  <define name="wng.definitionList.attlist">
    <interleave>
      <ref name="pattern.global.attributes"/>
      <optional>
        <ref name="pattern.id.attribute"/>
      </optional>
      <optional>
        <ref name="pattern.lang.attribute"/>
      </optional>
    </interleave>
  </define>
  <define name="wng.definitionList">
    <element name="wng:definitionList">
      <aux:desc aux:cat="high">An article-level list of abbreviations, acronyms, or terms and their definitions or expansions.</aux:desc>
      <ref name="wng.definitionList.attlist"/>
      <ref name="wng.listPaired"/>
    </element>
  </define>
  <!--
    =============================================================================================
    definitionListGenerated
    =============================================================================================
  -->
  <define name="wng.definitionListGenerated.attlist">
    <interleave>
      <ref name="pattern.global.attributes"/>
      <optional>
        <ref name="pattern.id.attribute"/>
      </optional>
      <optional>
        <ref name="pattern.lang.attribute"/>
      </optional>
      <optional>
        <attribute name="selectType">
          <aux:desc>the type of term to be used in this structure</aux:desc>
        </attribute>
      </optional>
      <optional>
        <attribute name="style">
          <aux:desc>presentational hinting</aux:desc>
        </attribute>
      </optional>
    </interleave>
  </define>
  <define name="wng.definitionListGenerated">
    <element name="wng:definitionListGenerated">
      <aux:desc aux:cat="high">An automatically-generated glossary, list of abbreviations, acronyms, etc.</aux:desc>
      <ref name="wng.definitionListGenerated.attlist"/>
      <optional>
        <ref name="pattern.model.fragment.titling"/>
      </optional>
    </element>
  </define>
  <!--
    =============================================================================================
    header
    =============================================================================================
  -->
  <define name="wng.header.attlist">
    <interleave>
      <ref name="pattern.global.attributes"/>
      <optional>
        <ref name="pattern.id.attribute"/>
      </optional>
      <optional>
        <ref name="pattern.lang.attribute"/>
      </optional>
    </interleave>
  </define>
  <define name="wng.header">
    <element name="wng:header">
      <aux:desc aux:cat="high">Container for the non-narrative portions of a document (metadata, title, authors, abstract, etc.).</aux:desc>
      <ref name="wng.header.attlist"/>
      <zeroOrMore>
        <ref name="wng.publicationMeta"/>
      </zeroOrMore>
      <ref name="wng.contentMeta"/>
      <optional>
        <ref name="wng.noteGroup"/>
      </optional>
    </element>
  </define>
  <!--
    =============================================================================================
    letter
    =============================================================================================
  -->
  <define name="wng.letter.attlist">
    <interleave>
      <ref name="pattern.global.attributes"/>
      <optional>
        <ref name="pattern.id.attribute"/>
      </optional>
      <optional>
        <attribute>
          <name ns="">responseToDoi</name>
          <aux:desc>the DOI of the letter this responds to in another article (if it exists)</aux:desc>
        </attribute>
      </optional>
    </interleave>
  </define>
  <define name="wng.letter">
    <element name="wng:letter">
      <aux:desc aux:cat="high">A letter to the editor or other article that constitutes a single piece of correspondence.</aux:desc>
      <ref name="wng.letter.attlist"/>
      <optional>
        <ref name="wng.salutation"/>
      </optional>
      <oneOrMore>
        <ref name="wng.section"/>
      </oneOrMore>
      <zeroOrMore>
        <ref name="wng.blockFixed"/>
      </zeroOrMore>
      <optional>
        <choice>
          <group>
            <ref name="wng.bibliography"/>
            <optional>
              <ref name="wng.noteGroup"/>
            </optional>
          </group>
          <group>
            <ref name="wng.noteGroup"/>
            <optional>
              <ref name="wng.bibliography"/>
            </optional>
          </group>
        </choice>
      </optional>
    </element>
  </define>
  <!--
    =============================================================================================
    subComponent
    =============================================================================================
  -->
  <define name="wng.subComponent.attlist">
    <interleave>
      <ref name="pattern.global.attributes"/>
      <optional>
        <ref name="pattern.id.attribute"/>
      </optional>
      <optional>
        <ref name="pattern.lang.attribute"/>
      </optional>
    </interleave>
  </define>
  <define name="wng.subComponent">
    <element name="wng:subComponent">
      <aux:desc aux:cat="high">Reproduction of a complete component (typically a journal article) within another, for commentary or historical reasons.</aux:desc>
      <ref name="wng.subComponent.attlist"/>
      <choice>
        <ref name="wng.mediaResource"/>
        <ref name="wng.mediaResourceGroup"/>
        <group>
          <ref name="wng.header"/>
          <optional>
            <ref name="wng.body"/>
          </optional>
        </group>
      </choice>
    </element>
  </define>
</grammar>