From Code to Community: Sponsoring The Perl and Raku Conference 2025 Learn more

default namespace = "http://www.w3.org/2000/svg"
##
## SVG 1.1 Basic Text Module
## file: svg-basic-text.rng
##
## This is SVG, a language for describing two-dimensional graphics in XML.
## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved.
##
## $Id: svg-basic-text.rng,v 1.1 2003/07/15 07:11:10 dean Exp $
##
##
## Basic Text
##
## text, altGlyph, altGlyphDef, glyphRef
##
## This module declares markup to provide support for text.
##
##
## Datatypes
##
[ xml:lang = "en" ]
grammar {
FontFamilyValue.datatype = xsd:string
FontSizeValue.datatype = xsd:string
a:documentation [ "\x{a}" ~ " SVG.Font.attrib\x{a}" ~ " " ]
SVG.Font.extra.attrib = empty
SVG.Font.attrib &=
attribute font-family { FontFamilyValue.datatype }?,
attribute font-size { FontSizeValue.datatype }?,
attribute font-style {
"normal" | "italic" | "oblique" | "inherit"
}?,
attribute font-weight {
"normal"
| "bold"
| "bolder"
| "lighter"
| "100"
| "200"
| "300"
| "400"
| "500"
| "600"
| "700"
| "800"
| "900"
| "inherit"
}?,
SVG.Font.extra.attrib
a:documentation [ "\x{a}" ~ " SVG.Text.class\x{a}" ~ " " ]
SVG.Text.extra.class = notAllowed
SVG.Text.class |= \text | SVG.Text.extra.class
a:documentation [ "\x{a}" ~ " SVG.TextContent.class\x{a}" ~ " " ]
SVG.TextContent.extra.class = notAllowed
SVG.TextContent.class = altGlyph | SVG.TextContent.extra.class
a:documentation [ "\x{a}" ~ " text: Text Element\x{a}" ~ " " ]
SVG.text.class =
text
| SVG.Description.class
| SVG.Animation.class
| # <ref name="SVG.TextContent.extra.class"/>
SVG.Hyperlink.class
SVG.text.content = SVG.text.class*
\text = element text { attlist.text, SVG.text.content }
attlist.text &=
SVG.Core.attrib,
SVG.Conditional.attrib,
SVG.Style.attrib,
SVG.Font.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,
attribute x { Coordinates.datatype }?,
attribute y { Coordinates.datatype }?,
attribute rotate { Numbers.datatype }?,
attribute transform { TransformList.datatype }?
a:documentation [
"\x{a}" ~
" altGlyph: Alternate Glyph Element\x{a}" ~
" "
]
SVG.altGlyph.content = text
altGlyph = element altGlyph { attlist.altGlyph, SVG.altGlyph.content }
attlist.altGlyph &=
SVG.Core.attrib,
SVG.Conditional.attrib,
SVG.Style.attrib,
SVG.Font.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.XLink.attrib,
SVG.External.attrib,
attribute glyphRef { text }?,
attribute format { text }?
a:documentation [
"\x{a}" ~
" altGlyphDef: Alternate Glyph Definition Element\x{a}" ~
" "
]
SVG.altGlyphDef.content = glyphRef+
altGlyphDef =
element altGlyphDef { attlist.altGlyphDef, SVG.altGlyphDef.content }
attlist.altGlyphDef &= SVG.Core.attrib
a:documentation [
"\x{a}" ~
" glyphRef: Glyph Reference Element\x{a}" ~
" "
]
SVG.glyphRef.content = empty
glyphRef = element glyphRef { attlist.glyphRef, SVG.glyphRef.content }
attlist.glyphRef &=
SVG.Core.attrib,
SVG.Style.attrib,
SVG.Font.attrib,
SVG.XLink.attrib,
attribute glyphRef { text }?,
attribute format { text }?
}