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


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

## 
##     Shape
## 
##         path, rect, circle, line, ellipse, polyline, polygon
## 
##     This module declares markup to provide support for graphical shapes.
##   
[ xml:lang = "en" ]
grammar {
    
    ## 
    ##       a list of points
    ##     
    Points.datatype = xsd:string
    a:documentation [ "\x{a}" ~ "    SVG.Shape.class\x{a}" ~ "  " ]
    SVG.Shape.extra.class = notAllowed
    SVG.Shape.class |=
        path
        | rect
        | circle
        | line
        | ellipse
        | polyline
        | polygon
        | SVG.Shape.extra.class
    a:documentation [ "\x{a}" ~ "    path: Path Element\x{a}" ~ "  " ]
    SVG.path.content = SVG.Description.class*, SVG.Animation.class*
    path = element path { attlist.path, SVG.path.content }
    attlist.path &=
        SVG.Core.attrib,
        SVG.Conditional.attrib,
        SVG.Style.attrib,
        SVG.Paint.attrib,
        SVG.Color.attrib,
        SVG.Opacity.attrib,
        SVG.Graphics.attrib,
        SVG.Marker.attrib,
        SVG.Clip.attrib,
        SVG.Mask.attrib,
        SVG.Filter.attrib,
        SVG.GraphicalEvents.attrib,
        SVG.Cursor.attrib,
        SVG.External.attrib,
        common.attrs.aria?,
        attribute d { PathData.datatype }?,
        attribute pathLength { Number.datatype }?,
        attribute transform { TransformList.datatype }?
    a:documentation [
        "\x{a}" ~
        "    rect: Rectangle Element\x{a}" ~
        "  "
    ]
    SVG.rect.content = SVG.Description.class*, SVG.Animation.class*
    rect = element rect { attlist.rect, SVG.rect.content }
    attlist.rect &=
        SVG.Core.attrib,
        SVG.Conditional.attrib,
        SVG.Style.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?,
        attribute x { Coordinate.datatype }?,
        attribute y { Coordinate.datatype }?,
        attribute width { Length.datatype }?,
        attribute height { Length.datatype }?,
        attribute rx { Length.datatype }?,
        attribute ry { Length.datatype }?,
        attribute transform { TransformList.datatype }?
    a:documentation [
        "\x{a}" ~
        "    circle: Circle Element\x{a}" ~
        "  "
    ]
    SVG.circle.content = SVG.Description.class*, SVG.Animation.class*
    circle = element circle { attlist.circle, SVG.circle.content }
    attlist.circle &=
        SVG.Core.attrib,
        SVG.Conditional.attrib,
        SVG.Style.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?,
        attribute cx { Coordinate.datatype }?,
        attribute cy { Coordinate.datatype }?,
        attribute r { Length.datatype }?,
        attribute transform { TransformList.datatype }?
    a:documentation [ "\x{a}" ~ "    line: Line Element\x{a}" ~ "  " ]
    SVG.line.content = SVG.Description.class*, SVG.Animation.class*
    line = element line { attlist.line, SVG.line.content }
    attlist.line &=
        SVG.Core.attrib,
        SVG.Conditional.attrib,
        SVG.Style.attrib,
        SVG.Paint.attrib,
        SVG.Color.attrib,
        SVG.Opacity.attrib,
        SVG.Graphics.attrib,
        SVG.Marker.attrib,
        SVG.Clip.attrib,
        SVG.Mask.attrib,
        SVG.Filter.attrib,
        SVG.GraphicalEvents.attrib,
        SVG.Cursor.attrib,
        SVG.External.attrib,
        common.attrs.aria?,
        attribute x1 { Coordinate.datatype }?,
        attribute y1 { Coordinate.datatype }?,
        attribute x2 { Coordinate.datatype }?,
        attribute y2 { Coordinate.datatype }?,
        attribute transform { TransformList.datatype }?
    a:documentation [
        "\x{a}" ~
        "    ellipse: Ellipse Element\x{a}" ~
        "  "
    ]
    SVG.ellipse.content = SVG.Description.class*, SVG.Animation.class*
    ellipse = element ellipse { attlist.ellipse, SVG.ellipse.content }
    attlist.ellipse &=
        SVG.Core.attrib,
        SVG.Conditional.attrib,
        SVG.Style.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?,
        attribute cx { Coordinate.datatype }?,
        attribute cy { Coordinate.datatype }?,
        attribute rx { Length.datatype }?,
        attribute ry { Length.datatype }?,
        attribute transform { TransformList.datatype }?
    a:documentation [
        "\x{a}" ~
        "    polyline: Polyline Element\x{a}" ~
        "  "
    ]
    SVG.polyline.content = SVG.Description.class*, SVG.Animation.class*
    polyline =
        element polyline { attlist.polyline, SVG.polyline.content }
    attlist.polyline &=
        SVG.Core.attrib,
        SVG.Conditional.attrib,
        SVG.Style.attrib,
        SVG.Paint.attrib,
        SVG.Color.attrib,
        SVG.Opacity.attrib,
        SVG.Graphics.attrib,
        SVG.Marker.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 points { Points.datatype }?,
        attribute transform { TransformList.datatype }?
    a:documentation [
        "\x{a}" ~
        "    polygon: Polygon Element\x{a}" ~
        "  "
    ]
    SVG.polygon.content = SVG.Description.class*, SVG.Animation.class*
    polygon = element polygon { attlist.polygon, SVG.polygon.content }
    attlist.polygon &=
        SVG.Core.attrib,
        SVG.Conditional.attrib,
        SVG.Style.attrib,
        SVG.Paint.attrib,
        SVG.Color.attrib,
        SVG.Opacity.attrib,
        SVG.Graphics.attrib,
        SVG.Marker.attrib,
        SVG.Clip.attrib,
        SVG.Mask.attrib,
        SVG.Filter.attrib,
        SVG.GraphicalEvents.attrib,
        SVG.Cursor.attrib,
        SVG.External.attrib,
        common.attrs.aria?,
        attribute points { Points.datatype }?,
        attribute transform { TransformList.datatype }?
}
