summaryrefslogtreecommitdiff
path: root/xml/relaxng/src/resources/html5-schema/svg11/svg-conditional.rnc
blob: ecb3e154adeddf0d8bfa65cd195a8ab981acbcf1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
default namespace = "http://www.w3.org/2000/svg"
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"


## 
##     SVG 1.1 Conditional Processing Module
##     file: svg-conditional.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$
##   

## 
##     Conditional Processing
## 
##         switch
## 
##     This module declares markup to provide support for conditional processing.
##   

## 
##     Datatypes
##   
[ xml:lang = "en" ]
grammar {
    ExtensionList.datatype = xsd:string
    FeatureList.datatype = xsd:string
    a:documentation [
        "\x{a}" ~
        "    SVG.Conditional.attrib\x{a}" ~
        "  "
    ]
    SVG.Conditional.extra.attrib = empty
    SVG.Conditional.attrib &=
        attribute requiredFeatures { FeatureList.datatype }?,
        attribute requiredExtensions { ExtensionList.datatype }?,
        attribute systemLanguage { LanguageCodes.datatype }?,
        SVG.Conditional.extra.attrib
    a:documentation [
        "\x{a}" ~
        "    SVG.Conditional.class\x{a}" ~
        "  "
    ]
    SVG.Conditional.extra.class = notAllowed
    SVG.Conditional.class |= switch | SVG.Conditional.extra.class
    a:documentation [
        "\x{a}" ~
        "    switch: Switch Element\x{a}" ~
        "  "
    ]
    SVG.switch.content =
        SVG.Description.class*,
        (svg
         | g
         | use
         | \text
         | SVG.Animation.class
         | SVG.Conditional.class
         | SVG.Image.class
         | SVG.Shape.class
         | SVG.Hyperlink.class)*
    switch = element switch { attlist.switch, SVG.switch.content }
    attlist.switch &=
        SVG.Core.attrib,
        SVG.Conditional.attrib,
        SVG.Style.attrib,
        SVG.Presentation.attrib,
        SVG.GraphicalEvents.attrib,
        SVG.External.attrib,
        attribute transform { TransformList.datatype }?
}