<!-- ==============================================================
      SVG12-RNG | Hyperlinking
     ============================================================== -->

<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='LinkTarget.datatype'>
    <data type='NMTOKEN'/>
  </define>



  <define name='SVG.Hyperlink.class' combine='choice'>
    <choice>
      <ref name='a'/>
    </choice>
  </define>


  <define name='a'>
    <element name='a'>
      <ref name='attlist.a'/>
      <ref name='SVG.a.content'/>
    </element>
  </define>

  <define name='attlist.a' combine='interleave'>
    <ref name='SVG.Core.attrib'/>
    <ref name='SVG.Conditional.attrib'/>
    <ref name='SVG.Style.attrib'/>
    <ref name='SVG.Focusable.attrib'/>
    <ref name='SVG.Presentation.attrib'/>
    <ref name='SVG.GraphicalEvents.attrib'/>
    <ref name='SVG.XLinkReplace.attrib'/>
    <ref name='SVG.External.attrib'/>
    <ref name='SVG.transform.attrib'/>
    <ref name='SVG.transform-host.attrib'/>
    <optional>
      <attribute name='target'>
        <ref name='LinkTarget.datatype'/>
      </attribute>
    </optional>
  </define>

  <define name='SVG.a.content'>
    <zeroOrMore>
      <choice>
        <text/>
        <ref name='SVG.Description.class'/>
        <ref name='SVG.Animation.class'/>
        <ref name='SVG.Handler.class'/>
        <ref name='SVG.Structure.class'/>
        <ref name='SVG.Conditional.class'/>
        <ref name='SVG.Image.class'/>
        <ref name='SVG.Video.class'/>
        <ref name='SVG.Shape.class'/>
        <ref name='SVG.Text.class'/>
        <ref name='SVG.TextContent.class'/>
        <ref name='SVG.FlowText.class'/>
        <ref name='SVG.Hyperlink.class'/>
      </choice>
    </zeroOrMore>
  </define>

</grammar>
