
<!-- ==============================================================
      SVG12-RNG | Clip
     ============================================================== -->

<grammar ns='http://www.w3.org/2000/svg'
         xml:lang='en'
         xmlns='http://relaxng.org/ns/structure/1.0'
         xmlns:a='http://relaxng.org/ns/compatibility/annotations/1.0'
         datatypeLibrary='http://www.w3.org/2001/XMLSchema-datatypes'
         >

  <define name='ClipPathValue.datatype'>
    <data type='string'/>
  </define>





  <define name='SVG.Clip.attrib' combine='interleave'>
    <optional>
      <attribute name='clip-path'>
        <ref name='ClipPathValue.datatype'/>
      </attribute>
    </optional>
    <optional>
      <attribute name='clip-rule'>
        <ref name='ClipFillRule.datatype'/>
      </attribute>
    </optional>
  </define>



  <define name='SVG.Clip.class' combine='choice'>
    <choice>
      <ref name='clipPath'/>
    </choice>
  </define>




  <define name='SVG.clipPath.class'>
    <choice>
      <ref name='rect'/>
      <ref name='SVG.Animation.class'/>
      <ref name='SVG.Use.class'/>
      <ref name='SVG.Shape.class'/>
      <ref name='SVG.Text.class'/>
    </choice>
  </define>

  <define name='SVG.clipPath.content'>
    <zeroOrMore>
      <ref name='SVG.Description.class'/>
    </zeroOrMore>
    <zeroOrMore>
      <ref name='SVG.clipPath.class'/>
    </zeroOrMore>
  </define>

  <define name='clipPath'>
    <element name='clipPath'>
      <ref name='attlist.clipPath'/>
      <ref name='SVG.clipPath.content'/>
    </element>
  </define>

  <define name='attlist.clipPath' combine='interleave'>
    <ref name='SVG.Core.attrib'/>
    <ref name='SVG.Conditional.attrib'/>
    <ref name='SVG.Style.attrib'/>
    <ref name='SVG.Text.attrib'/>
    <ref name='SVG.TextContent.attrib'/>
    <ref name='SVG.Font.attrib'/>
    <ref name='SVG.Paint.attrib'/>
    <ref name='SVG.Color.attrib'/>
    <ref name='SVG.Opacity.attrib'/>
    <ref name='SVG.Graphics.attrib'/>
    <ref name='SVG.Clip.attrib'/>
    <ref name='SVG.Mask.attrib'/>
    <ref name='SVG.Filter.attrib'/>
    <ref name='SVG.Cursor.attrib'/>
    <ref name='SVG.External.attrib'/>
    <ref name='SVG.transform.attrib'/>
    <ref name='SVG.transform-host.attrib'/>
    <optional>
      <attribute name='clipPathUnits'>
        <choice>
          <value>userSpaceOnUse</value>
          <value>objectBoundingBox</value>
        </choice>
      </attribute>
    </optional>
  </define>

</grammar>
