Browsable Scalable Vector Graphics (SVG) Grammar

CC-BY

Grammar extracted by Vadim Zaytsev, see the Grammar Zoo entry for details: markup/graphical/svg/palies/extracted
Source used for this grammar: Jean Paliès, (A subset of) Scalable Vector Graphics 1.1, SVG.ecore, 2005/04/07

Summary

Syntax

Element ::=
	StructuralElement
Element ::=
	GraphicalElement
StructuralElement ::=
	Image
StructuralElement ::=
	Svg
StructuralElement ::=
	GroupingElement
StructuralElement ::=
	Use
Image ::=
	[referee]::ReferencedFile+
Svg ::=
	[owner_SVG]::SvgFile+ [children]::Element+ [namespace]::String [version]::String [baseProfile]::String
GroupingElement ::=
	G
GroupingElement ::=
	Defs
GroupingElement ::=
	Symbol
G ::=
	[name]::String
Defs ::=
	[groupContent]::Element+
Symbol ::=
	[groupContent]::Element+
Use ::=
	[use]::Element+
GraphicalElement ::=
	Shape
GraphicalElement ::=
	TextElement
Shape ::=
	Rect
Shape ::=
	Circle
Shape ::=
	Ellipse
Shape ::=
	Line
Shape ::=
	Polyline
Shape ::=
	Polygon
Shape ::=
	Path
Shape ::=
	Point
Shape ::=
	Marker
TextElement ::=
	Text
TextElement ::=
	Tspan
TextElement ::=
	Tref
Rect ::=
	[rx]::Double [ry]::Double
Circle ::=
	ε
Ellipse ::=
	ε
Line ::=
	[between]::Point [markerEnd]::String [markerStart]::String
Polyline ::=
	[waypoints]::Point+ [strokeDashArray]::String [markerEnd]::String [markerStart]::String
Polygon ::=
	[waypoints]::Point+ [markerEnd]::String [markerStart]::String
Path ::=
	[pathLength]::Double [d]::String [markerEnd]::String [markerStart]::String
Point ::=
	ε
Marker ::=
	[markerUnits]::String [refX]::Double [refY]::Double [markerWidth]::Double [markerHeight]::Double [orient]::String [drawing]::Element+
Text ::=
	[lengthAdjust]::String [content]::String
Tspan ::=
	[content]::String
Tref ::=
	[xlinkHref]::TextElement
Attribute ::=
	Transform
Attribute ::=
	Visibility
Attribute ::=
	FontWeight
Attribute ::=
	FontStyle
Transform ::=
	Scale
Transform ::=
	Translate
Transform ::=
	Rotate
Scale ::=
	[sx]::Double [sy]::Double
Translate ::=
	[tx]::Double [ty]::Double
Rotate ::=
	[angle]::Double [cx]::Double [cy]::Double
Visibility ::=
	[visible]::Boolean
FontWeight ::=
	[bold]::Boolean
FontStyle ::=
	[italic]::Boolean
Dimension ::=
	[width]::Double [height]::Double
Coordinates ::=
	RelativeCoord
Coordinates ::=
	AbsoluteCoord
RelativeCoord ::=
	[x]::Double [y]::Double
AbsoluteCoord ::=
	[x]::Double [y]::Double
ReferencedFile ::=
	SvgFile
SvgFile ::=
	[tag]::Svg [elements]::Element+
Boolean ::=
	"true"
	"false"
Integer ::=
	integer
String ::=
	string

GrammarLabMaintained by Dr. Vadim Zaytsev a.k.a. @grammarware. Last updated in September 2015. []