Module Svg_f.MakeSource

Create a new implementation of Svg, using the given underlying Xml implementation. Will output a module of type Svg_sigs.T with the various type equalities.

If your Xml implementation uses a special function wrapping, use Make_with_wrapped_functions.

Parameters

module Xml : Xml_sigs.T with type ('a, 'b) W.ft = 'a -> 'b

Signature

Sourcetype +'a elt = Xml.elt

SVG elements.

Element constructors are in section Elements. Most elements constructors are either nullary, unary or star, depending on the number of children they accept. Children are usually given as a list of elements. txt is used for text.

The type variable 'a is used to track the element's type. This allows the OCaml typechecker to check SVG validity.

Note that the concrete implementation of this type can vary. See Xml for details.

Sourcetype doc = [ `Svg ] elt

A complete SVG document.

Sourcetype +'a attrib = Xml.attrib

SVG attributes

Attribute constructors are in section Attributes and their name starts with a_. Attributes are given to elements with the ~a optional argument.

Similarly to elt, attributes use the OCaml type system to enforce Html validity.

In some cases, attributes have to be disambiguated. The max attribute has two version, a_fill and a_animation_fill, depending on the element. Such disambiguated attribute will contain the name of the associated element.

Sourcemodule Xml : Xml_sigs.T with type 'a W.t = 'a Xml.W.t with type 'a W.tlist = 'a Xml.W.tlist with type ('a, 'b) W.ft = ('a, 'b) Xml.W.ft with type uri = Xml.uri with type event_handler = Xml.event_handler with type mouse_event_handler = Xml.mouse_event_handler with type keyboard_event_handler = Xml.keyboard_event_handler with type touch_event_handler = Xml.touch_event_handler with type attrib = Xml.attrib with type elt = Xml.elt

Underlying XML data-structure

Sourcetype 'a wrap = 'a Xml.W.t

wrap is a container for elements and values.

In most cases, 'a wrap = 'a. For R modules (in eliom or js_of_ocaml), It will be React.S.t.

Sourcetype 'a list_wrap = 'a Xml.W.tlist

list_wrap is a containre for list of elements.

In most cases, 'a list_wrap = 'a list. For R modules (in eliom or js_of_ocaml), It will be ReactiveData.RList.t.

Sourcetype ('a, 'b) nullary = ?a:'a attrib list -> unit -> 'b elt

A nullary element is an element that doesn't have any children.

Sourcetype ('a, 'b, 'c) unary = ?a:'a attrib list -> 'b elt wrap -> 'c elt

A unary element is an element that has exactly one child.

Sourcetype ('a, 'b, 'c) star = ?a:'a attrib list -> 'b elt list_wrap -> 'c elt

A star element is an element that has any number of children, including zero.

Various information about SVG, such as the doctype, ...

Uri

Sourcetype uri = Xml.uri
Sourceval string_of_uri : (uri, string) Xml.W.ft
Sourceval uri_of_string : (string, uri) Xml.W.ft

Attributes

Sourceval a_version : string wrap -> [> `Version ] attrib
  • deprecated

    Removed in SVG2

Sourceval a_baseProfile : string wrap -> [> `BaseProfile ] attrib
  • deprecated

    Removed in SVG2

Sourceval a_x : Svg_types.coord wrap -> [> `X ] attrib
Sourceval a_y : Svg_types.coord wrap -> [> `Y ] attrib
Sourceval a_width : Svg_types.Unit.length wrap -> [> `Width ] attrib
Sourceval a_height : Svg_types.Unit.length wrap -> [> `Height ] attrib
Sourceval a_preserveAspectRatio : string wrap -> [> `PreserveAspectRatio ] attrib
Sourceval a_crossorigin : [< `Anonymous | `Use_credentials ] wrap -> [> `Crossorigin ] attrib
Sourceval a_decoding : [< `Sync | `Async | `Auto ] wrap -> [> `Decoding ] attrib
Sourceval a_fetchpriority : [< `High | `Low | `Auto ] wrap -> [> `Fetchpriority ] attrib
Sourceval a_contentScriptType : string wrap -> [> `ContentScriptType ] attrib
  • deprecated

    Removed in SVG2

Sourceval a_contentStyleType : string wrap -> [> `ContentStyleType ] attrib
  • deprecated

    Removed in SVG2

Sourceval a_zoomAndPan : [< `Disable | `Magnify ] wrap -> [> `ZoomAndPan ] attrib
  • deprecated

    Removed in SVG2

Sourceval a_href : Xml.uri wrap -> [> `Xlink_href ] attrib
  • deprecated

    Use a_href

Sourceval a_requiredFeatures : Svg_types.spacestrings wrap -> [> `RequiredFeatures ] attrib
  • deprecated

    Removed in SVG2

Sourceval a_requiredExtensions : Svg_types.spacestrings wrap -> [> `RequiredExtensions ] attrib
Sourceval a_systemLanguage : Svg_types.commastrings wrap -> [> `SystemLanguage ] attrib
Sourceval a_externalResourcesRequired : bool wrap -> [> `ExternalResourcesRequired ] attrib
  • deprecated

    Removed in SVG2

Sourceval a_id : string wrap -> [> `Id ] attrib
Sourceval a_user_data : string -> string wrap -> [> `User_data ] attrib
Sourceval a_autofocus : unit -> [> `Autofocus ] attrib

Requests that the element be focused as soon as the document is loaded.

Sourceval a_tabindex : int wrap -> [> `Tabindex ] attrib

Position of the element in the tabbing order.

Sourceval a_lang : string wrap -> [> `Lang ] attrib

Language of the element content. It is a global attribute in SVG 2, whereas SVG 1.1 only allowed it on the glyph element.

Sourceval a_xml_base : Xml.uri wrap -> [> `Xml_base ] attrib
  • deprecated

    Removed in SVG2

Sourceval a_xml_lang : string wrap -> [> `Xml_lang ] attrib
Sourceval a_xml_space : [< `Default | `Preserve ] wrap -> [> `Xml_space ] attrib
  • deprecated

    Use CSS white-space

Sourceval a_type : string wrap -> [> `Type ] attrib
Sourceval a_media : Svg_types.commastrings wrap -> [> `Media ] attrib
Sourceval a_title : string wrap -> [> `Title ] attrib
  • deprecated

    Use a child title element

  • deprecated

    Removed in SVG2

  • deprecated

    Removed in SVG2

  • deprecated

    Removed in SVG2

Sourceval a_class : Svg_types.spacestrings wrap -> [> `Class ] attrib
Sourceval a_style : string wrap -> [> `Style ] attrib

ARIA support

WAI-ARIA attributes are part of SVG 2, and provide additional semantics to improve accessibility.

Sourceval a_role : string list wrap -> [> `Role ] attrib
Sourceval a_aria : string -> string list wrap -> [> `Aria ] attrib

Basic support for WAI-ARIA attributes: a_aria "foo" corresponds to an "aria-foo" attribute.

Sourceval a_transform : Svg_types.transforms wrap -> [> `Transform ] attrib
Sourceval a_viewBox : Svg_types.fourfloats wrap -> [> `ViewBox ] attrib
Sourceval a_d : string wrap -> [> `D ] attrib
Sourceval a_pathLength : float wrap -> [> `PathLength ] attrib
Sourceval a_rx : Svg_types.Unit.length wrap -> [> `Rx ] attrib
Sourceval a_ry : Svg_types.Unit.length wrap -> [> `Ry ] attrib
Sourceval a_cx : Svg_types.Unit.length wrap -> [> `Cx ] attrib
Sourceval a_cy : Svg_types.Unit.length wrap -> [> `Cy ] attrib
Sourceval a_x1 : Svg_types.coord wrap -> [> `X1 ] attrib
Sourceval a_y1 : Svg_types.coord wrap -> [> `Y1 ] attrib
Sourceval a_x2 : Svg_types.coord wrap -> [> `X2 ] attrib
Sourceval a_y2 : Svg_types.coord wrap -> [> `Y2 ] attrib
Sourceval a_points : Svg_types.coords wrap -> [> `Points ] attrib
Sourceval a_x_list : Svg_types.lengths wrap -> [> `X_list ] attrib
Sourceval a_y_list : Svg_types.lengths wrap -> [> `Y_list ] attrib
Sourceval a_dx : Svg_types.number wrap -> [> `Dx ] attrib
Sourceval a_dy : Svg_types.number wrap -> [> `Dy ] attrib
Sourceval a_dx_list : Svg_types.lengths wrap -> [> `Dx_list ] attrib
Sourceval a_dy_list : Svg_types.lengths wrap -> [> `Dy_list ] attrib
Sourceval a_lengthAdjust : [< `Spacing | `SpacingAndGlyphs ] wrap -> [> `LengthAdjust ] attrib
Sourceval a_textLength : Svg_types.Unit.length wrap -> [> `TextLength ] attrib
Sourceval a_text_anchor : [< `Start | `Middle | `End | `Inherit ] wrap -> [> `Text_Anchor ] attrib
Sourceval a_text_decoration : [< `None | `Underline | `Overline | `Line_through | `Blink | `Inherit ] wrap -> [> `Text_Decoration ] attrib
Sourceval a_text_rendering : [< `Auto | `OptimizeSpeed | `OptimizeLegibility | `GeometricPrecision | `Inherit ] wrap -> [> `Text_Rendering ] attrib
Sourceval a_rotate : Svg_types.numbers wrap -> [> `Rotate ] attrib
Sourceval a_startOffset : Svg_types.Unit.length wrap -> [> `StartOffset ] attrib
Sourceval a_method : [< `Align | `Stretch ] wrap -> [> `Method ] attrib
Sourceval a_spacing : [< `Auto | `Exact ] wrap -> [> `Spacing ] attrib
Sourceval a_side : [< `Left | `Right ] wrap -> [> `Side ] attrib

Side of the path a textPath is rendered on. New in SVG 2.

Sourceval a_glyphRef : string wrap -> [> `GlyphRef ] attrib
Sourceval a_format : string wrap -> [> `Format ] attrib
Sourceval a_markerUnits : [< `StrokeWidth | `UserSpaceOnUse ] wrap -> [> `MarkerUnits ] attrib
Sourceval a_refX : Svg_types.coord wrap -> [> `RefX ] attrib
Sourceval a_refY : Svg_types.coord wrap -> [> `RefY ] attrib
Sourceval a_markerWidth : Svg_types.Unit.length wrap -> [> `MarkerWidth ] attrib
Sourceval a_markerHeight : Svg_types.Unit.length wrap -> [> `MarkerHeight ] attrib
Sourceval a_orient : Svg_types.Unit.angle option wrap -> [> `Orient ] attrib
Sourceval a_local : string wrap -> [> `Local ] attrib
Sourceval a_rendering_intent : [< `Auto | `Perceptual | `Relative_colorimetric | `Saturation | `Absolute_colorimetric ] wrap -> [> `Rendering_Intent ] attrib
Sourceval a_gradientUnits : [< `UserSpaceOnUse | `ObjectBoundingBox ] wrap -> [ `GradientUnits ] attrib
Sourceval a_gradientTransform : Svg_types.transforms wrap -> [> `GradientTransform ] attrib
Sourceval a_spreadMethod : [< `Pad | `Reflect | `Repeat ] wrap -> [> `SpreadMethod ] attrib
Sourceval a_fx : Svg_types.coord wrap -> [> `Fx ] attrib
Sourceval a_fy : Svg_types.coord wrap -> [> `Fy ] attrib
Sourceval a_fr : Svg_types.Unit.length wrap -> [> `Fr ] attrib

Radius of the focal circle of a radial gradient. New in SVG 2.

Sourceval a_offset : [< `Number of Svg_types.number | `Percentage of Svg_types.percentage ] wrap -> [> `Offset ] attrib
Sourceval a_patternUnits : [< `UserSpaceOnUse | `ObjectBoundingBox ] wrap -> [> `PatternUnits ] attrib
Sourceval a_patternContentUnits : [< `UserSpaceOnUse | `ObjectBoundingBox ] wrap -> [> `PatternContentUnits ] attrib
Sourceval a_patternTransform : Svg_types.transforms wrap -> [> `PatternTransform ] attrib
Sourceval a_clip_path : Svg_types.iri wrap -> [> `Clip_Path ] attrib
Sourceval a_clipPathUnits : [< `UserSpaceOnUse | `ObjectBoundingBox ] wrap -> [> `ClipPathUnits ] attrib
Sourceval a_maskUnits : [< `UserSpaceOnUse | `ObjectBoundingBox ] wrap -> [> `MaskUnits ] attrib
Sourceval a_maskContentUnits : [< `UserSpaceOnUse | `ObjectBoundingBox ] wrap -> [> `MaskContentUnits ] attrib
Sourceval a_filterUnits : [< `UserSpaceOnUse | `ObjectBoundingBox ] wrap -> [> `FilterUnits ] attrib
Sourceval a_primitiveUnits : [< `UserSpaceOnUse | `ObjectBoundingBox ] wrap -> [> `PrimitiveUnits ] attrib
Sourceval a_filterRes : Svg_types.number_optional_number wrap -> [> `FilterRes ] attrib
  • deprecated

    Removed in SVG2

Sourceval a_result : string wrap -> [> `Result ] attrib
Sourceval a_in : [< `SourceGraphic | `SourceAlpha | `BackgroundImage | `BackgroundAlpha | `FillPaint | `StrokePaint | `Ref of string ] wrap -> [> `In ] attrib
Sourceval a_in2 : [< `SourceGraphic | `SourceAlpha | `BackgroundImage | `BackgroundAlpha | `FillPaint | `StrokePaint | `Ref of string ] wrap -> [> `In2 ] attrib
Sourceval a_azimuth : float wrap -> [> `Azimuth ] attrib
Sourceval a_elevation : float wrap -> [> `Elevation ] attrib
Sourceval a_z : Svg_types.number wrap -> [> `Z ] attrib

The z coordinate of a light source.

Sourceval a_pointsAtX : float wrap -> [> `PointsAtX ] attrib
Sourceval a_pointsAtY : float wrap -> [> `PointsAtY ] attrib
Sourceval a_pointsAtZ : float wrap -> [> `PointsAtZ ] attrib
Sourceval a_specularExponent : float wrap -> [> `SpecularExponent ] attrib
Sourceval a_specularConstant : float wrap -> [> `SpecularConstant ] attrib
Sourceval a_limitingConeAngle : float wrap -> [> `LimitingConeAngle ] attrib
Sourceval a_mode : [< `Normal | `Multiply | `Screen | `Overlay | `Darken | `Lighten | `Color_dodge | `Color_burn | `Hard_light | `Soft_light | `Difference | `Exclusion | `Hue | `Saturation | `Color | `Luminosity ] wrap -> [> `Mode ] attrib

The blend mode of feBlend. SVG 2 allows every CSS compositing blend mode, not only the five modes of SVG 1.1.

Sourceval a_feColorMatrix_type : [< `Matrix | `Saturate | `HueRotate | `LuminanceToAlpha ] wrap -> [> `Typefecolor ] attrib
Sourceval a_values : Svg_types.numbers wrap -> [> `Values ] attrib
Sourceval a_transfer_type : [< `Identity | `Table | `Discrete | `Linear | `Gamma ] wrap -> [> `Type_transfert ] attrib
Sourceval a_tableValues : Svg_types.numbers wrap -> [> `TableValues ] attrib
Sourceval a_intercept : Svg_types.number wrap -> [> `Intercept ] attrib
Sourceval a_amplitude : Svg_types.number wrap -> [> `Amplitude ] attrib
Sourceval a_exponent : Svg_types.number wrap -> [> `Exponent ] attrib
Sourceval a_transfer_offset : Svg_types.number wrap -> [> `Offset_transfer ] attrib
Sourceval a_feComposite_operator : [< `Over | `In | `Out | `Atop | `Xor | `Arithmetic ] wrap -> [> `OperatorComposite ] attrib
Sourceval a_k1 : Svg_types.number wrap -> [> `K1 ] attrib
Sourceval a_k2 : Svg_types.number wrap -> [> `K2 ] attrib
Sourceval a_k3 : Svg_types.number wrap -> [> `K3 ] attrib
Sourceval a_k4 : Svg_types.number wrap -> [> `K4 ] attrib
Sourceval a_kernelMatrix : Svg_types.numbers wrap -> [> `KernelMatrix ] attrib
Sourceval a_divisor : Svg_types.number wrap -> [> `Divisor ] attrib
Sourceval a_bias : Svg_types.number wrap -> [> `Bias ] attrib
Sourceval a_kernelUnitLength : Svg_types.number_optional_number wrap -> [> `KernelUnitLength ] attrib
Sourceval a_targetX : int wrap -> [> `TargetX ] attrib
Sourceval a_targetY : int wrap -> [> `TargetY ] attrib
Sourceval a_edgeMode : [< `Duplicate | `Wrap | `None ] wrap -> [> `EdgeMode ] attrib
Sourceval a_preserveAlpha : bool wrap -> [> `PreserveAlpha ] attrib
Sourceval a_surfaceScale : Svg_types.number wrap -> [> `SurfaceScale ] attrib
Sourceval a_diffuseConstant : Svg_types.number wrap -> [> `DiffuseConstant ] attrib
Sourceval a_scale : Svg_types.number wrap -> [> `Scale ] attrib
Sourceval a_xChannelSelector : [< `R | `G | `B | `A ] wrap -> [> `XChannelSelector ] attrib
Sourceval a_yChannelSelector : [< `R | `G | `B | `A ] wrap -> [> `YChannelSelector ] attrib
Sourceval a_stdDeviation : Svg_types.number_optional_number wrap -> [> `StdDeviation ] attrib
Sourceval a_feMorphology_operator : [< `Erode | `Dilate ] wrap -> [> `OperatorMorphology ] attrib
Sourceval a_radius : Svg_types.number_optional_number wrap -> [> `Radius ] attrib
Sourceval a_baseFrequency : Svg_types.number_optional_number wrap -> [> `BaseFrequency ] attrib
Sourceval a_numOctaves : int wrap -> [> `NumOctaves ] attrib
Sourceval a_seed : Svg_types.number wrap -> [> `Seed ] attrib
Sourceval a_stitchTiles : [< `Stitch | `NoStitch ] wrap -> [> `StitchTiles ] attrib
Sourceval a_feTurbulence_type : [< `FractalNoise | `Turbulence ] wrap -> [> `TypeStitch ] attrib
  • deprecated

    Removed in SVG2

  • deprecated

    Removed in SVG2

Sourceval a_target : string wrap -> [> `Target ] attrib

These attributes apply to the a element, as in HTML.

Sourceval a_download : string option wrap -> [> `Download ] attrib

None downloads the resource under its default name.

Sourceval a_hreflang : string wrap -> [> `Hreflang ] attrib
Sourceval a_ping : Xml.uri list wrap -> [> `Ping ] attrib

Space separated list of URLs to ping when the link is followed.

Sourceval a_referrerpolicy : [< `No_referrer | `No_referrer_when_downgrade | `Origin | `Origin_when_cross_origin | `Same_origin | `Strict_origin | `Strict_origin_when_cross_origin | `Unsafe_url ] wrap -> [> `Referrerpolicy ] attrib
Sourceval a_rel : Svg_types.spacestrings wrap -> [> `Rel ] attrib

Space separated list of link types describing the relationship between the current document and the linked resource.

Sourceval a_viewTarget : string wrap -> [> `ViewTarget ] attrib
  • deprecated

    Removed in SVG2

Sourceval a_attributeName : string wrap -> [> `AttributeName ] attrib
Sourceval a_attributeType : [< `CSS | `XML | `Auto ] wrap -> [> `AttributeType ] attrib
Sourceval a_begin : string wrap -> [> `Begin ] attrib
Sourceval a_dur : string wrap -> [> `Dur ] attrib
Sourceval a_end : string wrap -> [> `End ] attrib
Sourceval a_min : string wrap -> [> `Min ] attrib
Sourceval a_max : string wrap -> [> `Max ] attrib
Sourceval a_restart : [< `Always | `WhenNotActive | `Never ] wrap -> [> `Restart ] attrib
Sourceval a_repeatCount : string wrap -> [> `RepeatCount ] attrib
Sourceval a_repeatDur : string wrap -> [> `RepeatDur ] attrib
Sourceval a_fill : Svg_types.paint wrap -> [> `Fill ] attrib
Sourceval a_animation_fill : [< `Freeze | `Remove ] wrap -> [> `Fill_Animation ] attrib
Sourceval a_fill_rule : Svg_types.fill_rule wrap -> [> `Fill_rule ] attrib
Sourceval a_calcMode : [< `Discrete | `Linear | `Paced | `Spline ] wrap -> [> `CalcMode ] attrib
Sourceval a_animation_values : Svg_types.semicolonstrings wrap -> [> `Valuesanim ] attrib
Sourceval a_keyTimes : Svg_types.semicolonstrings wrap -> [> `KeyTimes ] attrib
Sourceval a_keySplines : Svg_types.semicolonstrings wrap -> [> `KeySplines ] attrib
Sourceval a_from : string wrap -> [> `From ] attrib
Sourceval a_to : string wrap -> [> `To ] attrib
Sourceval a_by : string wrap -> [> `By ] attrib
Sourceval a_additive : [< `Replace | `Sum ] wrap -> [> `Additive ] attrib
Sourceval a_accumulate : [< `None | `Sum ] wrap -> [> `Accumulate ] attrib
Sourceval a_keyPoints : Svg_types.numbers_semicolon wrap -> [> `KeyPoints ] attrib
Sourceval a_origin : string wrap -> [> `Origin ] attrib
Sourceval a_path : string wrap -> [> `Path ] attrib
Sourceval a_animateTransform_type : [ `Translate | `Scale | `Rotate | `SkewX | `SkewY ] wrap -> [ `Typeanimatetransform ] attrib
Sourceval a_horiz_origin_x : Svg_types.number wrap -> [> `HorizOriginX ] attrib
Sourceval a_horiz_origin_y : Svg_types.number wrap -> [> `HorizOriginY ] attrib
Sourceval a_horiz_adv_x : Svg_types.number wrap -> [> `HorizAdvX ] attrib
Sourceval a_vert_origin_x : Svg_types.number wrap -> [> `VertOriginX ] attrib
Sourceval a_vert_origin_y : Svg_types.number wrap -> [> `VertOriginY ] attrib
Sourceval a_vert_adv_y : Svg_types.number wrap -> [> `VertAdvY ] attrib
Sourceval a_unicode : string wrap -> [> `Unicode ] attrib
Sourceval a_glyph_name : string wrap -> [> `GlyphName ] attrib
Sourceval a_orientation : [< `H | `V ] wrap -> [> `Orientation ] attrib
Sourceval a_arabic_form : [< `Initial | `Medial | `Terminal | `Isolated ] wrap -> [> `ArabicForm ] attrib
Sourceval a_u1 : string wrap -> [> `U1 ] attrib
Sourceval a_u2 : string wrap -> [> `U2 ] attrib
Sourceval a_g1 : string wrap -> [> `G1 ] attrib
Sourceval a_g2 : string wrap -> [> `G2 ] attrib
Sourceval a_k : string wrap -> [> `K ] attrib
Sourceval a_font_family : string wrap -> [> `Font_Family ] attrib
Sourceval a_font_style : string wrap -> [> `Font_Style ] attrib
Sourceval a_font_variant : string wrap -> [> `Font_Variant ] attrib
Sourceval a_font_weight : string wrap -> [> `Font_Weight ] attrib
Sourceval a_font_stretch : string wrap -> [> `Font_Stretch ] attrib
Sourceval a_font_size : string wrap -> [> `Font_Size ] attrib
Sourceval a_unicode_range : string wrap -> [> `UnicodeRange ] attrib
Sourceval a_units_per_em : string wrap -> [> `UnitsPerEm ] attrib
Sourceval a_panose_1 : string wrap -> [> `Panose1 ] attrib
Sourceval a_stemv : Svg_types.number wrap -> [> `Stemv ] attrib
Sourceval a_stemh : Svg_types.number wrap -> [> `Stemh ] attrib
Sourceval a_slope : Svg_types.number wrap -> [> `Slope ] attrib
Sourceval a_cap_height : Svg_types.number wrap -> [> `CapHeight ] attrib
Sourceval a_x_height : Svg_types.number wrap -> [> `XHeight ] attrib
Sourceval a_accent_height : Svg_types.number wrap -> [> `AccentHeight ] attrib
Sourceval a_ascent : Svg_types.number wrap -> [> `Ascent ] attrib
Sourceval a_descent : Svg_types.number wrap -> [> `Descent ] attrib
Sourceval a_widths : string wrap -> [> `Widths ] attrib
Sourceval a_bbox : string wrap -> [> `Bbox ] attrib
Sourceval a_ideographic : Svg_types.number wrap -> [> `Ideographic ] attrib
Sourceval a_alphabetic : Svg_types.number wrap -> [> `Alphabetic ] attrib
Sourceval a_mathematical : Svg_types.number wrap -> [> `Mathematical ] attrib
Sourceval a_hanging : Svg_types.number wrap -> [> `Hanging ] attrib
Sourceval a_videographic : Svg_types.number wrap -> [> `VIdeographic ] attrib
Sourceval a_v_alphabetic : Svg_types.number wrap -> [> `VAlphabetic ] attrib
Sourceval a_v_mathematical : Svg_types.number wrap -> [> `VMathematical ] attrib
Sourceval a_v_hanging : Svg_types.number wrap -> [> `VHanging ] attrib
Sourceval a_underline_position : Svg_types.number wrap -> [> `UnderlinePosition ] attrib
Sourceval a_underline_thickness : Svg_types.number wrap -> [> `UnderlineThickness ] attrib
Sourceval a_strikethrough_position : Svg_types.number wrap -> [> `StrikethroughPosition ] attrib
Sourceval a_strikethrough_thickness : Svg_types.number wrap -> [> `StrikethroughThickness ] attrib
Sourceval a_overline_position : Svg_types.number wrap -> [> `OverlinePosition ] attrib
Sourceval a_overline_thickness : Svg_types.number wrap -> [> `OverlineThickness ] attrib
Sourceval a_string : string wrap -> [> `String ] attrib
Sourceval a_name : string wrap -> [> `Name ] attrib
Sourceval a_alignment_baseline : [< `Auto | `Baseline | `Before_edge | `Text_before_edge | `Middle | `Central | `After_edge | `Text_after_edge | `Ideographic | `Alphabetic | `Hanging | `Mathematical | `Text_bottom | `Text_top | `Inherit ] wrap -> [> `Alignment_Baseline ] attrib
Sourceval a_dominant_baseline : [< `Auto | `Use_script | `No_change | `Reset_size | `Ideographic | `Alphabetic | `Hanging | `Mathematical | `Central | `Middle | `Text_after_edge | `Text_before_edge | `Text_bottom | `Text_top | `Inherit ] wrap -> [> `Dominant_Baseline ] attrib
Sourceval a_stop_color : Svg_types.color wrap -> [> `Stop_Color ] attrib
Sourceval a_stop_opacity : Svg_types.number wrap -> [> `Stop_Opacity ] attrib
Sourceval a_stroke : Svg_types.paint wrap -> [> `Stroke ] attrib
Sourceval a_stroke_width : Svg_types.Unit.length wrap -> [> `Stroke_Width ] attrib
Sourceval a_stroke_linecap : [< `Butt | `Round | `Square ] wrap -> [> `Stroke_Linecap ] attrib
Sourceval a_stroke_linejoin : [< `Miter | `Miter_clip | `Round | `Bevel | `Arcs ] wrap -> [> `Stroke_Linejoin ] attrib
Sourceval a_stroke_miterlimit : float wrap -> [> `Stroke_Miterlimit ] attrib
Sourceval a_stroke_dasharray : Svg_types.Unit.length list wrap -> [> `Stroke_Dasharray ] attrib
Sourceval a_stroke_dashoffset : Svg_types.Unit.length wrap -> [> `Stroke_Dashoffset ] attrib
Sourceval a_stroke_opacity : float wrap -> [> `Stroke_Opacity ] attrib
Sourceval a_baseline_shift : string wrap -> [> `Baseline_Shift ] attrib
Sourceval a_clip : string wrap -> [> `Clip ] attrib
Sourceval a_clip_rule : [< `Nonzero | `Evenodd | `Inherit ] wrap -> [> `Clip_Rule ] attrib
Sourceval a_color : Svg_types.color wrap -> [> `Color ] attrib
Sourceval a_color_interpolation : [< `Auto | `SRGB | `LinearRGB | `Inherit ] wrap -> [> `Color_Interpolation ] attrib
Sourceval a_color_interpolation_filters : [< `Auto | `SRGB | `LinearRGB | `Inherit ] wrap -> [> `Color_interpolation_filters ] attrib
Sourceval a_color_profile : string wrap -> [> `Color_profile ] attrib
  • deprecated

    Removed in SVG2

Sourceval a_color_rendering : [< `Auto | `OptimizeSpeed | `OptimizeQuality | `Inherit ] wrap -> [> `Color_rendering ] attrib
Sourceval a_cursor : string wrap -> [> `Cursor ] attrib
Sourceval a_direction : [< `Ltr | `Rtl | `Inherit ] wrap -> [> `Direction ] attrib
Sourceval a_display : string wrap -> [> `Display ] attrib
Sourceval a_enable_background : [< `Accumulate | `New | `Inherit ] wrap -> [> `Enable_background ] attrib
  • deprecated

    Removed in SVG2

Sourceval a_fill_opacity : Svg_types.number wrap -> [> `Fill_opacity ] attrib
Sourceval a_filter : string wrap -> [> `Filter ] attrib
Sourceval a_flood_color : Svg_types.color wrap -> [> `Flood_Color ] attrib
Sourceval a_flood_opacity : Svg_types.number wrap -> [> `Flood_Opacity ] attrib
Sourceval a_font_size_adjust : string wrap -> [> `Font_Size_Adjust ] attrib
Sourceval a_glyph_orientation_horizontal : string wrap -> [> `Glyph_Orientation_Horizontal ] attrib
  • deprecated

    Removed in SVG2

Sourceval a_glyph_orientation_vertical : string wrap -> [> `Glyph_Orientation_Vertical ] attrib
  • deprecated

    Removed in SVG2

Sourceval a_image_rendering : [< `Auto | `OptimizeSpeed | `OptimizeQuality | `Inherit ] wrap -> [> `Image_Rendering ] attrib
Sourceval a_kerning : string wrap -> [> `Kerning ] attrib
  • deprecated

    Removed in SVG2, use CSS font-kerning

Sourceval a_letter_spacing : string wrap -> [> `Letter_Spacing ] attrib
Sourceval a_lighting_color : Svg_types.color wrap -> [> `Lighting_Color ] attrib
Sourceval a_marker_end : Svg_types.iri wrap -> [> `Marker_End ] attrib
Sourceval a_marker_mid : Svg_types.iri wrap -> [> `Marker_Mid ] attrib
Sourceval a_marker_start : Svg_types.iri wrap -> [> `Marker_Start ] attrib
Sourceval a_mask : Svg_types.iri wrap -> [> `Mask ] attrib
Sourceval a_opacity : Svg_types.number wrap -> [> `Opacity ] attrib
Sourceval a_overflow : [< `Visible | `Hidden | `Scroll | `Auto | `Inherit ] wrap -> [> `Overflow ] attrib
Sourceval a_pointer_events : [< `VisiblePainted | `VisibleFill | `VisibleStroke | `Visible | `Painted | `Fill | `Stroke | `All | `None | `Inherit ] wrap -> [> `Pointer_Events ] attrib
Sourceval a_shape_rendering : [< `Auto | `OptimizeSpeed | `CrispEdges | `GeometricPrecision | `Inherit ] wrap -> [> `Shape_Rendering ] attrib
Sourceval a_unicode_bidi : [< `Normal | `Embed | `Bidi_override | `Inherit ] wrap -> [> `Unicode_Bidi ] attrib
Sourceval a_visibility : [< `Visible | `Hidden | `Collapse | `Inherit ] wrap -> [> `Visibility ] attrib
Sourceval a_word_spacing : string wrap -> [> `Word_Spacing ] attrib
Sourceval a_writing_mode : [< `Horizontal_tb | `Vertical_rl | `Vertical_lr | `Inherit ] wrap -> [> `Writing_Mode ] attrib

Presentation attributes new in SVG 2

Sourceval a_paint_order : string wrap -> [> `Paint_Order ] attrib

Order in which the fill, stroke and markers of a shape are painted.

Sourceval a_text_overflow : [< `Clip | `Ellipsis ] wrap -> [> `Text_Overflow ] attrib
Sourceval a_transform_origin : string wrap -> [> `Transform_Origin ] attrib
Sourceval a_vector_effect : [< `None | `Non_scaling_stroke | `Non_scaling_size | `Non_rotation | `Fixed_position ] wrap -> [> `Vector_Effect ] attrib
Sourceval a_white_space : [< `Normal | `Pre | `Nowrap | `Pre_wrap | `Break_spaces | `Pre_line ] wrap -> [> `White_Space ] attrib

Replaces the deprecated xml:space attribute.

Events

Javascript events

Sourceval a_onabort : Xml.event_handler -> [> `OnAbort ] attrib
Sourceval a_onactivate : Xml.event_handler -> [> `OnActivate ] attrib
  • deprecated

    Removed in SVG2

Sourceval a_onbegin : Xml.event_handler -> [> `OnBegin ] attrib
Sourceval a_onend : Xml.event_handler -> [> `OnEnd ] attrib
Sourceval a_onerror : Xml.event_handler -> [> `OnError ] attrib
Sourceval a_onfocusin : Xml.event_handler -> [> `OnFocusIn ] attrib
  • deprecated

    Removed in SVG2

Sourceval a_onfocusout : Xml.event_handler -> [> `OnFocusOut ] attrib
  • deprecated

    Removed in SVG2

Sourceval a_onload : Xml.event_handler -> [> `OnLoad ] attrib
Sourceval a_onrepeat : Xml.event_handler -> [> `OnRepeat ] attrib
Sourceval a_onresize : Xml.event_handler -> [> `OnResize ] attrib
Sourceval a_onscroll : Xml.event_handler -> [> `OnScroll ] attrib
Sourceval a_onunload : Xml.event_handler -> [> `OnUnload ] attrib
Sourceval a_onzoom : Xml.event_handler -> [> `OnZoom ] attrib
  • deprecated

    Removed in SVG2

Javascript document events

These apply to the outermost svg element only.

Sourceval a_onafterprint : Xml.event_handler -> [> `OnAfterPrint ] attrib
Sourceval a_onbeforeprint : Xml.event_handler -> [> `OnBeforePrint ] attrib
Sourceval a_onbeforeunload : Xml.event_handler -> [> `OnBeforeUnload ] attrib
Sourceval a_onhashchange : Xml.event_handler -> [> `OnHashChange ] attrib
Sourceval a_onlanguagechange : Xml.event_handler -> [> `OnLanguageChange ] attrib
Sourceval a_onmessage : Xml.event_handler -> [> `OnMessage ] attrib
Sourceval a_onoffline : Xml.event_handler -> [> `OnOffLine ] attrib
Sourceval a_ononline : Xml.event_handler -> [> `OnOnLine ] attrib
Sourceval a_onpagehide : Xml.event_handler -> [> `OnPageHide ] attrib
Sourceval a_onpageshow : Xml.event_handler -> [> `OnPageShow ] attrib
Sourceval a_onpopstate : Xml.event_handler -> [> `OnPopState ] attrib
Sourceval a_onreadystatechange : Xml.event_handler -> [> `OnReadyStateChange ] attrib
Sourceval a_onredo : Xml.event_handler -> [> `OnRedo ] attrib
Sourceval a_onrejectionhandled : Xml.event_handler -> [> `OnRejectionHandled ] attrib
Sourceval a_onstorage : Xml.event_handler -> [> `OnStorage ] attrib
Sourceval a_onundo : Xml.event_handler -> [> `OnUndo ] attrib
Sourceval a_onunhandledrejection : Xml.event_handler -> [> `OnUnhandledRejection ] attrib

Javascript global events

SVG 2 reuses the event handler content attributes of HTML; these apply to every SVG element.

Sourceval a_onauxclick : Xml.mouse_event_handler -> [> `OnAuxClick ] attrib
Sourceval a_onbeforeinput : Xml.event_handler -> [> `OnBeforeInput ] attrib
Sourceval a_onbeforematch : Xml.event_handler -> [> `OnBeforeMatch ] attrib
Sourceval a_onbeforetoggle : Xml.event_handler -> [> `OnBeforeToggle ] attrib
Sourceval a_onblur : Xml.event_handler -> [> `OnBlur ] attrib
Sourceval a_oncancel : Xml.event_handler -> [> `OnCancel ] attrib
Sourceval a_oncanplay : Xml.event_handler -> [> `OnCanPlay ] attrib
Sourceval a_oncanplaythrough : Xml.event_handler -> [> `OnCanPlayThrough ] attrib
Sourceval a_onchange : Xml.event_handler -> [> `OnChange ] attrib
Sourceval a_onclose : Xml.event_handler -> [> `OnClose ] attrib
Sourceval a_oncontextlost : Xml.event_handler -> [> `OnContextLost ] attrib
Sourceval a_oncontextmenu : Xml.mouse_event_handler -> [> `OnContextMenu ] attrib
Sourceval a_oncontextrestored : Xml.event_handler -> [> `OnContextRestored ] attrib
Sourceval a_oncopy : Xml.event_handler -> [> `OnCopy ] attrib
Sourceval a_oncuechange : Xml.event_handler -> [> `OnCueChange ] attrib
Sourceval a_oncut : Xml.event_handler -> [> `OnCut ] attrib
Sourceval a_ondblclick : Xml.mouse_event_handler -> [> `OnDblClick ] attrib
Sourceval a_ondrag : Xml.mouse_event_handler -> [> `OnDrag ] attrib
Sourceval a_ondragend : Xml.mouse_event_handler -> [> `OnDragEnd ] attrib
Sourceval a_ondragenter : Xml.mouse_event_handler -> [> `OnDragEnter ] attrib
Sourceval a_ondragleave : Xml.mouse_event_handler -> [> `OnDragLeave ] attrib
Sourceval a_ondragover : Xml.mouse_event_handler -> [> `OnDragOver ] attrib
Sourceval a_ondragstart : Xml.mouse_event_handler -> [> `OnDragStart ] attrib
Sourceval a_ondrop : Xml.mouse_event_handler -> [> `OnDrop ] attrib
Sourceval a_ondurationchange : Xml.event_handler -> [> `OnDurationChange ] attrib
Sourceval a_onemptied : Xml.event_handler -> [> `OnEmptied ] attrib
Sourceval a_onended : Xml.event_handler -> [> `OnEnded ] attrib
Sourceval a_onfocus : Xml.event_handler -> [> `OnFocus ] attrib
Sourceval a_ongotpointercapture : Xml.mouse_event_handler -> [> `OnGotPointerCapture ] attrib
Sourceval a_oninput : Xml.event_handler -> [> `OnInput ] attrib
Sourceval a_oninvalid : Xml.event_handler -> [> `OnInvalid ] attrib
Sourceval a_onkeydown : Xml.keyboard_event_handler -> [> `OnKeyDown ] attrib
Sourceval a_onkeypress : Xml.keyboard_event_handler -> [> `OnKeyPress ] attrib
Sourceval a_onkeyup : Xml.keyboard_event_handler -> [> `OnKeyUp ] attrib
Sourceval a_onloadeddata : Xml.event_handler -> [> `OnLoadedData ] attrib
Sourceval a_onloadedmetadata : Xml.event_handler -> [> `OnLoadedMetaData ] attrib
Sourceval a_onloadstart : Xml.event_handler -> [> `OnLoadStart ] attrib
Sourceval a_onlostpointercapture : Xml.mouse_event_handler -> [> `OnLostPointerCapture ] attrib
Sourceval a_onmousewheel : Xml.event_handler -> [> `OnMouseWheel ] attrib
Sourceval a_onpaste : Xml.event_handler -> [> `OnPaste ] attrib
Sourceval a_onpause : Xml.event_handler -> [> `OnPause ] attrib
Sourceval a_onplay : Xml.event_handler -> [> `OnPlay ] attrib
Sourceval a_onplaying : Xml.event_handler -> [> `OnPlaying ] attrib
Sourceval a_onpointercancel : Xml.mouse_event_handler -> [> `OnPointerCancel ] attrib
Sourceval a_onpointerdown : Xml.mouse_event_handler -> [> `OnPointerDown ] attrib
Sourceval a_onpointerenter : Xml.mouse_event_handler -> [> `OnPointerEnter ] attrib
Sourceval a_onpointerleave : Xml.mouse_event_handler -> [> `OnPointerLeave ] attrib
Sourceval a_onpointermove : Xml.mouse_event_handler -> [> `OnPointerMove ] attrib
Sourceval a_onpointerout : Xml.mouse_event_handler -> [> `OnPointerOut ] attrib
Sourceval a_onpointerover : Xml.mouse_event_handler -> [> `OnPointerOver ] attrib
Sourceval a_onpointerup : Xml.mouse_event_handler -> [> `OnPointerUp ] attrib
Sourceval a_onprogress : Xml.event_handler -> [> `OnProgress ] attrib
Sourceval a_onratechange : Xml.event_handler -> [> `OnRateChange ] attrib
Sourceval a_onscrollend : Xml.event_handler -> [> `OnScrollEnd ] attrib
Sourceval a_onsecuritypolicyviolation : Xml.event_handler -> [> `OnSecurityPolicyViolation ] attrib
Sourceval a_onseeked : Xml.event_handler -> [> `OnSeeked ] attrib
Sourceval a_onseeking : Xml.event_handler -> [> `OnSeeking ] attrib
Sourceval a_onselect : Xml.event_handler -> [> `OnSelect ] attrib
Sourceval a_onshow : Xml.event_handler -> [> `OnShow ] attrib
Sourceval a_onstalled : Xml.event_handler -> [> `OnStalled ] attrib
Sourceval a_onsubmit : Xml.event_handler -> [> `OnSubmit ] attrib
Sourceval a_onsuspend : Xml.event_handler -> [> `OnSuspend ] attrib
Sourceval a_ontimeupdate : Xml.event_handler -> [> `OnTimeUpdate ] attrib
Sourceval a_ontoggle : Xml.event_handler -> [> `OnToggle ] attrib
Sourceval a_onvolumechange : Xml.event_handler -> [> `OnVolumeChange ] attrib
Sourceval a_onwaiting : Xml.event_handler -> [> `OnWaiting ] attrib
Sourceval a_onwheel : Xml.mouse_event_handler -> [> `OnWheel ] attrib

Javascript mouse events

Sourceval a_onclick : Xml.mouse_event_handler -> [> `OnClick ] attrib
Sourceval a_onmousedown : Xml.mouse_event_handler -> [> `OnMouseDown ] attrib
Sourceval a_onmouseup : Xml.mouse_event_handler -> [> `OnMouseUp ] attrib
Sourceval a_onmouseover : Xml.mouse_event_handler -> [> `OnMouseOver ] attrib
Sourceval a_onmouseout : Xml.mouse_event_handler -> [> `OnMouseOut ] attrib
Sourceval a_onmousemove : Xml.mouse_event_handler -> [> `OnMouseMove ] attrib
Sourceval a_ontouchstart : Xml.touch_event_handler -> [> `OnTouchStart ] attrib

Javascript touch events

Sourceval a_ontouchend : Xml.touch_event_handler -> [> `OnTouchEnd ] attrib
Sourceval a_ontouchmove : Xml.touch_event_handler -> [> `OnTouchMove ] attrib
Sourceval a_ontouchcancel : Xml.touch_event_handler -> [> `OnTouchCancel ] attrib

Elements

Sourceval txt : string wrap -> [> Svg_types.txt ] elt
  • deprecated

    Removed in SVG2

  • deprecated

    Removed in SVG2

Sourcetype altglyphdef_content = [
  1. | `Ref of Svg_types.glyphref elt list
  2. | `Item of Svg_types.altglyphitem elt list
]
  • deprecated

    Removed in SVG2

  • deprecated

    Removed in SVG2

  • deprecated

    Removed in SVG2

  • deprecated

    Removed in SVG2

  • deprecated

    Removed in SVG2

  • deprecated

    Removed in SVG2

  • deprecated

    Removed in SVG2

  • deprecated

    Removed in SVG2

  • deprecated

    Removed in SVG2

  • deprecated

    Removed in SVG2

  • deprecated

    Removed in SVG2

  • deprecated

    Removed in SVG2

  • deprecated

    Removed in SVG2

  • deprecated

    Removed in SVG2

  • deprecated

    Removed in SVG2

  • deprecated

    Removed in SVG2

Deprecated

Sourceval pcdata : string wrap -> [> Svg_types.txt ] elt
  • deprecated

    Use txt instead

  • deprecated

    Use animate instead

Conversion with untyped representation

WARNING: These functions do not ensure HTML or SVG validity! You should always explicitly given an appropriate type to the output.

import signal converts the given XML signal into Tyxml elements. It can be used with HTML and SVG parsing libraries, such as Markup.

Sourceval tot : Xml.elt -> 'a elt
Sourceval toelt : 'a elt -> Xml.elt
Sourceval doc_toelt : doc -> Xml.elt
Sourceval to_xmlattribs : 'a attrib list -> Xml.attrib list
Sourceval to_attrib : Xml.attrib -> 'a attrib
Sourcemodule Unsafe : sig ... end

Unsafe features.