Newer
Older
ade-outils-xml / dtd / Wileyml3gv20-rng / Wileyml3g-notes.rng
@niederle niederle on 29 Dec 2015 4 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-notes.rnc,v 1.21 2011/07/24 08:51:41 johnp Exp $
  =============================================================================================
-->
<!--
  Changes for v2.0 (Aug 2011)
    1. <note>: added optional attribute labelOnNoteOnly
    2. <label>: added optional attribute style="formatted | unformatted"
-->
<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">
  <!--
    =============================================================================================
    label
    =============================================================================================
  -->
  <define name="wng.label.attlist">
    <interleave>
      <ref name="pattern.global.attributes"/>
      <optional>
        <attribute name="style">
          <aux:desc>allows overrides of automated additions to label value, such as prepending chapter number (default value is 'formatted'). Mainly for use on equations, chemical structures, and notes.</aux:desc>
        </attribute>
      </optional>
    </interleave>
  </define>
  <define name="wng.label">
    <element name="wng:label">
      <aux:desc aux:cat="core">An element for overriding generated content in numbered or sequentially labeled items.</aux:desc>
      <ref name="wng.label.attlist"/>
      <zeroOrMore>
        <choice>
          <text/>
          <ref name="pattern.formatting"/>
        </choice>
      </zeroOrMore>
    </element>
  </define>
  <!--
    =============================================================================================
    note
    =============================================================================================
  -->
  <define name="wng.note.attlist">
    <interleave>
      <ref name="pattern.global.attributes"/>
      <ref name="pattern.id.attribute"/>
      <optional>
        <ref name="pattern.autonumber.attribute"/>
      </optional>
      <optional>
        <attribute name="type">
          <aux:desc>For specializing the use of the element. Pre-defined values: 'marginText', 'onlineInline', 'translation'.</aux:desc>
        </attribute>
      </optional>
      <optional>
        <ref name="pattern.lang.attribute"/>
      </optional>
      <optional>
        <attribute name="numbered">
          <aux:desc>whether this note is numbered (default value is yes, except for type='marginText', where default is no).</aux:desc>
          <ref name="pattern.boolean.tokens"/>
        </attribute>
      </optional>
      <optional>
        <attribute name="labelOnNoteOnly">
          <aux:desc>whether this note has its indicator in a graphic and therefore the indicator should only be generated on the note itself (default value is no).</aux:desc>
          <ref name="pattern.boolean.tokens"/>
        </attribute>
      </optional>
    </interleave>
  </define>
  <define name="wng.note">
    <element name="wng:note">
      <aux:desc aux:cat="notes">A footnote, endnote, or marginal note.</aux:desc>
      <ref name="wng.note.attlist"/>
      <zeroOrMore>
        <choice>
          <text/>
          <ref name="wng.label"/>
          <ref name="pattern.model.fragment.para.model"/>
          <ref name="wng.p"/>
        </choice>
      </zeroOrMore>
    </element>
  </define>
  <!--
    =============================================================================================
    noteGroup
    =============================================================================================
  -->
  <define name="wng.noteGroup.attlist">
    <interleave>
      <ref name="pattern.global.attributes"/>
      <optional>
        <ref name="pattern.id.attribute"/>
      </optional>
    </interleave>
  </define>
  <define name="wng.noteGroup">
    <element name="wng:noteGroup">
      <aux:desc aux:cat="notes">A wrapper for <xref xmlns="" linkend="wng_note"/>
+++s.</aux:desc>
      <ref name="wng.noteGroup.attlist"/>
      <optional>
        <ref name="pattern.model.fragment.titling"/>
      </optional>
      <zeroOrMore>
        <ref name="wng.p"/>
      </zeroOrMore>
      <oneOrMore>
        <ref name="wng.note"/>
      </oneOrMore>
    </element>
  </define>
</grammar>