Module Svg_types

module Svg_types : sig..end

SVG types with variants, goes with Svg_sigs.​T.


This module defines basic data types for data, attributes and element occuring in SVG documents. It is based on the specification available at http://www.w3.org/TR/SVG/.

This module is experimental, it may lack of some attributes, and the interface is very low level and do not take deeply into account the needs of SVG elements.

Categories of elements and attributes

This part defines the categories of elements and attributes

Elements

type animation_element = 
  [ `Animate | `AnimateColor | `AnimateMotion | `AnimateTransform | `Set ]
type descriptive_element = [ `Desc | `Metadata | `Title ]
type basic_shape_element = [ `Circle | `Ellipse | `Line | `Polygon | `Polyline | `Rect ]
type container_element = 
  [ `A
  | `Defs
  | `G
  | `Glyph
  | `Marker
  | `Mask
  | `Missing_glyph
  | `Pattern
  | `Svg
  | `Switch
  | `Symbol ]
type filter_primitive_element = 
  [ `FeBlend
  | `FeColorMatrix
  | `FeComponentTransfer
  | `FeComposite
  | `FeConvolveMatrix
  | `FeDiffuseLighting
  | `FeDisplacementMap
  | `FeFlood
  | `FeGaussianBlur
  | `FeImage
  | `FeMerge
  | `FeMorphology
  | `FeOffset
  | `FeSpecularLighting
  | `FeTile
  | `FeTurbulence ]
type light_source_element = [ `FeDistantLight | `FePointLight | `FeSpotLight ]
type shape_element = 
  [ `Circle | `Ellipse | `Line | `Path | `Polygon | `Polyline | `Rect ]
type structural_element = [ `Defs | `G | `Svg | `Symbol | `Use ]
type text_content_element = [ `AltGlyph | `Text | `TextPath | `Tref | `Tspan ]
type text_content_child_element = [ `AltGlyph | `TextPath | `Tref | `Tspan ]
type gradient_element = [ `Lineargradient | `Radialgradient ]
type graphics_element = 
  [ `Circle
  | `Ellipse
  | `Image
  | `Line
  | `Path
  | `Polygon
  | `Polyline
  | `Rect
  | `Text
  | `Use ]
type graphics_ref_element = [ `Image | `Use ]

Attributes

type conditional_processing_attr = [ `RequiredExtensions | `RequiredFeatures | `SystemLanguage ]
type core_attr = [ `Id | `Xml_base | `Xml_lang | `Xml_space ]
type transfer_attr = 
  [ `Amplitude
  | `Exponent
  | `Intercept
  | `Offset_transfer
  | `Slope
  | `TableValues
  | `Type_transfert ]
type document_event_attr = 
  [ `OnAbort | `OnError | `OnResize | `OnScroll | `OnUnload | `OnZoom ]
type filter_primitive_attr = [ `Height | `Result | `Width | `X | `Y ]
type animation_event_attr = [ `OnBegin | `OnEnd | `OnLoad | `OnRepeat ]
type animation_attr_target_attr = [ `AttributeName | `AttributeType ]
type animation_timing_attr = 
  [ `Begin
  | `Dur
  | `End
  | `Fill_Animation
  | `Max
  | `Min
  | `RepeatCount
  | `RepeatDur
  | `Restart ]
type animation_value_attr = 
  [ `By
  | `CalcMode
  | `From
  | `KeySplines
  | `KeyTimes
  | `To
  | `Valuesanim ]
type animation_addition_attr = [ `Accumulate | `Additive ]
type presentation_attr = 
  [ `Alignment_Baseline
  | `Baseline_Shift
  | `Clip
  | `Clip_Path
  | `Clip_Rule
  | `Color
  | `Color_Interpolation
  | `Color_interpolation_filters
  | `Color_profile
  | `Color_rendering
  | `Cursor
  | `Direction
  | `Display
  | `Dominant_Baseline
  | `Enable_background
  | `Fill
  | `Fill_opacity
  | `Fill_rule
  | `Filter
  | `Flood_Color
  | `Flood_Opacity
  | `Font_Family
  | `Font_Size
  | `Font_Size_Adjust
  | `Font_Stretch
  | `Font_Style
  | `Font_Variant
  | `Font_Weight
  | `Glyph_Orientation_Horizontal
  | `Glyph_Orientation_Vertical
  | `Image_Rendering
  | `Kerning
  | `Letter_Spacing
  | `Lighting_Color
  | `Marker_End
  | `Marker_Mid
  | `Marker_Start
  | `Mask
  | `Opacity
  | `Overflow
  | `Pointer_Events
  | `Shape_Rendering
  | `Stop_Color
  | `Stop_Opacity
  | `Stroke
  | `Stroke_Dasharray
  | `Stroke_Dashoffset
  | `Stroke_Linecap
  | `Stroke_Linejoin
  | `Stroke_Miterlimit
  | `Stroke_Opacity
  | `Stroke_Width
  | `Text_Anchor
  | `Text_Decoration
  | `Text_Rendering
  | `Unicode_Bidi
  | `Visibility
  | `Word_Spacing
  | `Writing_Mode ]
type graphical_event_attr = 
  [ `OnActivate
  | `OnClick
  | `OnFocusIn
  | `OnFocusOut
  | `OnLoad
  | `OnMouseDown
  | `OnMouseMove
  | `OnMouseOut
  | `OnMouseOver
  | `OnMouseUp ]

Generic data types

type iri = string

An IRI reference is an Internationalized Resource Identifier with an optional fragment identifier, as defined in Internationalized Resource Identifiers RFC3987. An IRI reference serves as a reference to a resource or (with a fragment identifier) to a secondary resource. See References and the ‘defs’ element..

Units

module Unit : sig..end

SVG defines several units to measure time, length, angles.

type coord = Unit.length
type number = float
type number_optional_number = number * number option
type percentage = float
type strings = string list
type color = string
type icccolor = string
type paint_whitout_icc = 
  [ `Color of color * icccolor option
  | `CurrentColor
  | `None ]
type paint = 
  [ `Color of color * icccolor option
  | `CurrentColor
  | `Icc of iri * paint_whitout_icc option
  | `None ]
type transform = 
  [ `Matrix of float * float * float * float * float * float
  | `Rotate of Unit.angle * (float * float) option
  | `Scale of float * float option
  | `SkewX of Unit.angle
  | `SkewY of Unit.angle
  | `Translate of float * float option ]
type spacestrings = string list
type commastrings = string list
type transforms = transform list
type fourfloats = float * float * float * float
type lengths = Unit.length list
type numbers = float list
type numbers_semicolon = float list
type coords = (float * float) list
type rotate = float list
type pcdata = [ `PCDATA ]

Element

type svg = [ `Svg ]
type svg_content = 
  [ `A
  | `AltGlyphDef
  | `Animate
  | `AnimateColor
  | `AnimateMotion
  | `AnimateTransform
  | `Circle
  | `ClipPath
  | `Color_Profile
  | `Cursor
  | `Defs
  | `Desc
  | `Ellipse
  | `Filter
  | `Font
  | `Font_Face
  | `ForeignObject
  | `G
  | `Image
  | `Line
  | `Lineargradient
  | `Marker
  | `Mask
  | `Metadata
  | `Path
  | `Pattern
  | `Polygon
  | `Polyline
  | `Radialgradient
  | `Rect
  | `Script
  | `Set
  | `Style
  | `Svg
  | `Switch
  | `Symbol
  | `Text
  | `Title
  | `Use
  | `View ]
type svg_attr = 
  [ `Alignment_Baseline
  | `BaseProfile
  | `Baseline_Shift
  | `Class
  | `Clip
  | `Clip_Path
  | `Clip_Rule
  | `Color
  | `Color_Interpolation
  | `Color_interpolation_filters
  | `Color_profile
  | `Color_rendering
  | `ContentScriptType
  | `ContentStyleType
  | `Cursor
  | `Direction
  | `Display
  | `Dominant_Baseline
  | `Enable_background
  | `ExternalResourcesRequired
  | `Fill
  | `Fill_opacity
  | `Fill_rule
  | `Filter
  | `Flood_Color
  | `Flood_Opacity
  | `Font_Family
  | `Font_Size
  | `Font_Size_Adjust
  | `Font_Stretch
  | `Font_Style
  | `Font_Variant
  | `Font_Weight
  | `Glyph_Orientation_Horizontal
  | `Glyph_Orientation_Vertical
  | `Height
  | `Id
  | `Image_Rendering
  | `Kerning
  | `Letter_Spacing
  | `Lighting_Color
  | `Marker_End
  | `Marker_Mid
  | `Marker_Start
  | `Mask
  | `OnAbort
  | `OnActivate
  | `OnClick
  | `OnError
  | `OnFocusIn
  | `OnFocusOut
  | `OnLoad
  | `OnMouseDown
  | `OnMouseMove
  | `OnMouseOut
  | `OnMouseOver
  | `OnMouseUp
  | `OnResize
  | `OnScroll
  | `OnUnload
  | `OnZoom
  | `Opacity
  | `Overflow
  | `Pointer_Events
  | `PreserveAspectRatio
  | `RequiredExtensions
  | `RequiredFeatures
  | `Shape_Rendering
  | `Stop_Color
  | `Stop_Opacity
  | `Stroke
  | `Stroke_Dasharray
  | `Stroke_Dashoffset
  | `Stroke_Linecap
  | `Stroke_Linejoin
  | `Stroke_Miterlimit
  | `Stroke_Opacity
  | `Stroke_Width
  | `Style
  | `SystemLanguage
  | `Text_Anchor
  | `Text_Decoration
  | `Text_Rendering
  | `Unicode_Bidi
  | `Version
  | `ViewBox
  | `Visibility
  | `Width
  | `Word_Spacing
  | `Writing_Mode
  | `X
  | `Xml_base
  | `Xml_lang
  | `Xml_space
  | `Y
  | `ZoomAndPlan ]
type g = [ `G ]
type g_content = 
  [ `A
  | `AltGlyphDef
  | `Animate
  | `AnimateColor
  | `AnimateMotion
  | `AnimateTransform
  | `Circle
  | `ClipPath
  | `Color_Profile
  | `Cursor
  | `Defs
  | `Desc
  | `Ellipse
  | `Filter
  | `Font
  | `Font_Face
  | `ForeignObject
  | `G
  | `Image
  | `Line
  | `Lineargradient
  | `Marker
  | `Mask
  | `Metadata
  | `Path
  | `Pattern
  | `Polygon
  | `Polyline
  | `Radialgradient
  | `Rect
  | `Script
  | `Set
  | `Style
  | `Svg
  | `Switch
  | `Symbol
  | `Text
  | `Title
  | `Use
  | `View ]
type g_attr = 
  [ `Alignment_Baseline
  | `Baseline_Shift
  | `Class
  | `Clip
  | `Clip_Path
  | `Clip_Rule
  | `Color
  | `Color_Interpolation
  | `Color_interpolation_filters
  | `Color_profile
  | `Color_rendering
  | `Cursor
  | `Direction
  | `Display
  | `Dominant_Baseline
  | `Enable_background
  | `ExternalResourcesRequired
  | `Fill
  | `Fill_opacity
  | `Fill_rule
  | `Filter
  | `Flood_Color
  | `Flood_Opacity
  | `Font_Family
  | `Font_Size
  | `Font_Size_Adjust
  | `Font_Stretch
  | `Font_Style
  | `Font_Variant
  | `Font_Weight
  | `Glyph_Orientation_Horizontal
  | `Glyph_Orientation_Vertical
  | `Id
  | `Image_Rendering
  | `Kerning
  | `Letter_Spacing
  | `Lighting_Color
  | `Marker_End
  | `Marker_Mid
  | `Marker_Start
  | `Mask
  | `OnActivate
  | `OnClick
  | `OnFocusIn
  | `OnFocusOut
  | `OnLoad
  | `OnMouseDown
  | `OnMouseMove
  | `OnMouseOut
  | `OnMouseOver
  | `OnMouseUp
  | `Opacity
  | `Overflow
  | `Pointer_Events
  | `RequiredExtensions
  | `RequiredFeatures
  | `Shape_Rendering
  | `Stop_Color
  | `Stop_Opacity
  | `Stroke
  | `Stroke_Dasharray
  | `Stroke_Dashoffset
  | `Stroke_Linecap
  | `Stroke_Linejoin
  | `Stroke_Miterlimit
  | `Stroke_Opacity
  | `Stroke_Width
  | `Style
  | `SystemLanguage
  | `Text_Anchor
  | `Text_Decoration
  | `Text_Rendering
  | `Transform
  | `Unicode_Bidi
  | `Visibility
  | `Word_Spacing
  | `Writing_Mode
  | `Xml_base
  | `Xml_lang
  | `Xml_space ]
type defs = [ `Defs ]
type defs_content = 
  [ `A
  | `AltGlyphDef
  | `Animate
  | `AnimateColor
  | `AnimateMotion
  | `AnimateTransform
  | `Circle
  | `ClipPath
  | `Color_Profile
  | `Cursor
  | `Defs
  | `Desc
  | `Ellipse
  | `Filter
  | `Font
  | `Font_Face
  | `ForeignObject
  | `G
  | `Image
  | `Line
  | `Lineargradient
  | `Marker
  | `Mask
  | `Metadata
  | `Path
  | `Pattern
  | `Polygon
  | `Polyline
  | `Radialgradient
  | `Rect
  | `Script
  | `Set
  | `Style
  | `Svg
  | `Switch
  | `Symbol
  | `Text
  | `Title
  | `Use
  | `View ]
type defs_attr = 
  [ `Alignment_Baseline
  | `Baseline_Shift
  | `Class
  | `Clip
  | `Clip_Path
  | `Clip_Rule
  | `Color
  | `Color_Interpolation
  | `Color_interpolation_filters
  | `Color_profile
  | `Color_rendering
  | `Cursor
  | `Direction
  | `Display
  | `Dominant_Baseline
  | `Enable_background
  | `ExternalResourcesRequired
  | `Fill
  | `Fill_opacity
  | `Fill_rule
  | `Filter
  | `Flood_Color
  | `Flood_Opacity
  | `Font_Family
  | `Font_Size
  | `Font_Size_Adjust
  | `Font_Stretch
  | `Font_Style
  | `Font_Variant
  | `Font_Weight
  | `Glyph_Orientation_Horizontal
  | `Glyph_Orientation_Vertical
  | `Id
  | `Image_Rendering
  | `Kerning
  | `Letter_Spacing
  | `Lighting_Color
  | `Marker_End
  | `Marker_Mid
  | `Marker_Start
  | `Mask
  | `OnActivate
  | `OnClick
  | `OnFocusIn
  | `OnFocusOut
  | `OnLoad
  | `OnMouseDown
  | `OnMouseMove
  | `OnMouseOut
  | `OnMouseOver
  | `OnMouseUp
  | `Opacity
  | `Overflow
  | `Pointer_Events
  | `RequiredExtensions
  | `RequiredFeatures
  | `Shape_Rendering
  | `Stop_Color
  | `Stop_Opacity
  | `Stroke
  | `Stroke_Dasharray
  | `Stroke_Dashoffset
  | `Stroke_Linecap
  | `Stroke_Linejoin
  | `Stroke_Miterlimit
  | `Stroke_Opacity
  | `Stroke_Width
  | `Style
  | `SystemLanguage
  | `Text_Anchor
  | `Text_Decoration
  | `Text_Rendering
  | `Transform
  | `Unicode_Bidi
  | `Visibility
  | `Word_Spacing
  | `Writing_Mode
  | `Xml_base
  | `Xml_lang
  | `Xml_space ]
type desc = [ `Desc ]
type desc_content = [ `PCDATA ]
type desc_attr = [ `Class | `Id | `Style | `Xml_base | `Xml_lang | `Xml_space ]
type title = [ `Title ]
type title_content = [ `PCDATA ]
type title_attr = desc_attr
type symbol = [ `Symbol ]
type symbol_content = 
  [ `A
  | `AltGlyphDef
  | `Animate
  | `AnimateColor
  | `AnimateMotion
  | `AnimateTransform
  | `ClipPath
  | `Color_Profile
  | `Cursor
  | `Defs
  | `Desc
  | `Filter
  | `Font
  | `Font_Face
  | `ForeignObject
  | `G
  | `Image
  | `Lineargradient
  | `Marker
  | `Mask
  | `Metadata
  | `Pattern
  | `Radialgradient
  | `Script
  | `Set
  | `Style
  | `Svg
  | `Switch
  | `Symbol
  | `Text
  | `Title
  | `Use
  | `View ]
type symbol_attr = 
  [ `Class
  | `ExternalResourcesRequired
  | `PreserveAspectRatio
  | `Style
  | `ViewBox ]
type use = [ `Use ]
type use_content = 
  [ `Animate
  | `AnimateColor
  | `AnimateMotion
  | `AnimateTransform
  | `Desc
  | `Metadata
  | `Set
  | `Title ]
type use_attr = 
  [ `Alignment_Baseline
  | `Baseline_Shift
  | `Class
  | `Clip
  | `Clip_Path
  | `Clip_Rule
  | `Color
  | `Color_Interpolation
  | `Color_interpolation_filters
  | `Color_profile
  | `Color_rendering
  | `Cursor
  | `Direction
  | `Display
  | `Dominant_Baseline
  | `Enable_background
  | `ExternalResourcesRequired
  | `Fill
  | `Fill_opacity
  | `Fill_rule
  | `Filter
  | `Flood_Color
  | `Flood_Opacity
  | `Font_Family
  | `Font_Size
  | `Font_Size_Adjust
  | `Font_Stretch
  | `Font_Style
  | `Font_Variant
  | `Font_Weight
  | `Glyph_Orientation_Horizontal
  | `Glyph_Orientation_Vertical
  | `Height
  | `Id
  | `Image_Rendering
  | `Kerning
  | `Letter_Spacing
  | `Lighting_Color
  | `Marker_End
  | `Marker_Mid
  | `Marker_Start
  | `Mask
  | `OnActivate
  | `OnClick
  | `OnFocusIn
  | `OnFocusOut
  | `OnLoad
  | `OnMouseDown
  | `OnMouseMove
  | `OnMouseOut
  | `OnMouseOver
  | `OnMouseUp
  | `Opacity
  | `Overflow
  | `Pointer_Events
  | `RequiredExtensions
  | `RequiredFeatures
  | `Shape_Rendering
  | `Stop_Color
  | `Stop_Opacity
  | `Stroke
  | `Stroke_Dasharray
  | `Stroke_Dashoffset
  | `Stroke_Linecap
  | `Stroke_Linejoin
  | `Stroke_Miterlimit
  | `Stroke_Opacity
  | `Stroke_Width
  | `Style
  | `SystemLanguage
  | `Text_Anchor
  | `Text_Decoration
  | `Text_Rendering
  | `Transform
  | `Unicode_Bidi
  | `Visibility
  | `Width
  | `Word_Spacing
  | `Writing_Mode
  | `X
  | `Xlink_actuate
  | `Xlink_arcrole
  | `Xlink_href
  | `Xlink_role
  | `Xlink_show
  | `Xlink_title
  | `Xlink_type
  | `Xml_base
  | `Xml_lang
  | `Xml_space
  | `Y ]
type image = [ `Image ]
type image_content = 
  [ `Animate
  | `AnimateColor
  | `AnimateMotion
  | `AnimateTransform
  | `Desc
  | `Metadata
  | `Set
  | `Title ]
type image_attr = 
  [ `Alignment_Baseline
  | `Baseline_Shift
  | `Class
  | `Clip
  | `Clip_Path
  | `Clip_Rule
  | `Color
  | `Color_Interpolation
  | `Color_interpolation_filters
  | `Color_profile
  | `Color_rendering
  | `Cursor
  | `Direction
  | `Display
  | `Dominant_Baseline
  | `Enable_background
  | `ExternalResourcesRequired
  | `Fill
  | `Fill_opacity
  | `Fill_rule
  | `Filter
  | `Flood_Color
  | `Flood_Opacity
  | `Font_Family
  | `Font_Size
  | `Font_Size_Adjust
  | `Font_Stretch
  | `Font_Style
  | `Font_Variant
  | `Font_Weight
  | `Glyph_Orientation_Horizontal
  | `Glyph_Orientation_Vertical
  | `Height
  | `Id
  | `Image_Rendering
  | `Kerning
  | `Letter_Spacing
  | `Lighting_Color
  | `Marker_End
  | `Marker_Mid
  | `Marker_Start
  | `Mask
  | `OnActivate
  | `OnClick
  | `OnFocusIn
  | `OnFocusOut
  | `OnLoad
  | `OnMouseDown
  | `OnMouseMove
  | `OnMouseOut
  | `OnMouseOver
  | `OnMouseUp
  | `Opacity
  | `Overflow
  | `Pointer_Events
  | `PreserveAspectRatio
  | `RequiredExtensions
  | `RequiredFeatures
  | `Shape_Rendering
  | `Stop_Color
  | `Stop_Opacity
  | `Stroke
  | `Stroke_Dasharray
  | `Stroke_Dashoffset
  | `Stroke_Linecap
  | `Stroke_Linejoin
  | `Stroke_Miterlimit
  | `Stroke_Opacity
  | `Stroke_Width
  | `Style
  | `SystemLanguage
  | `Text_Anchor
  | `Text_Decoration
  | `Text_Rendering
  | `Transform
  | `Unicode_Bidi
  | `Visibility
  | `Width
  | `Word_Spacing
  | `Writing_Mode
  | `X
  | `Xlink_actuate
  | `Xlink_arcrole
  | `Xlink_href
  | `Xlink_role
  | `Xlink_show
  | `Xlink_title
  | `Xlink_type
  | `Xml_base
  | `Xml_lang
  | `Xml_space
  | `Y ]
type switch = [ `Switch ]
type switch_content = 
  [ `A
  | `Animate
  | `AnimateColor
  | `AnimateMotion
  | `AnimateTransform
  | `Circle
  | `Desc
  | `Ellipse
  | `ForeignObject
  | `G
  | `Image
  | `Line
  | `Metadata
  | `Path
  | `Polygon
  | `Polyline
  | `Rect
  | `Set
  | `Svg
  | `Switch
  | `Text
  | `Title
  | `Use ]
type switch_attr = 
  [ `Alignment_Baseline
  | `Baseline_Shift
  | `Class
  | `Clip
  | `Clip_Path
  | `Clip_Rule
  | `Color
  | `Color_Interpolation
  | `Color_interpolation_filters
  | `Color_profile
  | `Color_rendering
  | `Cursor
  | `Direction
  | `Display
  | `Dominant_Baseline
  | `Enable_background
  | `ExternalResourcesRequired
  | `Fill
  | `Fill_opacity
  | `Fill_rule
  | `Filter
  | `Flood_Color
  | `Flood_Opacity
  | `Font_Family
  | `Font_Size
  | `Font_Size_Adjust
  | `Font_Stretch
  | `Font_Style
  | `Font_Variant
  | `Font_Weight
  | `Glyph_Orientation_Horizontal
  | `Glyph_Orientation_Vertical
  | `Id
  | `Image_Rendering
  | `Kerning
  | `Letter_Spacing
  | `Lighting_Color
  | `Marker_End
  | `Marker_Mid
  | `Marker_Start
  | `Mask
  | `OnActivate
  | `OnClick
  | `OnFocusIn
  | `OnFocusOut
  | `OnLoad
  | `OnMouseDown
  | `OnMouseMove
  | `OnMouseOut
  | `OnMouseOver
  | `OnMouseUp
  | `Opacity
  | `Overflow
  | `Pointer_Events
  | `RequiredExtensions
  | `RequiredFeatures
  | `Shape_Rendering
  | `Stop_Color
  | `Stop_Opacity
  | `Stroke
  | `Stroke_Dasharray
  | `Stroke_Dashoffset
  | `Stroke_Linecap
  | `Stroke_Linejoin
  | `Stroke_Miterlimit
  | `Stroke_Opacity
  | `Stroke_Width
  | `Style
  | `SystemLanguage
  | `Text_Anchor
  | `Text_Decoration
  | `Text_Rendering
  | `Transform
  | `Unicode_Bidi
  | `Visibility
  | `Word_Spacing
  | `Writing_Mode
  | `Xml_base
  | `Xml_lang
  | `Xml_space ]
type style = [ `Style ]
type style_content = [ `PCDATA ]
type style_attr = 
  [ `Id | `Media | `Title | `Type | `Xml_base | `Xml_lang | `Xml_space ]
type path = [ `Path ]
type path_content = 
  [ `Animate
  | `AnimateColor
  | `AnimateMotion
  | `AnimateTransform
  | `Desc
  | `Metadata
  | `Set
  | `Title ]
type path_attr = 
  [ `Alignment_Baseline
  | `Baseline_Shift
  | `Class
  | `Clip
  | `Clip_Path
  | `Clip_Rule
  | `Color
  | `Color_Interpolation
  | `Color_interpolation_filters
  | `Color_profile
  | `Color_rendering
  | `Cursor
  | `D
  | `Direction
  | `Display
  | `Dominant_Baseline
  | `Enable_background
  | `ExternalResourcesRequired
  | `Fill
  | `Fill_opacity
  | `Fill_rule
  | `Filter
  | `Flood_Color
  | `Flood_Opacity
  | `Font_Family
  | `Font_Size
  | `Font_Size_Adjust
  | `Font_Stretch
  | `Font_Style
  | `Font_Variant
  | `Font_Weight
  | `Glyph_Orientation_Horizontal
  | `Glyph_Orientation_Vertical
  | `Id
  | `Image_Rendering
  | `Kerning
  | `Letter_Spacing
  | `Lighting_Color
  | `Marker_End
  | `Marker_Mid
  | `Marker_Start
  | `Mask
  | `OnActivate
  | `OnClick
  | `OnFocusIn
  | `OnFocusOut
  | `OnLoad
  | `OnMouseDown
  | `OnMouseMove
  | `OnMouseOut
  | `OnMouseOver
  | `OnMouseUp
  | `Opacity
  | `Overflow
  | `PathLength
  | `Pointer_Events
  | `RequiredExtensions
  | `RequiredFeatures
  | `Shape_Rendering
  | `Stop_Color
  | `Stop_Opacity
  | `Stroke
  | `Stroke_Dasharray
  | `Stroke_Dashoffset
  | `Stroke_Linecap
  | `Stroke_Linejoin
  | `Stroke_Miterlimit
  | `Stroke_Opacity
  | `Stroke_Width
  | `Style
  | `SystemLanguage
  | `Text_Anchor
  | `Text_Decoration
  | `Text_Rendering
  | `Transform
  | `Unicode_Bidi
  | `Visibility
  | `Word_Spacing
  | `Writing_Mode
  | `Xml_base
  | `Xml_lang
  | `Xml_space ]
type rect = [ `Rect ]
type rect_content = 
  [ `Animate
  | `AnimateColor
  | `AnimateMotion
  | `AnimateTransform
  | `Desc
  | `Metadata
  | `Set
  | `Title ]
type rect_attr = 
  [ `Alignment_Baseline
  | `Baseline_Shift
  | `Class
  | `Clip
  | `Clip_Path
  | `Clip_Rule
  | `Color
  | `Color_Interpolation
  | `Color_interpolation_filters
  | `Color_profile
  | `Color_rendering
  | `Cursor
  | `Direction
  | `Display
  | `Dominant_Baseline
  | `Enable_background
  | `ExternalResourcesRequired
  | `Fill
  | `Fill_opacity
  | `Fill_rule
  | `Filter
  | `Flood_Color
  | `Flood_Opacity
  | `Font_Family
  | `Font_Size
  | `Font_Size_Adjust
  | `Font_Stretch
  | `Font_Style
  | `Font_Variant
  | `Font_Weight
  | `Glyph_Orientation_Horizontal
  | `Glyph_Orientation_Vertical
  | `Height
  | `Id
  | `Image_Rendering
  | `Kerning
  | `Letter_Spacing
  | `Lighting_Color
  | `Marker_End
  | `Marker_Mid
  | `Marker_Start
  | `Mask
  | `OnActivate
  | `OnClick
  | `OnFocusIn
  | `OnFocusOut
  | `OnLoad
  | `OnMouseDown
  | `OnMouseMove
  | `OnMouseOut
  | `OnMouseOver
  | `OnMouseUp
  | `Opacity
  | `Overflow
  | `Pointer_Events
  | `RequiredExtensions
  | `RequiredFeatures
  | `Rx
  | `Ry
  | `Shape_Rendering
  | `Stop_Color
  | `Stop_Opacity
  | `Stroke
  | `Stroke_Dasharray
  | `Stroke_Dashoffset
  | `Stroke_Linecap
  | `Stroke_Linejoin
  | `Stroke_Miterlimit
  | `Stroke_Opacity
  | `Stroke_Width
  | `Style
  | `SystemLanguage
  | `Text_Anchor
  | `Text_Decoration
  | `Text_Rendering
  | `Transform
  | `Unicode_Bidi
  | `Visibility
  | `Width
  | `Word_Spacing
  | `Writing_Mode
  | `X
  | `Xml_base
  | `Xml_lang
  | `Xml_space
  | `Y ]
type circle = [ `Circle ]
type circle_content = 
  [ `Animate
  | `AnimateColor
  | `AnimateMotion
  | `AnimateTransform
  | `Desc
  | `Metadata
  | `Set
  | `Title ]
type circle_attr = 
  [ `Alignment_Baseline
  | `Baseline_Shift
  | `Class
  | `Clip
  | `Clip_Path
  | `Clip_Rule
  | `Color
  | `Color_Interpolation
  | `Color_interpolation_filters
  | `Color_profile
  | `Color_rendering
  | `Cursor
  | `Cx
  | `Cy
  | `Direction
  | `Display
  | `Dominant_Baseline
  | `Enable_background
  | `ExternalResourcesRequired
  | `Fill
  | `Fill_opacity
  | `Fill_rule
  | `Filter
  | `Flood_Color
  | `Flood_Opacity
  | `Font_Family
  | `Font_Size
  | `Font_Size_Adjust
  | `Font_Stretch
  | `Font_Style
  | `Font_Variant
  | `Font_Weight
  | `Glyph_Orientation_Horizontal
  | `Glyph_Orientation_Vertical
  | `Id
  | `Image_Rendering
  | `Kerning
  | `Letter_Spacing
  | `Lighting_Color
  | `Marker_End
  | `Marker_Mid
  | `Marker_Start
  | `Mask
  | `OnActivate
  | `OnClick
  | `OnFocusIn
  | `OnFocusOut
  | `OnLoad
  | `OnMouseDown
  | `OnMouseMove
  | `OnMouseOut
  | `OnMouseOver
  | `OnMouseUp
  | `Opacity
  | `Overflow
  | `Pointer_Events
  | `R
  | `RequiredExtensions
  | `RequiredFeatures
  | `Shape_Rendering
  | `Stop_Color
  | `Stop_Opacity
  | `Stroke
  | `Stroke_Dasharray
  | `Stroke_Dashoffset
  | `Stroke_Linecap
  | `Stroke_Linejoin
  | `Stroke_Miterlimit
  | `Stroke_Opacity
  | `Stroke_Width
  | `Style
  | `SystemLanguage
  | `Text_Anchor
  | `Text_Decoration
  | `Text_Rendering
  | `Transform
  | `Unicode_Bidi
  | `Visibility
  | `Word_Spacing
  | `Writing_Mode
  | `Xml_base
  | `Xml_lang
  | `Xml_space ]
type ellipse = [ `Ellipse ]
type ellipse_content = 
  [ `Animate
  | `AnimateColor
  | `AnimateMotion
  | `AnimateTransform
  | `Desc
  | `Metadata
  | `Set
  | `Title ]
type ellipse_attr = 
  [ `Alignment_Baseline
  | `Baseline_Shift
  | `Class
  | `Clip
  | `Clip_Path
  | `Clip_Rule
  | `Color
  | `Color_Interpolation
  | `Color_interpolation_filters
  | `Color_profile
  | `Color_rendering
  | `Cursor
  | `Cx
  | `Cy
  | `Direction
  | `Display
  | `Dominant_Baseline
  | `Enable_background
  | `ExternalResourcesRequired
  | `Fill
  | `Fill_opacity
  | `Fill_rule
  | `Filter
  | `Flood_Color
  | `Flood_Opacity
  | `Font_Family
  | `Font_Size
  | `Font_Size_Adjust
  | `Font_Stretch
  | `Font_Style
  | `Font_Variant
  | `Font_Weight
  | `Glyph_Orientation_Horizontal
  | `Glyph_Orientation_Vertical
  | `Id
  | `Image_Rendering
  | `Kerning
  | `Letter_Spacing
  | `Lighting_Color
  | `Marker_End
  | `Marker_Mid
  | `Marker_Start
  | `Mask
  | `OnActivate
  | `OnClick
  | `OnFocusIn
  | `OnFocusOut
  | `OnLoad
  | `OnMouseDown
  | `OnMouseMove
  | `OnMouseOut
  | `OnMouseOver
  | `OnMouseUp
  | `Opacity
  | `Overflow
  | `Pointer_Events
  | `RequiredExtensions
  | `RequiredFeatures
  | `Rx
  | `Ry
  | `Shape_Rendering
  | `Stop_Color
  | `Stop_Opacity
  | `Stroke
  | `Stroke_Dasharray
  | `Stroke_Dashoffset
  | `Stroke_Linecap
  | `Stroke_Linejoin
  | `Stroke_Miterlimit
  | `Stroke_Opacity
  | `Stroke_Width
  | `Style
  | `SystemLanguage
  | `Text_Anchor
  | `Text_Decoration
  | `Text_Rendering
  | `Transform
  | `Unicode_Bidi
  | `Visibility
  | `Word_Spacing
  | `Writing_Mode
  | `Xml_base
  | `Xml_lang
  | `Xml_space ]
type line = [ `Line ]
type line_content = 
  [ `Animate
  | `AnimateColor
  | `AnimateMotion
  | `AnimateTransform
  | `Desc
  | `Metadata
  | `Set
  | `Title ]
type line_attr = 
  [ `Alignment_Baseline
  | `Baseline_Shift
  | `Class
  | `Clip
  | `Clip_Path
  | `Clip_Rule
  | `Color
  | `Color_Interpolation
  | `Color_interpolation_filters
  | `Color_profile
  | `Color_rendering
  | `Cursor
  | `Direction
  | `Display
  | `Dominant_Baseline
  | `Enable_background
  | `ExternalResourcesRequired
  | `Fill
  | `Fill_opacity
  | `Fill_rule
  | `Filter
  | `Flood_Color
  | `Flood_Opacity
  | `Font_Family
  | `Font_Size
  | `Font_Size_Adjust
  | `Font_Stretch
  | `Font_Style
  | `Font_Variant
  | `Font_Weight
  | `Glyph_Orientation_Horizontal
  | `Glyph_Orientation_Vertical
  | `Id
  | `Image_Rendering
  | `Kerning
  | `Letter_Spacing
  | `Lighting_Color
  | `Marker_End
  | `Marker_Mid
  | `Marker_Start
  | `Mask
  | `OnActivate
  | `OnClick
  | `OnFocusIn
  | `OnFocusOut
  | `OnLoad
  | `OnMouseDown
  | `OnMouseMove
  | `OnMouseOut
  | `OnMouseOver
  | `OnMouseUp
  | `Opacity
  | `Overflow
  | `Pointer_Events
  | `RequiredExtensions
  | `RequiredFeatures
  | `Shape_Rendering
  | `Stop_Color
  | `Stop_Opacity
  | `Stroke
  | `Stroke_Dasharray
  | `Stroke_Dashoffset
  | `Stroke_Linecap
  | `Stroke_Linejoin
  | `Stroke_Miterlimit
  | `Stroke_Opacity
  | `Stroke_Width
  | `Style
  | `SystemLanguage
  | `Text_Anchor
  | `Text_Decoration
  | `Text_Rendering
  | `Transform
  | `Unicode_Bidi
  | `Visibility
  | `Word_Spacing
  | `Writing_Mode
  | `X1
  | `X2
  | `Xml_base
  | `Xml_lang
  | `Xml_space
  | `Y1
  | `Y2 ]
type polyline = [ `Polyline ]
type polyline_content = 
  [ `Animate
  | `AnimateColor
  | `AnimateMotion
  | `AnimateTransform
  | `Desc
  | `Metadata
  | `Set
  | `Title ]
type polyline_attr = 
  [ `Alignment_Baseline
  | `Baseline_Shift
  | `Class
  | `Clip
  | `Clip_Path
  | `Clip_Rule
  | `Color
  | `Color_Interpolation
  | `Color_interpolation_filters
  | `Color_profile
  | `Color_rendering
  | `Cursor
  | `Direction
  | `Display
  | `Dominant_Baseline
  | `Enable_background
  | `ExternalResourcesRequired
  | `Fill
  | `Fill_opacity
  | `Fill_rule
  | `Filter
  | `Flood_Color
  | `Flood_Opacity
  | `Font_Family
  | `Font_Size
  | `Font_Size_Adjust
  | `Font_Stretc