⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xmlschema.rng

📁 xml 组建工程 不多说说 很都功能 就是懒得整理
💻 RNG
📖 第 1 页 / 共 4 页
字号:
  </doc:p>
  <element name="restriction"
        doc:href="http://www.w3.org/TR/xmlschema-1/#element-complexContent::restriction">
    <ref name="annotated" />
    <attribute name="base">
      <data type="QName" />
    </attribute>
    <optional>
      <ref name="typeDefParticle" />
    </optional>
    <ref name="attrDecls" />
  </element>
</define>

<define name="extensionType">
  <doc:p>
    This specifies the basic model for an extension element: adding a 
    required base attribute to the model used for most components.
  </doc:p>
  <ref name="annotated" />
  <attribute name="base">
    <data type="QName" />
  </attribute>
</define>

<define name="complexExtension">
  <doc:p>
    This describes an extension element within a complexContent element 
    (i.e. one that restricts a complex type).  It may contain a model group 
    and may contain attribute declarations of various sorts.
  </doc:p>
  <element name="extension"
        doc:href="http://www.w3.org/TR/xmlschema-1/#element-complexContent::extension">
    <ref name="extensionType" />
    <optional>
      <ref name="typeDefParticle" />
    </optional>
    <ref name="attrDecls" />
  </element>
</define>

<define name="complexContent">
  <doc:p>
    This describes a complexContent element.  It may have a mixed attribute, 
    and either a restriction or extension element as content.
  </doc:p>
  <element name="complexContent"
        doc:href="http://www.w3.org/TR/xmlschema-1/#element-complexContent">
    <ref name="annotated" />
    <optional>
      <attribute name="mixed">
        <data type="boolean" />
      </attribute>
    </optional>
    <choice>
      <ref name="complexRestriction" />
      <ref name="complexExtension" />
    </choice>
  </element>
</define>

<define name="simpleRestriction">
  <doc:p>
    This describes a restriction element that appears within a simpleContent 
    or simpleType element (i.e. one that restricts a simple type).  Its 
    content follows the simple restriction model that is detailed below, and 
    may include attribute declarations.
  </doc:p>
  <element name="restriction"
        doc:href="http://www.w3.org/TR/xmlschema-1/#element-simpleContent::restriction">
    <ref name="annotated" />
    <ref name="simpleRestrictionModel" />
    <ref name="attrDecls" />
  </element>
</define>

<define name="simpleExtension">
  <doc:p>
    This describes an extension element that appears within a simpleContent 
    element (i.e. one that extends a simple type).  Like other extensions, it 
    has a base type, but it can only be used to add attributes.
  </doc:p>
  <element name="extension"
        doc:href="http://www.w3.org/TR/xmlschema-1/#element-simpleContent::extension">
    <ref name="extensionType" />
    <ref name="attrDecls" />
  </element>
</define>

<define name="simpleContent">
  <doc:p>
    This describes a simpleContent element, whose content can either hold a 
    restriction or extension element.
  </doc:p>
  <element name="simpleContent"
        doc:href="http://www.w3.org/TR/xmlschema-1/#element-simpleContent">
    <ref name="annotated" />
    <choice>
      <ref name="simpleRestriction" />
      <ref name="simpleExtension" />
    </choice>
  </element>
</define>

<define name="blockSet">
  <doc:p>
    This gives the possible values for block attributes on element elements, 
    which includes substitution amongst the list of possible values.  This 
    RELAX NG schema, like the XML Schema Recommendation, allows each of the 
    keywords 'extension', 'restriction' and 'substitution' to occur more than 
    once within the list.
  </doc:p>
  <choice>
    <value type="token">#all</value>
    <list>
      <zeroOrMore>
        <choice>
          <value>extension</value>
          <value>restriction</value>
          <value>substitution</value>
        </choice>
      </zeroOrMore>
    </list>
  </choice>
</define>

<define name="element">
  <doc:p>
    This describes the basic content model of an element element.  It is 
    annotated, may have a fixed or default attribute, and may have nillable 
    and/or block attributes.  Its type may be specified through a type 
    attribute, a local simple type or a local complex type - the choice 
    between these methods is something that cannot be indicated with XML 
    Schema.  This content is optionally followed by some identify constraints.
  </doc:p>
  <ref name="annotated" />
  <ref name="fixedOrDefault" />
  <zeroOrMore>
    <choice>
      <attribute name="nillable">
        <data type="boolean" />
      </attribute>
      <attribute name="block">
        <ref name="blockSet" />
      </attribute>
    </choice>
  </zeroOrMore>
  <choice>
    <empty />
    <attribute name="type">
      <data type="QName" />
    </attribute>
    <ref name="localSimpleType" />
    <ref name="localComplexType" />
  </choice>
  <zeroOrMore>
    <ref name="identityConstraint" />
  </zeroOrMore>
</define>

<define name="topLevelElement">
  <doc:p>
    This describes an element element that appears at the top level of the 
    schema.  On top of the basic content for an element element, it has to 
    have a name, which is a unique identifier in the element symbol space.  It 
    may have substitutionGroup, abstract and/or final attributes.
  </doc:p>
  <element name="element"
        doc:href="http://www.w3.org/TR/xmlschema-1/#element-element">
    <ref name="element" />
    <attribute name="name">
      <data type="NCName" />
    </attribute>
    <zeroOrMore>
      <choice>
        <attribute name="substitutionGroup">
          <data type="QName" />
        </attribute>
        <attribute name="abstract">
          <data type="boolean" />
        </attribute>
        <attribute name="final">
          <ref name="derivationSet" />
        </attribute>
      </choice>
    </zeroOrMore>
  </element>
</define>

<define name="localElement">
  <doc:p>
    This describes an element element that appears locally, within a 
    complexType or group element.  It may have minOccurs and/or maxOccurs 
    attributes.  If it has a ref attribute, then that&apos;s all it can 
    have.  Otherwise, it must have a name and specifies its type in the same 
    way as the basic element content model described above.  It may in this 
    case also have a form element.  These constraints on local elements 
    cannot be described within XML Schema.
  </doc:p>
  <element name="element"
        doc:href="http://www.w3.org/TR/xmlschema-1/#element-element">
    <ref name="occurs" />
    <choice>
      <attribute name="ref">
        <data type="QName" />
      </attribute>
      <group>
        <ref name="element" />
        <attribute name="name">
          <data type="NCName" />
        </attribute>
        <optional>
          <attribute name="form">
            <ref name="formChoice" />
          </attribute>
        </optional>
      </group>
    </choice>
  </element>
</define>

<define name="namedGroup">
  <doc:p>
    This describes an group element that appears at the top level of the 
    schema.  It must have a name attribute, and must have one of an all, 
    choice or sequence element child.
  </doc:p>
  <element name="group"
        doc:href="http://www.w3.org/TR/xmlschema-1/#element-group">
    <ref name="annotated" />
    <attribute name="name">
      <data type="NCName" />
    </attribute>
    <choice>
      <element name="all">
        <ref name="allModel" />
      </element>
      <element name="choice">
        <ref name="simpleExplicitGroup" />
      </element>
      <element name="sequence">
        <ref name="simpleExplicitGroup" />
      </element>
    </choice>
  </element>
</define>

<define name="groupRef">
  <doc:p>
    This describes group element that occurs locally, referring to a 
    top-level named group.  It may have occurrence attributes, and must have 
    a ref attribute.
  </doc:p>
  <element name="group"
        doc:href="http://www.w3.org/TR/xmlschema-1/#element-group">
    <ref name="annotated" />
    <ref name="occurs" />
    <attribute name="ref">
      <data type="QName" />
    </attribute>
  </element>
</define>

<define name="explicitGroup">
  <doc:p>
    This gives the content of a model group (not a group element) in the 
    normal run of things.  It has occurrence attributes and any number of 
    particles within it.
  </doc:p>
  <ref name="annotated" />
  <ref name="occurs" />
  <zeroOrMore>
    <ref name="nestedParticle" />
  </zeroOrMore>
</define>

<define name="simpleExplicitGroup">
  <doc:p>
    This gives the content of a model group (not a group element) within a 
    named group - it differs from the above in that it doesn&apos;t have any 
    occurrence attributes.
  </doc:p>
  <ref name="annotated" />
  <zeroOrMore>
    <ref name="nestedParticle" />
  </zeroOrMore>
</define>

<define name="allModel">
  <doc:p>
    This gives the content of an all element.  It contains element elements 
    that are similar to local element elements, but the minOccurs and 
    maxOccurs attributes can only take values of 0 or 1.
  </doc:p>
  <ref name="annotated" />
  <zeroOrMore>
    <element name="element">
      <zeroOrMore>
        <choice>
          <attribute name="minOccurs">
            <choice>
              <value type="nonNegativeInteger">0</value>
              <value type="nonNegativeInteger">1</value>
            </choice>
          </attribute>
          <attribute name="maxOccurs">
            <choice>
              <value type="nonNegativeInteger">0</value>
              <value type="nonNegativeInteger">1</value>
            </choice>
          </attribute>
        </choice>
      </zeroOrMore>
      <choice>
        <attribute name="ref">
          <data type="QName" />
        </attribute>
        <group>
          <ref name="element" />
          <attribute name="name">
            <data type="NCName" />
          </attribute>
          <optional>
            <attribute name="form">
              <ref name="formChoice" />
            </attribute>
          </optional>
        </group>
      </choice>
    </element>
  </zeroOrMore>
</define>

<define name="all">
  <doc:p>
    This describes an all element that appears outside a named group (i.e. as 
    the content of a complexType element).  It has the standard model for an 
    all element, but adds minOccurs and maxOccurs attributes which can only 
    take certain values.
  </doc:p>
  <element name="all"
        doc:href="http://www.w3.org/TR/xmlschema-1/#element-all">
    <ref name="allModel" />
    <zeroOrMore>
      <choice>
        <attribute name="minOccurs">
          <choice>
            <value type="nonNegativeInteger">0</value>
            <value type="nonNegativeInteger">1</value>
          </choice>
        </attribute>
        <attribute name="maxOccurs">
          <value type="nonNegativeInteger">1</value>
        </attribute>
      </choice>
    </zeroOrMore>
  </element>
</define>

<define name="choice">
  <doc:p>
    This describes a choice element that appears outside a named group.
  </doc:p>
  <element name="choice"
        doc:href="http://www.w3.org/TR/xmlschema-1/#element-choice">
    <ref name="explicitGroup" />
  </element>
</define>

<define name="sequence">
  <doc:p>
    This describes a sequence element that appears outside a named group.
  </doc:p>
  <element name="sequence"
        doc:href="http://www.w3.org/TR/xmlschema-1/#element-sequence">
    <ref name="explicitGroup" />
  </element>
</define>

<define name="wildcard">
  <doc:p>
    This describes a wildcard element (i.e. any or anyAttribute).  The 
    namespace attribute can take a list URIs interspersed with the keywords 
    '##targetNamespace' and/or '##local'.  This RELAX NG schema, like the XML 
    Schema Recommendation, allows the keywords to be specified more than once 
    each within the list, if they&apos;re given.  This model also specifies the 
    processContents attribute.
  </doc:p>
  <ref name="annotated" />
  <zeroOrMore>
    <choice>
      <attribute name="namespace">
        <choice>
          <value type="token">##any</value>
          <value type="token">##other</value>
          <list>
            <zeroOrMore>
              <choice>
                <data type="anyURI" />
                <value>##targetNamespace</value>
                <value>##local</value>
              </choice>
            </zeroOrMore>
          </list>
        </choice>
      </attribute>
      <attribute name="processContents">
        <choice>
          <value type="token">lax</value>
          <value type="token">skip</value>
          <value type="token">strict</value>
        </choice>
      </attribute>
    </choice>
  </zeroOrMore>
</define>

<define name="any">
  <doc:p>
    This describes an any element as a wildcard.
  </doc:p>
  <element name="any"
        doc:href="http://www.w3.org/TR/xmlschema-1/#element-any">
    <ref name="wildcard" />
    <ref name="occurs" />
  </element>
</define>

<define name="namedAttributeGroup">
  <doc:p>
    This describes an attributeGroup element as it appears at the top level 
    of the schema.  It must have a name attribute, and then contains 
    attribute declarations.
  </doc:p>
  <element name="attributeGroup"
        doc:href="http://www.w3.org/TR/xmlschema-1/#element-attributeGroup">
    <ref name="annotated" />
    <attribute name="name">
      <data type="NCName" />
    </attribute>
    <ref name="attrDecls" />
  </element>
</define>

<define name="attributeGroupRef">
  <doc:p>
    This describes an attributeGroup element as it appears within a complex 
    type.  It must have a ref attribute.
  </doc:p>
  <element name="attributeGroup"
        doc:href="http://www.w3.org/TR/xmlschema-1/#element-attributeGroup">
    <ref name="annotated" />
    <attribute name="ref">
      <data type="QName" />
    </attribute>
  </element>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -