default namespace = "http://www.w3.org/2000/svg"
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"


## 
##     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$
##   

## 
##     Basic Text
## 
##         text, altGlyph, altGlyphDef, glyphRef
## 
##     This module declares markup to provide support for text.
##   

## 
##     Datatypes
##   
[ xml:lang = "en" ]
grammar {
    FontFamilyValue.datatype = xsd:string
    FontSizeValue.datatype = xsd:string
    a:documentation [ "\x{a}" ~ "    SVG.Font.attrib\x{a}" ~ "  " ]
    SVG.Font.extra.attrib = empty
    SVG.Font.attrib &=
        attribute font-family { FontFamilyValue.datatype }?,
        attribute font-size { FontSizeValue.datatype }?,
        attribute font-style {
            string "normal" | string "italic" | string "oblique" | string "inherit"
        }?,
        attribute font-weight {
            string "normal"
            | string "bold"
            | string "bolder"
            | string "lighter"
            | string "100"
            | string "200"
            | string "300"
            | string "400"
            | string "500"
            | string "600"
            | string "700"
            | string "800"
            | string "900"
            | string "inherit"
        }?,
        SVG.Font.extra.attrib
    a:documentation [ "\x{a}" ~ "    SVG.Text.class\x{a}" ~ "  " ]
    SVG.Text.extra.class = notAllowed
    SVG.Text.class |= \text | SVG.Text.extra.class
    a:documentation [
        "\x{a}" ~
        "    SVG.TextContent.class\x{a}" ~
        "  "
    ]
    SVG.TextContent.extra.class = notAllowed
    SVG.TextContent.class = altGlyph | SVG.TextContent.extra.class
    a:documentation [ "\x{a}" ~ "    text: Text Element\x{a}" ~ "  " ]
    SVG.text.class =
        text
        | SVG.Description.class
        | SVG.Animation.class
        | # <ref name="SVG.TextContent.extra.class"/>
          SVG.Hyperlink.class
    SVG.text.content = SVG.text.class*
    \text = element text { attlist.text, SVG.text.content }
    attlist.text &=
        SVG.Core.attrib,
        SVG.Conditional.attrib,
        SVG.Style.attrib,
        SVG.Font.attrib,
        SVG.Paint.attrib,
        SVG.Color.attrib,
        SVG.Opacity.attrib,
        SVG.Graphics.attrib,
        SVG.Clip.attrib,
        SVG.Mask.attrib,
        SVG.Filter.attrib,
        SVG.GraphicalEvents.attrib,
        SVG.Cursor.attrib,
        SVG.External.attrib,
        (common.attrs.aria.implicit.group | common.attrs.aria)?,
        attribute x { Coordinates.datatype }?,
        attribute y { Coordinates.datatype }?,
        attribute rotate { Numbers.datatype }?,
        attribute transform { TransformList.datatype }?
    a:documentation [
        "\x{a}" ~
        "    altGlyph: Alternate Glyph Element\x{a}" ~
        "  "
    ]
    SVG.altGlyph.content = text
    altGlyph =
        element altGlyph { attlist.altGlyph, SVG.altGlyph.content }
    attlist.altGlyph &=
        SVG.Core.attrib,
        SVG.Conditional.attrib,
        SVG.Style.attrib,
        SVG.Font.attrib,
        SVG.Paint.attrib,
        SVG.Color.attrib,
        SVG.Opacity.attrib,
        SVG.Graphics.attrib,
        SVG.Clip.attrib,
        SVG.Mask.attrib,
        SVG.Filter.attrib,
        SVG.GraphicalEvents.attrib,
        SVG.Cursor.attrib,
        SVG.XLink.attrib,
        SVG.External.attrib,
        (common.attrs.aria.implicit.group | common.attrs.aria)?,
        attribute glyphRef { text }?,
        attribute format { text }?
    a:documentation [
        "\x{a}" ~
        "    altGlyphDef: Alternate Glyph Definition Element\x{a}" ~
        "  "
    ]
    SVG.altGlyphDef.content = glyphRef+
    altGlyphDef =
        element altGlyphDef {
            attlist.altGlyphDef, SVG.altGlyphDef.content
        }
    attlist.altGlyphDef &= SVG.Core.attrib
    a:documentation [
        "\x{a}" ~
        "    glyphRef: Glyph Reference Element\x{a}" ~
        "  "
    ]
    SVG.glyphRef.content = empty
    glyphRef =
        element glyphRef { attlist.glyphRef, SVG.glyphRef.content }
    attlist.glyphRef &=
        SVG.Core.attrib,
        SVG.Style.attrib,
        SVG.Font.attrib,
        SVG.XLink.attrib,
        (common.attrs.aria.implicit.group | common.attrs.aria)?,
        attribute glyphRef { text }?,
        attribute format { text }?
}
