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


## 
##     SVG 1.1 Gradient Module
##     file: svg-gradient.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$
##   

## 
##     Gradient
## 
##         linearGradient, radialGradient, stop
## 
##     This module declares markup to provide support for gradient fill.
##   

## 
##     Datatypes
##   
[ xml:lang = "en" ]
grammar {
    NumberOrPercentage.datatype = xsd:string
    a:documentation [ "\x{a}" ~ "    SVG.Gradient.attrib\x{a}" ~ "  " ]
    SVG.Gradient.extra.attrib = empty
    SVG.Gradient.attrib &=
        attribute stop-color { SVGColor.datatype }?,
        attribute stop-opacity { OpacityValue.datatype }?,
        SVG.Gradient.extra.attrib
    a:documentation [ "\x{a}" ~ "    SVG.Gradient.class\x{a}" ~ "  " ]
    SVG.Gradient.extra.class = notAllowed
    SVG.Gradient.class |=
        linearGradient | radialGradient | SVG.Gradient.extra.class
    a:documentation [
        "\x{a}" ~
        "    linearGradient: Linear Gradient Element\x{a}" ~
        "  "
    ]
    SVG.linearGradient.content =
        SVG.Description.class*,
        (stop | animate | set | animateTransform)*
    linearGradient =
        element linearGradient {
            attlist.linearGradient, SVG.linearGradient.content
        }
    attlist.linearGradient &=
        SVG.Core.attrib,
        SVG.Style.attrib,
        SVG.Color.attrib,
        SVG.Gradient.attrib,
        SVG.XLink.attrib,
        SVG.External.attrib,
        attribute x1 { Coordinate.datatype }?,
        attribute y1 { Coordinate.datatype }?,
        attribute x2 { Coordinate.datatype }?,
        attribute y2 { Coordinate.datatype }?,
        attribute gradientUnits {
            string "userSpaceOnUse" | string "objectBoundingBox"
        }?,
        attribute gradientTransform { TransformList.datatype }?,
        attribute spreadMethod { string "pad" | string "reflect" | string "repeat" }?
    a:documentation [
        "\x{a}" ~
        "    radialGradient: Radial Gradient Element\x{a}" ~
        "  "
    ]
    SVG.radialGradient.content =
        SVG.Description.class*,
        (stop | animate | set | animateTransform)*
    radialGradient =
        element radialGradient {
            attlist.radialGradient, SVG.radialGradient.content
        }
    attlist.radialGradient &=
        SVG.Core.attrib,
        SVG.Style.attrib,
        SVG.Color.attrib,
        SVG.Gradient.attrib,
        SVG.XLink.attrib,
        SVG.External.attrib,
        attribute cx { Coordinate.datatype }?,
        attribute cy { Coordinate.datatype }?,
        attribute r { Length.datatype }?,
        attribute fx { Coordinate.datatype }?,
        attribute fy { Coordinate.datatype }?,
        attribute gradientUnits {
            string "userSpaceOnUse" | string "objectBoundingBox"
        }?,
        attribute gradientTransform { TransformList.datatype }?,
        attribute spreadMethod { string "pad" | string "reflect" | string "repeat" }?
    a:documentation [ "\x{a}" ~ "    stop: Stop Element\x{a}" ~ "  " ]
    SVG.stop.content = (animate | set | animateColor)*
    stop = element stop { attlist.stop, SVG.stop.content }
    attlist.stop &=
        SVG.Core.attrib,
        SVG.Style.attrib,
        SVG.Color.attrib,
        SVG.Gradient.attrib,
        attribute offset { NumberOrPercentage.datatype }
}
