namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"


## 
##     SVG 1.1 Paint Attribute Module
##     file: svg-paint-attrib.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$
##   

## 
##     Paint Attribute
## 
##         fill, fill-rule, stroke, stroke-dasharray, stroke-dashoffset,
##         stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-width, color,
##         color-interpolation, color-rendering
## 
##     This module defines the Paint and Color attribute sets.
##   
[ xml:lang = "en" ]
grammar {
    
    ## 
    ##       a 'fill' or 'stroke' property/attribute value: <paint>
    ##     
    Paint.datatype = xsd:string
    
    ## 
    ##       'stroke-dasharray' property/attribute value
    ##       (e.g., 'none', list of <number>s)
    ##     
    StrokeDashArrayValue.datatype = xsd:string
    
    ## 
    ##       'stroke-dashoffset' property/attribute value (e.g., 'none', <legnth>)
    ##     
    StrokeDashOffsetValue.datatype = xsd:string
    
    ## 
    ##       'stroke-miterlimit' property/attribute value (e.g., <number>)
    ##     
    StrokeMiterLimitValue.datatype = xsd:string
    
    ## 
    ##       'stroke-width' property/attribute value (e.g., <length>)
    ##     
    StrokeWidthValue.datatype = xsd:string
    SVG.fill.attrib = attribute fill { Paint.datatype }?
    SVG.fill-rule.attrib =
        attribute fill-rule { ClipFillRule.datatype }?
    SVG.stroke.attrib = attribute stroke { Paint.datatype }?
    SVG.stroke-dasharray.attrib =
        attribute stroke-dasharray { StrokeDashArrayValue.datatype }?
    SVG.stroke-dashoffset.attrib =
        attribute stroke-dashoffset { StrokeDashOffsetValue.datatype }?
    SVG.stroke-linecap.attrib =
        attribute stroke-linecap {
            "butt" | "round" | "square" | "inherit"
        }?
    SVG.stroke-linejoin.attrib =
        attribute stroke-linejoin {
            "miter" | "round" | "bevel" | "inherit"
        }?
    SVG.stroke-miterlimit.attrib =
        attribute stroke-miterlimit { StrokeMiterLimitValue.datatype }?
    SVG.stroke-width.attrib =
        attribute stroke-width { StrokeWidthValue.datatype }?
    SVG.Paint.extra.attrib = empty
    SVG.Paint.attrib &=
        SVG.fill.attrib,
        SVG.fill-rule.attrib,
        SVG.stroke.attrib,
        SVG.stroke-dasharray.attrib,
        SVG.stroke-dashoffset.attrib,
        SVG.stroke-linecap.attrib,
        SVG.stroke-linejoin.attrib,
        SVG.stroke-miterlimit.attrib,
        SVG.stroke-width.attrib,
        SVG.Paint.extra.attrib
    SVG.color.attrib = attribute color { Color.datatype }?
    SVG.color-interpolation.attrib =
        attribute color-interpolation {
            "auto" | "sRGB" | "linearRGB" | "inherit"
        }?
    SVG.color-rendering.attrib =
        attribute color-rendering {
            "auto" | "optimizeSpeed" | "optimizeQuality" | "inherit"
        }?
    SVG.Color.extra.attrib = empty
    SVG.Color.attrib &=
        SVG.color.attrib,
        SVG.color-interpolation.attrib,
        SVG.color-rendering.attrib,
        SVG.Color.extra.attrib
}
