summaryrefslogtreecommitdiff
path: root/xml/relaxng/src/resources/html5-schema/svg11/svg-basic-font.rnc
blob: 32eb1460f564286f266ee62edbe5aa8a0752f593 (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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
default namespace = "http://www.w3.org/2000/svg"
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"


## 
##     SVG 1.1 Basic Font Module
##     file: svg-basic-font.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 Font
## 
##         font, font-face, glyph, missing-glyph, hkern, vkern, font-face-src,
##         font-face-uri, font-face-name
## 
##     This module declares markup to provide support for template.
##   

## 
##     SVG.Font.class
##   
[ xml:lang = "en" ]
grammar {
    SVG.Font.extra.class = notAllowed
    SVG.Font.class |= font | font-face | SVG.Font.extra.class
    a:documentation [ "\x{a}" ~ "    font: Font Element\x{a}" ~ "  " ]
    SVG.font.content =
        SVG.Description.class*,
        font-face,
        missing-glyph,
        (glyph | hkern | vkern)*
    font = element font { attlist.font, SVG.font.content }
    attlist.font &=
        SVG.Core.attrib,
        SVG.Style.attrib,
        SVG.Presentation.attrib,
        SVG.External.attrib,
        attribute horiz-origin-x { Number.datatype }?,
        attribute horiz-origin-y { Number.datatype }?,
        attribute horiz-adv-x { Number.datatype },
        attribute vert-origin-x { Number.datatype }?,
        attribute vert-origin-y { Number.datatype }?,
        attribute vert-adv-y { Number.datatype }?
    a:documentation [
        "\x{a}" ~
        "    font-face: Font Face Element\x{a}" ~
        "  "
    ]
    SVG.font-face.extra.class = notAllowed
    SVG.font-face.content =
        SVG.Description.class*,
        font-face-src?,
        SVG.font-face.extra.class
    font-face =
        element font-face { attlist.font-face, SVG.font-face.content }
    attlist.font-face &=
        SVG.Core.attrib,
        attribute font-family { text }?,
        attribute font-style { text }?,
        attribute font-variant { text }?,
        attribute font-weight { text }?,
        attribute font-stretch { text }?,
        attribute font-size { text }?,
        attribute unicode-range { text }?,
        attribute units-per-em { Number.datatype }?,
        attribute panose-1 { text }?,
        attribute stemv { Number.datatype }?,
        attribute stemh { Number.datatype }?,
        attribute slope { Number.datatype }?,
        attribute cap-height { Number.datatype }?,
        attribute x-height { Number.datatype }?,
        attribute accent-height { Number.datatype }?,
        attribute ascent { Number.datatype }?,
        attribute descent { Number.datatype }?,
        attribute widths { text }?,
        attribute bbox { text }?,
        attribute ideographic { Number.datatype }?,
        attribute alphabetic { Number.datatype }?,
        attribute mathematical { Number.datatype }?,
        attribute hanging { Number.datatype }?,
        attribute v-ideographic { Number.datatype }?,
        attribute v-alphabetic { Number.datatype }?,
        attribute v-mathematical { Number.datatype }?,
        attribute v-hanging { Number.datatype }?,
        attribute underline-position { Number.datatype }?,
        attribute underline-thickness { Number.datatype }?,
        attribute strikethrough-position { Number.datatype }?,
        attribute strikethrough-thickness { Number.datatype }?,
        attribute overline-position { Number.datatype }?,
        attribute overline-thickness { Number.datatype }?
    a:documentation [ "\x{a}" ~ "    glyph: Glyph Element\x{a}" ~ "  " ]
    SVG.glyph.class = notAllowed
    SVG.glyph.content = SVG.Description.class*, SVG.glyph.class*
    glyph = element glyph { attlist.glyph, SVG.glyph.content }
    attlist.glyph &=
        SVG.Core.attrib,
        SVG.Style.attrib,
        SVG.Presentation.attrib,
        attribute unicode { text }?,
        attribute glyph-name { text }?,
        attribute d { PathData.datatype }?,
        attribute orientation { text }?,
        attribute arabic-form { text }?,
        attribute lang { LanguageCodes.datatype }?,
        attribute horiz-adv-x { Number.datatype }?,
        attribute vert-origin-x { Number.datatype }?,
        attribute vert-origin-y { Number.datatype }?,
        attribute vert-adv-y { Number.datatype }?
    a:documentation [
        "\x{a}" ~
        "    missing-glyph: Missing Glyph Element\x{a}" ~
        "  "
    ]
    SVG.missing-glyph.class = notAllowed
    SVG.missing-glyph.content =
        SVG.Description.class*, SVG.missing-glyph.class*
    missing-glyph =
        element missing-glyph {
            attlist.missing-glyph, SVG.missing-glyph.content
        }
    attlist.missing-glyph &=
        SVG.Core.attrib,
        SVG.Style.attrib,
        SVG.Presentation.attrib,
        attribute d { PathData.datatype }?,
        attribute horiz-adv-x { Number.datatype }?,
        attribute vert-origin-x { Number.datatype }?,
        attribute vert-origin-y { Number.datatype }?,
        attribute vert-adv-y { Number.datatype }?
    a:documentation [
        "\x{a}" ~
        "    hkern: Horizontal Kerning Element\x{a}" ~
        "  "
    ]
    SVG.hkern.content = empty
    hkern = element hkern { attlist.hkern, SVG.hkern.content }
    attlist.hkern &=
        SVG.Core.attrib,
        attribute u1 { text }?,
        attribute g1 { text }?,
        attribute u2 { text }?,
        attribute g2 { text }?,
        attribute k { Number.datatype }
    a:documentation [
        "\x{a}" ~
        "    vkern: Vertical Kerning Element\x{a}" ~
        "  "
    ]
    SVG.vkern.content = empty
    vkern = element vkern { attlist.vkern, SVG.vkern.content }
    attlist.vkern &=
        SVG.Core.attrib,
        attribute u1 { text }?,
        attribute g1 { text }?,
        attribute u2 { text }?,
        attribute g2 { text }?,
        attribute k { Number.datatype }
    a:documentation [
        "\x{a}" ~
        "    font-face-src: Font Face Source Element\x{a}" ~
        "  "
    ]
    SVG.font-face-src.content = (font-face-uri | font-face-name)+
    font-face-src =
        element font-face-src {
            attlist.font-face-src, SVG.font-face-src.content
        }
    attlist.font-face-src &= SVG.Core.attrib
    a:documentation [
        "\x{a}" ~
        "    font-face-uri: Font Face URI Element\x{a}" ~
        "  "
    ]
    SVG.font-face-uri.content = empty
    font-face-uri =
        element font-face-uri {
            attlist.font-face-uri, SVG.font-face-uri.content
        }
    attlist.font-face-uri &= SVG.Core.attrib, SVG.XLinkRequired.attrib
    a:documentation [
        "\x{a}" ~
        "    font-face-name: Font Face Name Element\x{a}" ~
        "  "
    ]
    SVG.font-face-name.content = empty
    font-face-name =
        element font-face-name {
            attlist.font-face-name, SVG.font-face-name.content
        }
    attlist.font-face-name &=
        SVG.Core.attrib,
        attribute name { text }?
}