<?xml version="1.0" encoding="UTF-8"?>
<grammar xml:lang="en" ns="http://www.w3.org/2000/svg" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
  <a:documentation>
    SVG 1.1 Basic Text Module
    file: svg-basic-text.rng

    This is SVG, a language for describing two-dimensional graphics in XML.
    Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved.

    Modifications Copyright 2007 Mozilla Foundation

    $Id$
  </a:documentation>
  <a:documentation>
    Basic Text

        text, altGlyph, altGlyphDef, glyphRef

    This module declares markup to provide support for text.
  </a:documentation>
  <a:documentation>
    Datatypes
  </a:documentation>
  <define name="FontFamilyValue.datatype">
    <data type="string"/>
  </define>
  <define name="FontSizeValue.datatype">
    <data type="string"/>
  </define>
  <a:documentation>
    SVG.Font.attrib
  </a:documentation>
  <define name="SVG.Font.extra.attrib">
    <empty/>
  </define>
  <define name="SVG.Font.attrib" combine="interleave">
    <optional>
      <attribute name="font-family">
        <ref name="FontFamilyValue.datatype"/>
      </attribute>
    </optional>
    <optional>
      <attribute name="font-size">
        <ref name="FontSizeValue.datatype"/>
      </attribute>
    </optional>
    <optional>
      <attribute name="font-style">
        <choice>
          <value type="string" datatypeLibrary="">normal</value>
          <value type="string" datatypeLibrary="">italic</value>
          <value type="string" datatypeLibrary="">oblique</value>
          <value type="string" datatypeLibrary="">inherit</value>
        </choice>
      </attribute>
    </optional>
    <optional>
      <attribute name="font-weight">
        <choice>
          <value type="string" datatypeLibrary="">normal</value>
          <value type="string" datatypeLibrary="">bold</value>
          <value type="string" datatypeLibrary="">bolder</value>
          <value type="string" datatypeLibrary="">lighter</value>
          <value type="string" datatypeLibrary="">100</value>
          <value type="string" datatypeLibrary="">200</value>
          <value type="string" datatypeLibrary="">300</value>
          <value type="string" datatypeLibrary="">400</value>
          <value type="string" datatypeLibrary="">500</value>
          <value type="string" datatypeLibrary="">600</value>
          <value type="string" datatypeLibrary="">700</value>
          <value type="string" datatypeLibrary="">800</value>
          <value type="string" datatypeLibrary="">900</value>
          <value type="string" datatypeLibrary="">inherit</value>
        </choice>
      </attribute>
    </optional>
    <ref name="SVG.Font.extra.attrib"/>
  </define>
  <a:documentation>
    SVG.Text.class
  </a:documentation>
  <define name="SVG.Text.extra.class">
    <notAllowed/>
  </define>
  <define name="SVG.Text.class" combine="choice">
    <choice>
      <ref name="text"/>
      <ref name="SVG.Text.extra.class"/>
    </choice>
  </define>
  <a:documentation>
    SVG.TextContent.class
  </a:documentation>
  <define name="SVG.TextContent.extra.class">
    <notAllowed/>
  </define>
  <define name="SVG.TextContent.class">
    <choice>
      <ref name="altGlyph"/>
      <ref name="SVG.TextContent.extra.class"/>
    </choice>
  </define>
  <a:documentation>
    text: Text Element
  </a:documentation>
  <define name="SVG.text.class">
    <choice>
      <text/>
      <ref name="SVG.Description.class"/>
      <ref name="SVG.Animation.class"/>
      <!-- <ref name="SVG.TextContent.extra.class"/> -->
      <ref name="SVG.Hyperlink.class"/>
    </choice>
  </define>
  <define name="SVG.text.content">
    <zeroOrMore>
      <ref name="SVG.text.class"/>
    </zeroOrMore>
  </define>
  <define name="text">
    <element name="text">
      <ref name="attlist.text"/>
      <ref name="SVG.text.content"/>
    </element>
  </define>
  <define name="attlist.text" combine="interleave">
    <ref name="SVG.Core.attrib"/>
    <ref name="SVG.Conditional.attrib"/>
    <ref name="SVG.Style.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.GraphicalEvents.attrib"/>
    <ref name="SVG.Cursor.attrib"/>
    <ref name="SVG.External.attrib"/>
    <optional>
      <choice>
        <ref name="common.attrs.aria.implicit.group"/>
        <ref name="common.attrs.aria"/>
      </choice>
    </optional>
    <optional>
      <attribute name="x">
        <ref name="Coordinates.datatype"/>
      </attribute>
    </optional>
    <optional>
      <attribute name="y">
        <ref name="Coordinates.datatype"/>
      </attribute>
    </optional>
    <optional>
      <attribute name="rotate">
        <ref name="Numbers.datatype"/>
      </attribute>
    </optional>
    <optional>
      <attribute name="transform">
        <ref name="TransformList.datatype"/>
      </attribute>
    </optional>
  </define>
  <a:documentation>
    altGlyph: Alternate Glyph Element
  </a:documentation>
  <define name="SVG.altGlyph.content">
    <text/>
  </define>
  <define name="altGlyph">
    <element name="altGlyph">
      <ref name="attlist.altGlyph"/>
      <ref name="SVG.altGlyph.content"/>
    </element>
  </define>
  <define name="attlist.altGlyph" combine="interleave">
    <ref name="SVG.Core.attrib"/>
    <ref name="SVG.Conditional.attrib"/>
    <ref name="SVG.Style.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.GraphicalEvents.attrib"/>
    <ref name="SVG.Cursor.attrib"/>
    <ref name="SVG.XLink.attrib"/>
    <ref name="SVG.External.attrib"/>
    <optional>
      <choice>
        <ref name="common.attrs.aria.implicit.group"/>
        <ref name="common.attrs.aria"/>
      </choice>
    </optional>
    <optional>
      <attribute name="glyphRef"/>
    </optional>
    <optional>
      <attribute name="format"/>
    </optional>
  </define>
  <a:documentation>
    altGlyphDef: Alternate Glyph Definition Element
  </a:documentation>
  <define name="SVG.altGlyphDef.content">
    <oneOrMore>
      <ref name="glyphRef"/>
    </oneOrMore>
  </define>
  <define name="altGlyphDef">
    <element name="altGlyphDef">
      <ref name="attlist.altGlyphDef"/>
      <ref name="SVG.altGlyphDef.content"/>
    </element>
  </define>
  <define name="attlist.altGlyphDef" combine="interleave">
    <ref name="SVG.Core.attrib"/>
  </define>
  <a:documentation>
    glyphRef: Glyph Reference Element
  </a:documentation>
  <define name="SVG.glyphRef.content">
    <empty/>
  </define>
  <define name="glyphRef">
    <element name="glyphRef">
      <ref name="attlist.glyphRef"/>
      <ref name="SVG.glyphRef.content"/>
    </element>
  </define>
  <define name="attlist.glyphRef" combine="interleave">
    <ref name="SVG.Core.attrib"/>
    <ref name="SVG.Style.attrib"/>
    <ref name="SVG.Font.attrib"/>
    <ref name="SVG.XLink.attrib"/>
    <optional>
      <choice>
        <ref name="common.attrs.aria.implicit.group"/>
        <ref name="common.attrs.aria"/>
      </choice>
    </optional>
    <optional>
      <attribute name="glyphRef"/>
    </optional>
    <optional>
      <attribute name="format"/>
    </optional>
  </define>
</grammar>
