Raw Data Markup Language - <RDML />

Draft, Proposal

Version: draft from 2010-08-09

Created: 2009-05-13/06-01 2009-06-26/07-05 2009-10-09/15 2009-10-26 2009-12-10/11 2010-04-19 2010-08-01 2010-08-04 2010-08-09

Comments and suggestions are welcome, email the author better sooner than later (please review before 2011-05-01):

Author: Dr. O. Hoffmann (German web-page)

Recent additions: Data interpolation processing with dataInterpolation - provides a simple mechanism to get automatically control points for cubic path interpolation for simple point data lists. And there is a sample script available for this interpolation method.
dataTransform contains now a function rev to reverse the order of data in all provided sets.

Index

(short index, the long index is available in the navigation, context or document information menu of the browser)

Author (send comments, suggestions!)
Introduction
Concept
General Structure
Common Attributes
Raw Data Elements
Data Processing
Data Interpretation and Presentation Elements
Samples
Formal Schema
References

Introduction

In scientific and technical publications there is often a requirement or desire to provide raw data for a reuse additionally to a graphical representation, which requires often transformed data with a special notation for example as path data within SVG, not usable anymore for the original application. Typically if raw data consists of different dimensions, those correspond to different units and the numbers, which differ in many orders of magnitude. Often there is a requirement to provide the precision or uncertainty of the provided data together with the data.
Therefore the authors either have to provide the raw data with a notation of the meaning of the data additionally to the graphical representation or they have to calculate the graphical representation from the raw data with the additional advantage to save time, file size and work, the last especially, if minor changes or corrections have to be applied to the raw data. Therefore there is a requirement too, to markup the relation between the raw data and the graphical representation as well.

Currently programs like grace at least conserve the raw data in the format specific files, however if the graphical representation is converted into SVG or another format, the relevant data are lost.
Distributed author groups, for example working on joint publications have often the need to exchange original data together with representations, both simple to change or to extent by all authors. Of course, a standard format for this purpose can help to save a lot of work and time, targetting one of the basic and original goals to exchange data using the internet, HTTP together with (X)HTML, SVG and other common formats instead of proprietary constructs.

Many data have a compact or meaningful appearance only in problem oriented coordinate systems. SVG currently provides only cartesian coordinates and cannot provide specific elements and path notations for any thinkable problem oriented coordinate system. Therefore it is desirable to be able to provide data in the problem oriented coordinate system together with a transformation into the system used for presentation.

Another application can be to provide a generic and simple way to specify more complex objects for SVG in a less space consuming way to extent SVG without the need to specify always another extension language for each new object. The current versions of SVG 1.1 and 1.2 tiny have only a small collection of graphical primitives. Typically the used elements represent something different or something more sophisticated than indicated by the element name or a group of objects represent a stand-alone entity with its own semantical expressable meaning.
Especially the presentation elements defined here can be seen as an approach to provide a semantically rich element selection to allow author a simpler access to create more complex and simpler identificable graphical entities within this large field of scientific and technical graphs.

Some authoring tools tend to modify path data on their own. To provide raw data separately as raw data simplifies the identification of data, that should never be changed by authoring tools or without having detailed knowledge of the provided data and its purpose. For specialised tools on the other hand optimisation can be simplified, if there are additional data containing information about error margins or uncertainties of the provided data.
Therefore it is desirable to separate data, where the data itself have an important meaning from the graphical presentation of data in path. Additionally the capability to transform such data before presentation simplifies the optimisation of data for presentation for authoring tools without changing the data, they do not understand themselves.

Concerning accessibility and understandability of information, different people or programs have different approaches to understand complex data. For many people explorable graphical representations of scientific or technical data like measurements or functional relations between entities help to understand the data. For others it is more or additional helpful to have access to the raw data to manipulate them, respectively their graphical representations themselves. This indicates, that it is a general and important accessibility feature for complex data and their graphical representation to be able to provide the raw data, the graphical representation and the manipulation of the raw data to gain the graphical presentation in a declarative way.

The Raw Data Markup Language RDML provides elements and attributes to markup the raw data and its meaning and to specify the relation how to generate the graphical representation using SVG. RDML can be seen as an extension of SVG as well as a standalone language to markup raw data in a meaningful way and it can be seen as a proposal for some new elements for SVG. Because all this is available with declarative methods as XML documents, it is simple for a user to modify the relations between the raw data and the graphical representation due to own criteria without the need for specific tools other than a simple text editor. However it is not excluded to use specific programs to create or to manipulate RDML documents or fragments as well.

Concept

RDML is an XML, therefore documents have to be at least well-formed. RDML has a simple structure, nevertheless it allows a large flexibility of data manipulation.

The namespace related to RDML is http://purl.oclc.org/net/hoffmann/rdml/ (Note, that this is a PURL; a redirect), the current address may change.
Therefore the namespace declaration may be something like: xmlns:r="http://purl.oclc.org/net/hoffmann/rdml/".

Concerning conditional processing in SVG, this PURL is used too as an indicator within the attribute requiredExtensions, if used as an extension.

RDML has four different types of elements. The first group is for the general structure and for meta information about the provided data. The second group is used to specify the data. The third group are the data processing elements used to extract, manipulate and to change data. The fourth group are the data interpretation elements to specify the interpretation respectively presentation of data in a graphical way.

The approach and structure of RDML is similar to SVG filters, but not processing graphical content already, but only typically much less data used to create graphical content.

Often attributes of RDML have whitespace separated lists as values. This includes a comma with optional whitespace before and after as separation as well and leading and trailing whitespace is removed, however leading or trailing comma are not allowed. A comma separates always two list items, even if one or both are empty values. Whitespace is what is considered in XML and SVG as whitespace including line breaks. This applies only to RDML specific attributes, not for attributes derived from other languages.

General Structure

The general structure elements are mainly intended to markup a standalone document and accept of the element data they are not required, if RDML is used within SVG, because SVG has corresponding own elements providing the corresponding functionality.

rdml

Description

Type: Element

This element corresponds to the root element of a standalone RDML document.

version

Description

Type: Attribute

Indicates the version of RDML used in the document. For this specification the value is "purl.oclc.org/net/hoffmann/rdml/#v1.0". If no such attribute or value is available, the 'current' version is assumed, indicated within the content of the URI for the namespace. To get a well defined content, authors are encouraged to set this attribute properly.

metadata

Description

Type: Meta element

This element contains meta information and can appear in each other document and may contain either plain text or meta information elements from other namespaces, for example the Literature Markup Language (LML) or RDF. This element corresponds to the element metadata from SVG.

title

Description

Type: Meta element

The title of a standalone document or the title of a fragment represented by another element. This element corresponds to the element title from SVG.

desc

Description

Type: Meta element

A description of a standalone document or the description of a fragment represented by another element. This element corresponds to the element desc from SVG.

The element may contain elements from other namespaces to structure the description, for example LML or XHTML.

m

Description

Type: Meta element

A generic meta information element within a metadata, title or desc to structure the information contained within the element. RDFa can be used to specify the semantic meaning of the meta information. Respectively the role of this element can be indicated with the attribute role.

The attributes from XLink can be used to provide some simple hyperlink functionality. m elements with hyperlink functionality should not contain other (m) elements with hyperlink functionality. A viewer can ignore the hyperlink functionality of all descendant (m) elements to avoid plurivalences, if the viewer cannot provide an advanced mechanism to clarify all plurivalences for the user. This functionality can be ignored too for the presentation of a title as a title of a window representing the complete element.
Only if xlink:href is specified, the element has a hyperlink functionality.
The values of xlink:show can be new | replace, this means, an activation either replaces the current document or the linked content is presented in a new viewport. Because this is related to meta information, new is assumed, if the attribute is not specified. The value of xlink:actuate is onRequest, this means, the link is processed with an interactive activation like clicking the hyperlink content.

Within title authors may use this typically to provide titles in different languages, no further substructure like subtitles. A viewer then may choose the best fitting language indicated with xml:lang. If presented as a title of a window representing the complete element, authors have to take into account, that for such a display no further substructure can be presented.

Within desc this element is mainly intended to markup paragraphs or sections of a structured description.

SVG has no such element, but allows explicitly elements from other namespaces within metadata. Within RDML standalone documents this can be used to structure meta information without using elements from other namespaces.

data

Description

Type: Element

A container element for data processing, presentation and interpretation elements. The interpretation and processing is only forward (in the source code). This means, processing and interpretation elements can only reference other processing elements results specified earlier in the source code, not later. At the end of processing of a data element a viewer only has to keep data in referencable presentation elements in memory. Other results from processing can be removed from memory to help the viewer with an effective memory management.

Within an SVG document the element data is not directly rendered. Results from processing and interpretation can only be referenced as presentation and interpretation elements to be displayed as graphical content.

Common Attributes

Some attributes are assumed to be available both in RDML and in the host language for any element, if another language is used as host language.

XML attributes

xmlns

Description

xmlns[:prefix] = "resource-name"

Standard XML attribute to identify an XML namespace. This attribute makes the related namespace available for the current element (and its children, if they are not related to another namespace).

Relations

Namespaces in XML

xml:id

Description

xml:id = "unique identifier"

Standard XML attribute for assigning a unique name to an element.

If the host language provides only its own identifier like id, this can be used too, but for RDML xml:id is preferred. In doubt both attributes can be noted with the same value.

Relations

xml:id Version 1.0

xml:lang

Description

xml:lang = "language identifier"

Standard XML attribute to specify the language (for example 'en' for english or 'de' for german) used in the contents and attribute values of particular elements.

If the host language provides only its own identifier like lang, this can be used too, but for RDML xml:lang is preferred. In doubt both attributes can be noted with the same value.

Relations

XML

xml:space

Description

xml:space = "default" | "preserve"

Standard XML attribute to specify whether whitespace is preserved in character data.

Note, that in the element dataRaw whitespace is preserved by default as well as in document (fragments), referenced with dataImport.

Relations

XML

xml:base

Description

xml:base = "base URI or IRI"

Standard XML attribute to specify a base URI other than the base URI of the document or external entity.

Relations

XML base

Attributes derived from XHTML or SVG

class

Description

class = "whitespace separated list of class names"

This attribute indicates membership in one or more sets. Multiple set names must be separated by whitespace characters. A class name may be shared by several element instances.

Relations

role

Description

role = "whitespace separated list of roles"

The attribute indicates one or more roles of an element. The role describes the role of the element, for example the semantical meaning. A role value may be shared by several element instances.

Unlike the class attribute, role attribute values are intended to be selected from a predefined set of values with specific semantic aspects. The values are either predefined by WAI-ARIA or by the default namespace (starting with ':') or by a (safe) CURIE.

Predefined values in RDML are the element names, for example ':dataRaw'. If role is available, for example element names from RDML can be used to indicate raw data related meta information.

Relations

XHTML role

datatype

Description

datatype = "CURIE"

Indicates, that the content of the element is in a machine readable format. The data type of this format is defined at the CURIE.

content

Description

content = "string"

The attributs contains alternative (text) content or is an alternative to provide text content. If the datatype for an element is specified and the element itself does not contain the data in a machine readable format, the value of this attribute is used instead and has to conform with the data type as specified by the attribute datatype.

about

Description

about = "URI or safe CURIE"

Indicates about what the content of the related element is with a CURIE, this is the so called 'subject'.

property

Description

property = "whitespace separated list of CURIEs"

Indicates the content of the element, respectively the target of about representing a value of the specified properties, this is the so called 'predicate'.

resource

Description

resource = "URI or safe CURIE"

Indicates the resource as (a not clickable) subject of the statement, a so called object.

typeof

Description

typeof = "whitespace separated list of CURIEs"

Indicates an association of the subject with types as specified by the CURIEs.

rel

Description

rel = "whitespace separated list of relations"

The attribute indicates one or more relations of an element. The rel attribute expresses the relationships between two resources. The relation is either a predefined value (with the XHTML vocabulary) or a CURIE.

rev

Description

rev = "whitespace separated list of reverse relations"

The attribute indicates one or more relations of an element. The rev attribute expresses the reverse relationships between two resources. The relation is either a predefined value (with the XHTML vocabulary) or a CURIE.

Relations

RDFa syntax

XLink attributes

Description

Type: Attribute

For some elements a simple hyperlink functionality is required. Is is provided with attributes from XLink. The following attributes are intended to have specific values for this type of link. If an attribute has only one possible value noted here, this is implied and there is no need to specify the attribute explicitly:

href
"URI"
the URI or IRI of the link target.
type
"simple"
title
"string"
a title for the arc of the hyperlink.
show
"other"
The link is used to import data or to reference a symbol.
For the element m the possible values are new | replace, see element description for details.
actuate
"other"
The data are imported, when the related element dataImport is processed. Respectively a symbol reused, when the related element is processed to present the data as symbols.
For the element m the value is onRequest, see element description for details.
role
"URI"
The role of the referenced resource, typically this is implied from the element, for example for dataImport to reference a document (fragment) indicating the role of the referenced data. Or if a symbol is referenced, the symbol represents a data point.
arcrole
"URI"
referencing a document (fragment) indicating the role of the arc of the hyperlink. Typically this is obvious from the element, it is used for - to import the data or to reuse a symbol - and needs no explicite explanation.

Raw Data Elements

Raw data in RDML are mainly numbers or in general simple strings, structured or separated with separators from each other. Additionally raw data can have multiple dimensions implied. To interprete raw data, separators and dimensions have to be specified for the further extraction, manipulation, presentation and interpretation of the data.

dataRaw

Description

Type: Element

This element contains exactly one set of raw data and maybe a metadata element as the first content (with optional whitespace before) with the description of the meaning of the raw data.

As any element within an XML language the dataRaw may contain comments, starting with <!-- and ending with -->. Everything between those strings is stripped, before the raw data are interpreted or processed. This means too, that all special XML characters have to be masked, if they appear within the data. The intention is not to provide a possibility to process arbitrary raw data, the data have at least to be modified in such a way that they are plain text and do not create conflicts with basic XML syntax.

Within an SVG document the element dataRaw is not directly rendered.

separator

Description

Type: Attribute

The attribute separator of the element dataRaw indicates, how two successive data are separated from each other. Possible values consist of:

s
The separator is exactly one whitespace character (including line breaks). Note, that in documents created on some operating systems more than one whitespace character is used to indicate a new line. This may result in unintended additional data.
w
The separator is none or more whitespace characters. If w appears alone, it is interpreted as ws
{*}
* represents a wildcard for the intended separator. The paranthesis { or } are excluded as parts of the separator.

Combinations are possible as well, for example ws indicates one or more whitespace charaters, w{,}w indicates ',' with optional leading and trailing whitespace as separator. The raw data set must start and end with a separator, especially possible content before the first separator and behind the last separator are not interpreted as data. However authors should not note decriptions outside of a possible metadata on top of dataRaw using this specific rule. Authors should avoid XML comments within the raw data between the first and the last separator as well to simplify the interpretation or processing of the data. Additionally authors should avoid content apart from maybe whitespace (if this is not used as separator themselves) after the last separator to simplify the interpretation of raw data by programs.

If the attribute is not provided, this is interpreted as if ws is specified. This means especially, that in this case the dataRaw content has to start and to end with at least one whitespace character.

dim

Description

Type: Attribute

The value is the number representing the primary dimension of the data set. It is a positive integer. Floating point numbers are rounded off, but numbers smaller than 1 are interpreted as 1 as well as content not interpretable as a number of if the attribute is not specified.

Often a data set has more than one dimension, for example two dimensions like x and y or time and length or angle and intensity. Or for example three dimensions like x, y and z or time, length and height etc.

The interpretation is, that the number represents the successive data representing the dimensions. For example for two, the odd data represent the first dimension, the even the second. Authors are encouraged to structure the data with line breaks, if this does not conflict with the separator indication.

The element dataExtract for extraction of data may indicate another number of dimensions. Those information takes precedence for extraction of course, not the value of the attribute dim of the element dataRaw. This is either only informative or is the fallback, if the dataExtract does not provide a dim.

dataImport

Description

Type: Element

Element to import data from external resources. It has the attributes separator, dim, archive, atype and ctype.

Additionally it has attributes from XLink to reference an external resource. This can be either another element dataRaw or it can be a plain text document with content as described for dataRaw. If for a referenced plain text document no other encoding information is available, the same as for the current document is assumed.

archive

Description

Type: Attribute

It is possible to put data files into an archive. This is mainly useful, if more than one data file is required for the same document. If the attribute is not provided or the value is empty, no archive is used. Else the resource indicated by the attributes from XLink is found within the archive indicated with the value of the archive attribute. This means relative paths are related to the root of the archive. If an absolute URI is indicated with the attributes from XLink, the archive attribute is ignored.

atype

Description

Type: Attribute

The archive type is indicated with the attribute atype. This information is only a hint to the user agent, if no other relyable or higher priority information (for example from a server) is available. If the attribute is not provided and no other information available, the keyword 'tar' is assumed. The value is a save CURIE for the archive type or one of the following keywords:

tar
a tar archive
tar.gz
a tar archive compressed with gzip
tar.bz2
a tar archive compressed with bzip2
zip
a zip archive

ctype

Description

Type: Attribute

If the imported file is compressed, this attribute provides a hint about the compression method. This information is only a hint to the user agent, if no other relyable or higher priority information (for example from a server) is available. If the attribute is not provided and no other information available, the keyword 'gz' is assumed. The value is a save CURIE for the archive type or one of the following keywords:

gz
compressed with gzip
bz2
compressed with bzip2
zip
compressed with zip

Data Processing

Data processing elements are used to extract or to manipulate or to change data. The resulting sets can be referenced using names provided in the attribute result by data processing or data presentation elements later in the source code and within the same element data.

Data extraction generates (one dimensional) sets of data from raw data, interpreting raw data with an information about the used separator and the dimension of the raw data.

For data processing, the input and the result are in general several sets, the number of sets can be called the number of dimensions. The processing either happens on each dimension or set separately or it happens on a data multiplet. The n-th data multiplet within a calculation uses from each set or dimension the n-th data. Therefore the data multiplet has exactly one data from each set in the order, the sets are provided.

dataExtract

Description

Type: Element

This element extracts data sets (dimensions) from an element dataRaw or dataImport.

result

Description

Type: Attribute

The value of this is a whitespaces separated list of names, to be used for referencing with data processing elements. The choice of names have the same restrictions as for an xml:id. It is unique within each element data. This means especially that a later result with the same name overwrites a previous result with the same name. The result from processing can be referenced by an attribute in.
The number and order of extracted sets is determined by the number and order of names within this attribute. If there are less names than dimensions to be extracted, the sets identificable with the last names remain empty concerning data extraction. A value '#' or '?' can be choosen to indicate a dimension, later not referencable. If there is exactly one name directly followed by a '#', for example result = "d#" this indicates, that the names are created automatically by adding numbers, starting with 1; for three dimensions the example is the same as specifying result = "d1 d2 d3".

in

Description

Type: Attribute

The value of this is a fragment identifier of an element dataRaw or dataImport and indicates from which data resource the data are extracted.

dim

Description

Type: Attribute

This attribute dim is already basically specified above.

If there are less data in the dataRaw or dataImport than specified dimensions, the missing data are assumed to be zero.

selectDim

Description

Type: Attribute

Defines the extracted dimensions. It is a whitespace separated list of the dimensions to be extracted in the given order. This means, these are integers. The first dimension is indicated with 1, the second with 2 and so on. There is no dimension 0. If selectDim specifies not existing dimensions, this results in one generated data zero for this new dimension. If not specified, 1 is assumed.

selectData

Description

Type: Attribute

Defines the data to be extracted. The value are zero, one or two integers and indicates the subset of the dimension to be extracted. The integers are separated with whitespace. Floating point numbers are rounded down, content not interpretable as numbers is interpreted as an empty value. An empty value or a not provided attribute means, that all data are extracted. The first number indicates the first data to be extracted, the second number the last data to be extracted. If there is no second number, the data are extracted to the end. Possibly missing data are assumed to be zero.
Note, that if more than one dimension is extracted, this applies to all dimensions to be extracted. If different ranges of data have to be extracted from different dimensions, this has to be done with more than one element dataExtract.

dataTransform

Description

Type: Element

With the element dataTransform data from other data processing elements, especially from an element dataExtract can be transformed.

result

Description

Type: Attribute

This attribute result is already basically specified above. It can be a whitespace separated list of results, for each in one. If there are less result items than in items, the missing results are not referencable. If there are more results than in items, the excessive results are assumed to be zero.

in

Description

Type: Attribute

The value of this is a whitespace separated list of the value list items of the attribute result of previous data processing elements.
Sometimes it might be convenient not to provide a set name, if for a calculation multiple sets are required. In this case the character '#' or '?' is used as a replacement. This is treated as a missing (empty) set.

calculate

Description

Type: Attribute

The value of this attribute is a whitespace separated list of calculation keywords with parameters in paranthesis. Whitespace within the paranthesis belongs to the parameters, not to the whitespace separation of the attribute list. Whitespace between a keyword and its parameters is not allowed. Unknown keywords or attribute values without a keyword are ignored. The parameters within the paranthesis are optional. Empty paranthesis mean the same as a keyword without paranthesis. Even if the specification of the keyword does not mention any parameters in paranthesis, they are allowed, but ignored. In general if more parameters are specified than required, excessive parameters are not used within the calculation. If a parameter is a simple string, the notation and the whitespace separation implicates, that some characters like whitespace or paranthesis cannot be using within such simple strings.

The calculations are applied either on sets or on data multiplets.
If the calculations are applied to sets, each set generates a new set as result, therefore the number of sets before and after the calculation are the same.
Calculations on data multiplets may change the number of dimensions and correlates data from different sets or dimensions.

For numeric calculations the data are interpreted as numbers in decimal notation as far as possible. Not interpretable characters stop the interpretation as number. If already the first character is not interpretable as a number, the interpretation of the character group representing one data stops and 0 is assumed. However, if the data starts with whitespace, the whitespace is ignored and the interpretation starts with the first none whitespace character. 0 is assumed too, if complete required sets are missing or single data are missing, if not specified otherwise.
Data sets may contain as well simple strings, typically for presentation or information purposes. Operations on strings do not require an interpretation as a number of course. Simple strings do not contain markup, but specific characters can or have to be masked, for example characters specific for XML.

Scientific notation for numbers is allowed too. As a separator for the exponent notation (integers) are accepted: E, e, D,d, for example: +2.34E-001, -.19d4, .47D17, 0000.321e7.
The following notations result in a specific processing as explained above, because not everything is interpretable as numbers, the resulting number is given after the '=':
abc5d12 = 0
5D2ebc = 5d2 = 500
2,2345 = 2
E+3 = 0
2.1E-1.762 = 2.1e-1 = 0.21 (because there are only integers after the E possible).

If more than one keyword is specified, the calulations are interpreted from right to left (for a writing direction from left to right, in general from the end of the attribute value to the begin). This means the calculation most right in the attribute value is applied to the data sets provided with the attribute in. The next calculation counted from the right is applied to the results of the previous calculation and so on. The results from the last, left calculation is referencable with the names within the attribute result. This processing corresponds to transformations in SVG. Note, that for some calculations the dimensions or number of sets change. This implicates restrictions on what can be calculated usefully within one list of keywords. This can be easily avoided by using more than one dataTransform element of course.

The keywords are as follows:

scale(*)
The data are multiplied with the numbers represented here as *. * is a whitespace separated list of numbers. Data from the first set are multiplied with the first number, data from the second set with the second number and so on.
If there are more numbers than dimensions, the excessive numbers are ignored. If there are less numbers than dimensions, the last number is multiplied to all further datas to allow authors a simple short notation, if many dimensions have to be scaled with the same number.
translate(*)
The data are added to the numbers represented here as *. * is a whitespace separated list of numbers. Data from the first set are added the first number, data from the second set to the second number and so on.
If there are more numbers than dimensions, the excessive numbers are ignored. If there are less numbers than dimensions, the last number is added to all further datas to allow authors a simple short notation, if many dimensions have to be translated with the same number.
rotate(*)
A rotation of the two first dimensions with an angle *. The angle can have a unit, to be provided without anything between the number and the unit. The unit can be deg, grad, rad or turns. deg is optional, this means, that angles without a unit are interpreted as deg. Angles with unknown units are assumed to be zero.
Angles can be specified as a fraction as well to avoid rounding errors in the notation of such fractions, for example: rotate(1/7turns), but for something like rotate(3/0turns) the '/0' is simply ignored, this is the same as rotate(3turns). Something like rotate(3/7/5turns) is not allowed and is interpreted as rotate(3/7) = rotate(3/7deg).
Let x be the first dimension, y the second, u the first result, v the second result, then it is:
u = cos(*) x - sin(*) y
v = sin(*) x + cos(*) y
Missing data for x or y are assumed to be zero.
If more than two sets are provided, the results for the others are the same as the input data.
m2(*)
A matrix multiplication of the two first dimensions is performed. * are up to four whitespace separated numbers, missing numbers are assumed to be 0, if they correspond to off diagonal matrix elements, for diagonal matrix elements they are assumed to be 1. If more than four numbers are provided, the excessive numbers are not used.
Let x1 be the first dimension, x2 the second, y1 the first result, y2 the second result, a11, a12, a21, a22 the four numbers, then it is:
y1 = a11*x1 + a12*x2
y2 = a21*x1 + a22*x2
Or in short notation: yi = aik xk
If more than two sets are provided, the results for the others are the same as the input data.
m3(*)
A matrix multiplication of the first three sets is performed. Missing dimensions are assumed to be zero. * are up to nine whitespace separated numbers, missing numbers are assumed to be 0, if they correspond to off diagonal matrix elements, for diagonal matrix elements they are assumed to be 1. If more than nine numbers are provided, the excessive numbers are not used.
Let x1 be the first dimension, x2 the second, x3 the third dimension, y1 the first result, y2 the second, y3 the third result, a11, a12, a13, a21, a22, a23, a31, a32, a33 the numbers in the order as specified, then it is:
y1 = a11*x1 + a12*x2 + a13*x3
y2 = a21*x1 + a22*x2 + a23*x3
y3 = a31*x1 + a32*x2 + a33*x3
Or in short notation: yi = aik xk
If more than three sets are provided, the results for the others are the same as the input data.
m4(*)
A matrix multiplication of the first four sets is performed. Missing dimensions are assumed to be zero. * are up to sixteen whitespace separated numbers, missing numbers are assumed to be 0, if they correspond to off diagonal matrix elements, for diagonal matrix elements they are assumed to be 1. If more than sixteen numbers are provided, the excessive numbers are not used.
Let x1 be the first dimension, x2 the second, x3 the third, x4 the fourth dimension, y1 the first result, y2 the second, y3 the third result and y4 the fourth result, a11, a12, a13, a14, a21, a22, a23, a24, a31, a32, a33, a34, a41, a42, a43, a44 the numbers in the order as specified, then it is:
y1 = a11*x1 + a12*x2 + a13*x3 + a14*x4
y2 = a21*x1 + a22*x2 + a23*x3 + a24*x4
y3 = a31*x1 + a32*x2 + a33*x3 + a34*x4
y4 = a41*x1 + a42*x2 + a43*x3 + a44*x4
Or in short notation: yi = aik xk
If more than four sets are provided, the results for the others are the same as the input data.
mn(*)
A matrix multiplication is performed. * are whitespace separated numbers. The first number indicates the number of dimensions. It is interpreted as positive integer, floating point numbers are rounded down, numbers smaller than 1 and something not interpretable as a number is interpreted as 1.
Missing dimensions are assumed to be zero. Missing numbers are assumed to be 0, if they correspond to off diagonal matrix elements, for diagonal matrix elements they are assumed to be 1. If more than necessary numbers are provided, the excessive numbers are not used.
The interpretation of the numbers following on the first number corresponds to what is noted for 3 or 4 dimensions, the processing of the n x n matrix as well. This means mn(4 *) has the same result as m4(*), mn(3 *) has the same result as m3(*), mn(2 *) has the same result as m2(*).
Or in short notation with xk the input sets, yi the results and aik the matrix elements: yi = aik xk
If more than indicated sets are provided, the results for the others are the same as the input data.
power(*)
A power or exponentiation of all provided sets is calculated. * represents a whitespace separated list of zero to two numbers (the first can be a simple string like NANQ as well).
The first number or string is used as an indicator or fallback for a not computable combination. The second number indicates the exponent. If x is one of the sets provided by one item of in and u the related item of result, the first number of * is p, the second is q, the operation is:
u = xq if this results in a real number, if not, then u = p.
If p is not provided, 0 is assumed. If q is not provided or not interpretable as number, 1 is assumed.
exp(*)
A power or exponentiation with all provided sets is calculated. * represents a whitespace separated list of zero to two numbers (the first can be a simple string like NANQ as well).
The first number or string is used as an indicator or fallback for a not computable combination. The second number indicates the base. If x is one of the sets provided by one item of in and u the related item of result, the first number of * is p, the second is q, the operation is:
u = qx if this results in a real number, if not, then u = p.
If p is not provided, 0 is assumed. If q is not provided or not interpretable as number, e (base of the natural logarithm) is assumed.
pow(*)
A power or exponentiation for the two first sets is calculated. * represents one number or simple string.
If x is the first of the sets, y the second, * is p, the operation is:
u = xy if this results in a real number, if not, then u = p.
If data for x or y are missing, the last provided data from the related set is used.
If x or y are not provided or interpretable as a number, 1 is assumed. If p is not provided, 0 is assumed.
log(*)
The logarithm of all sets is calculated. * represents a whitespace separated list of zero to two numbers (the first can be a simple string like NANQ as well).
If x is one of the sets provided by one item of in and u the related item of result, the first number of * is f a fallback, the second is b the base, the operation is:
u = logb (x) if this results in a real number, if not, then u = f.
If b is not provided or interpretable as number, e (base of the natural logarithm) is assumed. If f is not provided, 0 is assumed.
lob(*)
The logarithm of all sets is calculated. * represents a whitespace separated list of zero to two numbers (the first can be a simple string like NANQ as well).
If x is one of the sets provided by one item of in and u the related item of result, the first number of * is f a fallback, the second is a the argument, the operation is:
u = logx (a) if this results in a real number, if not, then u = f.
If a is not provided or interpretable as number, 0 is assumed. If f is not provided or not interpretable as number, 0 is assumed.
los(*)
A logarithm for the two first sets is calculated. * represents one numbers or simple string.
If x is the first of the sets, y the second, * is p, the operation is:
u = logy (x) if this results in a real number, if not, then u = p.
If y is not provided or interpretable as a number, e (base of the natural logarithm) is assumed. If p is not provided or not interpretable as number, 0 is assumed.
setdist(*)
A distance or length is calculated for all provided sets. * represents a number, if there is a list, only the first item is interpreted. If not interpretable as a number or not specified, 2 is assumed. If x is one of the sets provided by one item of in and u the related item of result and * is p, the operation is as follows:
The sum over the complete set is taken over the p-th power of the absolute value of each data. From this sum the p-th root is taken.
For example, if p is 2, this corresponds to an Euclidian distance. If p is 1 this corresponds to the sum over all absolute values, called sometimes the Manhattan distance.
For n sets this results in n results, each with one data as result.
setmax
The maximum of each set is determined, for n sets this results in n results, each with one data as result.
setmin
The minimum of each set is determined, for n sets this results in n results, each with one data as result.
setav
The averages are calculated for the provided sets. This means, the sum over all data in one set is devided by the number of data per set (what can be different for each set). For n sets this results in n results, each with one data as result.
setsum
The sums are calculated for the provided sets. This means, the sum over all data in one set. For n sets this results in n results, each with one data as result.
setmult
The products are calculated for the provided sets. This means, the product over all data in one set. For n sets this results in n results, each with one data as result.
sin(*)
A sinus of each set is calculated, * represents the unit used for the angle, possible are 'deg', 'grad', 'rad', 'turns' or no unit, what corresponds to 'deg' and the same as no * specified or * is not interpretable as an angle of a unit.
Angles can be specified as a fraction as well, for example: rotate(1/7turns), but for something like rotate(3/0turns) the '/0' is simply ignored, this is the same as rotate(3turns). Something like rotate(3/7/5turns) is not allowed and is interpreted as rotate(3/7) = rotate(3/7deg).
cos(*)
A cosinus of each set is calculated, * represents the unit used for the angle, possible are 'deg', 'grad', 'rad', 'turns' or no unit, what corresponds to 'deg' and the same as no * specified or * is not interpretable as an angle of a unit.
Angles can be specified as a fraction as well, for example: rotate(1/7turns), but for something like rotate(3/0turns) the '/0' is simple ignored, this is the same as rotate(3turns). Something like rotate(3/7/5turns) is not allowed and is interpreted as rotate(3/7) = rotate(3/7deg).
tan(*)
A tangens of each set is calculated, * represents the unit used for the angle, possible are 'deg', 'grad', 'rad', 'turns' or no unit, what corresponds to 'deg' and the same as no * specified or * is not interpretable as an angle of a unit. Additionally separated with whitespace a number or string can be provided to indicate an infinite result as for an input of 90 deg. If not provided, 0 is taken.
Angles can be specified as a fraction as well, for example: rotate(1/7turns), but for something like rotate(3/0turns) the '/0' is simple ignored, this is the same as rotate(3turns). Something like rotate(3/7/5turns) is not allowed and is interpreted as rotate(3/7) = rotate(3/7deg).
asin(*)
An arcus sinus of each set is calculated, * represents the unit used for the angle, possible are 'deg', 'grad', 'rad', 'turns' or no unit, what corresponds to 'deg' and the same as no * specified or * is not interpretable as an angle of a unit. Additionally separated with whitespace a number or string can be provided to indicate an undefined result as for an input of something outside the range -1 to 1. If not provided, 0 is taken.
acos(*)
An arcus cosinus of each set is calculated, * represents the unit used for the angle, possible are 'deg', 'grad', 'rad', 'turns' or no unit, what corresponds to 'deg' and the same as no * specified or * is not interpretable as an angle of a unit. Additionally separated with whitespace a number or string can be provided to indicate an undefined result as for an input of something outside the range -1 to 1. If not provided, 0 is taken.
atan(*)
An arcus tangens of each set is calculated, * represents the unit used for the angle, possible are 'deg', 'grad', 'rad', 'turns' or no unit, what corresponds to 'deg' and the same as no * specified or * is not interpretable as an angle of a unit.
atan2(*)
An arcus tangens of the first two sets is calculated, * represents the unit used for the angle, possible are 'deg', 'grad', 'rad', 'turns' or no unit, what corresponds to 'deg' and the same as no * specified or * is not interpretable as an angle of a unit.
If x represents the first set and y the second, the result is atan(x/y). This is a well known function in many programming languages and avoids ambiguities in the result. If only one set is provided, atan is assumed instead.
todeg(*)
Because in SVG angles are typically specified in deg(ree), this is a simple function to convert sets with other units in sets with deg(ree) as unit.
* represents a whitespace separated list of the units used for the angle, possible are 'deg', 'grad', 'rad', 'turns', if no * is specified or * is not interpretable as a unit of an angle or if there are more sets provided than units, the unit is assumed to be 'deg'. If there are more units than sets provided, the excessive units have no influence on the conversion.
A list item is related to a set in the same order as indicated.
For 'deg' the new set is the same as the old.
For 'grad' the new set is derived by multiplying the old set with 0.9.
For 'rad' the new set is derived by multiplying the old set with 180/π.
For 'turns' the new set is derived by multiplying the old set with 360.
mult
The provided data from data multiplets are multiplied with each other with only one product set as a result. If only one set is provided, the result is the same as the input.
Possibly missing or not interpretable numbers in a set are assumed to be the last provided data of the set. Empty or not provided sets are assumed to be 1. This ensures, that it is simple to multiply a large set by a single number resulting from previous calculations.
div(*)
The data from the first set is divided by all other data from a multiplet with only one set as a result. If the result is not interpretable as a number, the string provided by * is taken as a result. If only one set is provided, the result is the same as the input.
Possibly missing or not interpretable numbers in a set are assumed to be the last provided data of the set. Empty or not provided sets are assumed to be 1. This ensures, that it is simple to devide a large set by a single number resulting from previous calculations.
add
The provided data from a multiplet are added together with only one sum set as a result. If only one set is provided, the result is the same as the input.
Possibly missing or not interpretable numbers in a set are assumed as the last provided data of the set. Empty or not provided sets are assumed to be 0. This ensures, that it is simple to add a large set to a single number resulting from previous calculations.
sub
From the first set the other provided sets are substracted with only one set as a result. If only one set is provided, the result is the same as the input.
Possibly missing or not interpretable numbers in a set are assumed as the last provided data of the set. Empty or not provided sets are assumed to be 0. This ensures, that it is simple to subtract from a large set a single number resulting from previous calculations.
max
Determines the maxima of each data multiplet. While setmax determines the maximum of each set, this works in the other direction, the maximum of each data multiplet is determined. For example, the resulting set for n sets with each having m data the result from the comparison of the n data is one set of maxima of the length m.
If numbers in one set are missing or are not interpretable as number, they do not contribute to the determination of the maximum.
min
Determines the minima for the data multiplet. While setmin determines the minimum of each set, this works in the other direction, the minimum of each data multiplet is determined. For example, the resulting set for n sets with each having m data the result from the comparison of the n data is one set of minima of the length m.
If numbers in one set are missing or are not interpretable as number, they do not contribute to the determination of the minimum.
dist (*)
Determines the distance for the data multiplet. While setdist determines the distance or length of each set, this works in the other direction, the distance of each data multiplet is determined. For example, the resulting set for n sets with each having m data the result from the comparison of the n data is one set of minima of the length m.
* represents a number, if there is a list, only the first item is interpreted. If not interpretable as a number or not specified, 2 is assumed. For a data multiplet with * is p, the operation is as follows:
The sum over the complete multiplet is taken over the p-th power of the absolute value of each data. From this sum the p-th root is taken.
For example, if * is 2, this corresponds to an Euclidian distance. If * is 1 this corresponds to the sum over all absolute values, called sometimes the Manhattan distance.
If numbers in one set are missing or are not interpretable as number, they are assumed to be zero.
av
Determines the average for the data multiplet. While setav determines the average of each set, this works in the other direction, the average of each data multiplet is determined. This means, the sum over all multiplet data is devided by the number of data in each multiplet. For n sets, each with m data, this results in one set with m results.
If numbers in one set are missing or are not interpretable as number, they do not contribute to the average and the number of sets for the division for this multiplet is reduced correspondingly.
sum
Determines the sums over the data multiplet. While setsum determines the sum of each set, this works in the other direction, the sum of each data multiplet is determined. For n sets, each with m data, this results in one set with m results.
If numbers in one set are missing or are not interpretable as number, they are assumed to be zero.
addstring(*)
The provided data multiplets are added together as strings. With * a separator can be provided to be added between two successive strings. For example no separator is provided and if the first set has as the first data 'ex', the second 'amp' and the third 'le', the resulting string is 'example'. If the separator is ' | ', the result is 'ex | amp | le'.
substring(*)
Determines substrings for each set. * represents zero to two integers separated with whitespace. Floting point numbers are rounded down. Something not interpretable as a number is assumed to be 1. The two numbers represent which part of a string has to be extracted (1 is the first character). Negative numbers are counted from the end of the string (-1 is the last character). The first indicates where to start, the second where to stop. The result is the same, if the second is the smaller number. If only the first number is provided, the substring is taken up to the end for a positive integer, up to the beginning for a negative. If the string has less characters than indicated by the numbers, only the available characters are copied in the new substring. If the complete range is not available, the result is an empty string.
char
The char for each provided set data is encoded. Something not interpretable as an integer representing a char remains the same.
unchar
A char number for each char is determined. Something not interpretable as a single char remains the same.
swap(*)
The order of two sets is swapped. This corresponds to a simple matrix operation, for example swap(1 2) corresponds to m2(0 1 0 1). * represents two positive integers separated with whitespace. Floating point numbers are rounded down. Something not interpretable as a number larger than 1 is assumed to be 1. The numbers indicate the set dimensions (the first is 1, the second 2 etc) to be swapped with each other. This is mainly useful, if the calculation is performed with a list of calculation keywords and the order of sets do not fit for the next calculation. The swap happens, even if one of the set dimensions is empty. Not swapped dimensions remain the same.
rev
This reverses the order of all data for all provided sets. Therefore for example the last data becomes the first and the first the last and so on for each set.

dataInterpolation

Description

Type: Element

Data sets from in are used to calculate sets automatically to be used as cubic interpolation paths. The resulting sets are noted in result.

The first set provided in in represents coordinates for the path to be interpolated, the second and third can provide additional information about the intended curvature at the data points, if required.
More sets can follow, if required, these represent more coordinates. Typically if the first is an x coordinate the fourth represents an y coordinate and the fifth for example a z coordinate.

If no in is provided or it has a value not representing a data set, nothing is processed, the result is empty.
If there is only a coordinate and no curvature information sets (or empty sets), the curvature set information is assumed to be 1. If there is only one curvature information set or one is empty, the missing or empty one is assumed to be the same as the provided.
If a curvature information set has less data that the coordinate set (minus one data item for open paths), the last set data is repeated, until there are enough data. If there are more data in a curvature information set than in the first coordinate set, the superfluous data are ignored. The same applies for the other coordinate sets. Therefore the first set determines the length of the interpolated result.

If the first coordinate set is empty or is not provided or has only one or two data, the result is empty and no further processing applies. This requires at least three coordinates.

The sets in result have the following meaning:
The first one corresponds to a coordinate set, the second to a first control point set for a cubic path, the third to a second control point set for a cubic path. If more coordinate sets are provided with in, the corresponding results follow, in the order of the input coordinate sets, each followed by the corresponding first control point set and the corresponding second control point set.

open

Description

Type: Attribute

This attribute indicates, whether the created path is open or closed. The value '0' indicates a closed path. The value '1' indicates an open path. If other values are provided or the attribute itself is not provided or empty, '1' is assumed.

remove

Description

Type: Attribute

This attribute indicates, how many data items are to be removed from the beginning and the end of the resulting data sets. The value is a list of two integers. If the attribute is not provided or empty, the value 0 is assumed for both. If only one value is provided, it is used for both. In case a list item is a number, not necessarily an integer, it is rounded down to the next not negative integer. If a list item is not interpretable as a number at all, it is interpreted as 0.
At least two data points have to be left after the removal to get a meaningful output. If the attribute indicates, that more data items have to be removed than possible or meaningful, the result is an empty set.

This attribute is sometimes useful with the value '1 1' for open paths, because the quality of approximation is lower for the first and last cubic path segment. This attribute provides a convenient method to remove them after processing from the output with result. To do this, authors will typically add additional data items before and behind the sets to increase the quality of approximation at the begin or end of the interpolated result and remove the additional items again before presentation.
Other combinations than '0 0', '0 1', '1 0' or '1 1' do not improve the quality, they only shorten the output.

The curvature information is typically a value around 1, larger values result in a more straight curve at the data point, values smaller than 1 result in a larger curvature at the data point. Values far away from 1 may result in artefacts, maybe interesting for arts, but not for interpolation, but there is no restriction to a specific result. Negative values turn around the direction of the path compared to the intuitive direction following the data points.

The first curvature information set is directly related to the corresponding data point and determines, how far away from this data point the first control point appears.
The second curvature information set is directly related to the data point directly following the corresponding data point and determines, how far away from this data point the first control point appears. This relation to the following data point results from the calculation of the derivative at this point already.

Often the default 1 for the curvature information will result already in a good interpolation result, if the data points are already close together and the curvature is only small. If there are only a few data points and a larger curvature, a manual optimisation with the curvature information list can create better approximations, if this element is used to approximate a known curve. However in this case it might be anyway more effective, to determine the derivatives exactly and to use this to determine the control points.

Obviously there is always an uncountable infinite number of curves as smooth solutions for such an interpolation problem. This element uses only simple formulas to guess the derivative at the data points using only the neighbour points. Therefore the result is local, this means if other points than a data point and its neighbours in the set are changed, the interpolated curve segment does not change. Exceptions are the first and last point of an open path, they use one additional neighbour to improve the quality of the numerical derivative. Nevertheless, the approximation quality of the first and last curve segment is lower for an open path. This can be optimised for example with two additional data points, one at the beginning and one at the end. Those can be removed again after the calculation is processed with the attribute remove.

The processing is described in the following.

The coordinate data sets are interpreted as a vector for the processing, therefore all operations apply to all coordinate data sets.
For discussion assume the set has N items, numbered from 1 to N. Such a data vector item j is mentioned as dj.
The first curvature information data item is mentioned as rj, the second as sj (for them j is from 1 to N-1 for open paths, to N for closed paths).

Just for processing add two more items to the set (but they are not used in the result output!):
For closed paths d0 = dN and dN+1 = d1 (effectively only removed for open paths, see below)
For open paths d0 = 3 d1 - 3 d2 + d3 and dN+1 = 3 dN - 3 dN-1 + dN-2

The control points C1j and C2j with j from 1 to N-1 are calulated as follows:
The first control point C1j = dj + rj * (dj+1 - dj-1)/6
The second control point C2j = dj+1 - sj * (dj+2 - dj)/6

For a closed path additional points dN+1, C1N and C2N are added to the sets for the resulting output:
C1N = dN + rN * (dN+1 - dN-1)/6
C2N = d1 - sN * (d2 - d0)/6
dN+1 = d1
This means effectively, that only d0 is not used and removed from the output for a closed path and that it is in general not useful to chose manually the first and last data point to be the same for authors, because this is already done by this mechanism, needed anyway to calculate the first als last path segment properly.

If for example dataPath is intended to be used to present the resulting path, there is an additional set with the path commands required.
For an open path with n+1 input data points this path command set has the set items 'M', '1', 'C', and the number n as last item. For a closed path with n input data points this path command set has the set items 'M', '1', 'C', the number n and as last item 'z'.
Because the resulting data can have different meanings, these sets are not provided automatically with this element.

dataRemove

Description

Type: Element

Results referenced with the attribute in are removed from memory to optimise the memory management of the viewer. Authors are encouraged to remove all results not used anymore as soon as possible to keep the memory usage of the viewer low. To provide an attribute result is not necessary, if done, this information is not used for the interpretation of this element.

dataCreate

Description

Type: Element

This element is used to create a simple data set in a convenient way. The attribute result is used to identify and to reference the created data. The first item of result is related to the created data. Other items remain unchanged.
To provide an attribute in is not necessary, if done, this information is not used for the interpretation of this element.

nfs

Description

Type: Attribute

The value is a whitespace separated list of zero to three numbers n, f, s.
n is a positive integer indicating the number of data to be created. A floating point number is rounded off. A not positive number or characters not interpretable as a number is interpreted as 1. f indicates the first data, s the step to the next data created by adding the number s. If f and s are not interpretable as numbers, they are interpreted as 1. If more than three numbers are provided, the excessive numbers are not used.
Note for example, that for s=0 a set with n numbers equal to f is created.

nfl

Description

Type: Attribute

If the attribute nfs is specified, this attribute is ignored. The value is a whitespace separated list of zero to three numbers n, f, l.
n is a positive integer indicating the number of data to be created. A floating point number is rounded off. A not positive number or characters not interpretable as a number is interpreted as 1. f indicates the first data, l the last data. Note that for n = 1 the last data does not appear in the created set, only the first. The complete set is generated with equidistant steps from the first to the last data. If f and l are not interpretable as numbers, they are interpreted as 1. Missung list items are interpreted as 1. If more than three numbers are provided, the excessive numbers are not used.
If neither nfs nor nfl is specified, nfl = "1" is assumed.

dataUnite

Description

Type: Element

This element unites or joins together sets, provided in the attribute in to exactly one set with the name given with the attribute result. The first data in the new sets are those from the first set from in, followed by all data from the second and so on.

Data Interpretation and Presentation Elements

The behaviour for data presentation or interpretation elements corresponds to the SVG element symbol. Data presentation elements create new viewports including the attributes viewBox and preserveAspectRatio and attributes from the referencing element use x, y, width and height have influence on the presentations as specified in SVG.
An exception occurs, if a generated path is referenced for example as a motion path for animateMotion or for a textPath. This is possible too and only the generated path data are used for such an application.
Additionally to these specific attributes an author can provide presentation attributes or properties to presentation elements. These are inherited to the graphical representation of the data.
Because host languages like XHTML do not provide a functionality to reuse document fragments as SVG does, in such a language the output of an element like dataDump is presented directly as explained in the element description.

To be referencable authors should provide on all data presentation elements a fragment identifier. At the end of the processing of each data element a viewer can remove all results in data presentation elements without a fragment identifier from memory. Those with a fragment identifier represent the presentation of the processed data and are kept in memory and can be used by the author with the SVG element use for example.

For data interpretation on the other hand, authors can correlate data presentation elements or the related data element with attributes from RDFa or with another method to provide meta information to describe, how a graphical representation is related to the raw data, if the graphical representation is generated independently for viewers without the capability to generate the graphical representation using RDML. Or the data or the data presentation elements can be seen as meta information about the graphical representation as well, using attributes from RDFa.

The data presentation elements all have an attribute in to indicate the data sets to be presented. If not specified otherwise for an element, nothing is presented, if the attribute in is empty, not specified or the value is not interpretable as an indicator of a data set. If the element has a fallback for not indicated sets, those apply and the presentation is created from the fallback.

Animation: The in list is animatable. With this an author can simply exchange the data used for presentation.

Animation of the in attribute can produce a continuous result as well, this basically means an interpolation between the different values of the provided set data for each data multiplet. If in the animation values list for the in attribute within the first in list for a set appears a '?', this means, that this set is not animated.

dataDump

Description

Type: Element

This element generates a simple text output of the sets referenced in the attribute in mainly to provide a control of processed data for authors.
The text output is generated in SVG within an element textArea. Width and height are determined automatically.
For other host languages (or older versions of SVG) a correspondingly useful output is created. For example in XHTML this can be presented within an element pre. For such languages without the capability to provide graphical content, this might be the only applicable presentation element.
The SVG text output is generated by starting with a separator, followed by the first data of the first set, followed by a separator followed by the first data of the second set followed by a separator up to the data from the last set, followed by a separator and an element tbreak and a plain text line break (in XHTML: pre only the plain text line break as for other non graphical XML, for which only a preservation of whitespace might be useful for the presentation). Then the second data of the first set follows etc up to the end of all data.
Missing data are presented with nothing between the previous and the following separator. Authors have to take into account, that this may lead to confusions for some types of separators such as whitespace.

separator

Description

Type: Attribute

The attribute separator of the element dataDump indicates, how two successive data have to be separated from each other. Possible values consists of {*}. * represents a wildcard for the intended separator. The paranthesis { or } are excluded as parts of the separator.

If the attribute is not provided, this is interpreted as if { } is specified, representing a simple space.

digits

Description

Type: Attribute

The attribute digits of the element dataDump indicates, to how many digits the output is rounded (exclusively the sign, the dot and the E-part of scientic notation). If the available precision of the viewer is lower than the indicates number of digits, the available precision is used instead, of course. The value is an integer. A negative sign indicates, that exactly the number of digits has to be used, in doubt adding zeros after the available fractional part, if necessary. For a positive integer, missing digits are not added. If zero is indicated, this is the same as not providing the attribute at all, this means the result is not rounded.
This behaviour is only applicable for numbers and has no influence on data not interpretable as a number.

dataSymbol

Description

Type: Element

A multiple use of a symbol is provided, using the sets from in. Each data multiplet creates a new symbol.
The behaviour is comparable to several use elements referencing a symbol.

symSet

Description

Type: Attribute

This attribute indicates the order and meaning of the sets specified in the attribute in. These are the possible values:

xy
Indicates, that the first set represents the x coordinate, the second the y coordinate. The third set represents the width, the fourth the height of the symbol. This is used, if the attribute is not specified or the value does not fit to another type.
ra
Indicates a notation in polar coordinates. The first set represents the radial coordinate r, the second the angular coordinate a in degree. The third set represents the width, the fourth the height of the symbol.
The cartesian coordinates can be calculated as follows:
x = r cos(a)
y = r sin(a)

symPar

Description

Type: Attribute

This attribute defines values, if there are missing sets or data. The value of the attribute is a whitespace separated list of up to four numbers. If more than four numbers are provided, the excessive numbers are not used. As for the sets, the first and second represent the coordinates x and y (respectively the radial and angular coordinate) of the center of the symbol, the third and fourth the half width and height.
If the fourth list item is not provided, it is assumed to be 1, if the third list item is not provided, it is assumed to be 1, if the second list item is not provided, it is assumed to be 0, if the first list item is not provided, it is assumed to be 0, the same, if the attribute is not provided at all.
If a notation is not identificable as a number, this is the same as if it is not specified.

The presentation of this element is similar to that of multiple use elements referencing a symbol or a group of objects. If a use element references a symbol, one can provide the attributes x, y, width and height. The relations to the provided data multiplet is the following, where cx,cy represents the center, rx, ry the half width and half height, x, y, width and height the values of the related attributes from use:
x = cx - rx
y = cy - ry
width = 2 rx
height = 2 ry

The SVG symbol to be used is referenced with the attribute href from XLink. The other attributes from Xlink are available too, as already specified: XLink attributes.
The author may alternatively reference a graphical element or a container element like g. In this case no new viewport is created as for each symbol and cx and cy simply have the same meaning as x and y of use, a simple translation. rx and ry in such a case do not influence the generated presentation.

Animation: The href from XLink is animatable. With this an author can simply exchange the used symbol.

For dataSymbol the animation of in can only be continuous, if the number of data per set is the same for all sets to be used for the animation. If this is not the case, the animation is discrete.

dataPath

Description

Type: Element

The sets from in are used to generate an SVG path.

pathSet

Description

Type: Attribute

The value of the attribute is a whitespace separated list of keywords to indicate the order of provided path data in the attribute in.

The possible keywords are:

PC
Path commands and numbers of parameters to be inserted. The possible command characters are those from SVG path data.
If no PC set is indicated, the path is empty.
Px
x coordinate of points specified in M, L, C, S, Q, T, A.
px
relative x coordinate of points specified in m, l, c, s, q, t, a.
Py
y coordinate of points specified in M, L, C, S, Q, T, A.
py
relative y coordinate of points specified in m, l, c, s, q, t, a.
Cx1
x first control point for command C.
cx1
relative x first control point for command c.
Cy1
y first control point for command C.
cy1
relative y first control point for command c.
Cx2
x second control point for command C.
cx2
relative x second control point for command c.
Cy2
y second control point for command C.
cy2
relative y second control point for command c.
Sx2
x control point for command S.
sx2
relative x control point for command s.
Sy2
y control point for command S.
sy2
relative y control point for command s.
Qx2
x control point for command Q.
qx2
relative x control point for command q.
Qy2
y control point for command Q.
qy2
relative y control point for command q.
H
x coordinate of points specified in H.
h
relative x coordinate of points specified in h.
V
y coordinate of points specified in V.
v
relative y coordinate of points specified in v.
Ax
radius (half main axis) rx of command A.
ax
relative radius (half main axis) rx of command A.
Ay
radius (half main axis) ry of command A.
ay
relative radius (half main axis) ry of command A.
Ar
rotation angle of the rx axis of command A.
ar
rotation angle of the rx axis of command a.
Al
large-arc-flag of command A.
al
large-arc-flag of command a.
As
sweep-flag of command A.
as
sweep-flag of command a.

If a keyword is not noted only once, the item noted first is used to identify the related set. If unknown keywords are noted, the related sets do not contribute to the presentation.

The number behind a command character in the PC set indicates, how many data are taken from the sets related to the command. If after a number a second number appears, this only indicates an additional amount of data related to the same previous command.
Floating point numbers are rounded down.
If no positive number is provided, where parameters are required, the number is assumed to be 1.
Characters not interpretable as commands or numbers are ignored.
If numbers appear in positions, where no parameters within the path data are expected, the numbers are ignored.
Missing data or missing sets are interpreted as zero.
These rules are processed in the order, they are noted here.

Animation: The path is animatable with an animation of in, continuous animation too, if the represented path data fit together for interpolation. This is for example the case, if the set with the commands is indicated to be not animated, but there are other possibilities too.
See the animation paragraph for details.

Consideration: It could be useful to provide a specific element dataInterpolation to interpolate locally between data points, both with specified derivatives and maybe even more important without. A local method calculating the derivative of a point using only about four adjoining points will be often more useful than to calculate this from the complete set, if there is some noise in the data. And the method/formula is pretty simple and one only has to distinguish between open and closed paths.
On the other hand, it can be seen as the task of the author to calculate this, what is already possible with minor tricks and the element dataTransform. Of course, even if such a specific element is provided, an author can still calculate the path on his own with own sophisticated methods.

dataText

Description

Type: Element

The sets from in are used to provide text content and to position multiple structures equivalent to an SVG text.

textSet

Description

Type: Attribute

The value of the attribute is a whitespace separated list of keywords to indicate the order of provided path data in the attribute in.

The possible keywords are:

t
the related set contains the text elements content, each data for one element.
x
the related set the x positions for the text elements corresponding to the attribute x
y
the related set the y positions for the text elements corresponding to the attribute y
rotate
the related set corresponds to the attribute rotate
dx
the related set corresponds to the attribute dx
dy
the related set corresponds to the attribute dx
textLength
the related set corresponds to the attribute textLength
lengthAdjust
the related set corresponds to the attribute lengthAdjust

If a keyword is not noted only once, the item noted first is used to identify the related set. If unknown keywords are noted, the related sets do not contribute to the presentation.
If the number of data in the different sets is different, the longest set determines, how many text items are presented. Missing data are assumed to be the same as the last provided data item for each set.
An empty or missing t set indicates empty text items, for other empty or missing sets the corresponding behaviour from SVG text is assumed, as if the corresponding attribute is not provided.

Note, that except for the last two one the other attributes can contain lists of numbers, coordinates or lengths, therefore the sets data may contain those lists too.

Animation: The represented text attributes are animatable with an animation of in, continuous animation too.
See the animation paragraph for details.

dataErrorBars

Description

Type: Element

The sets from in are used to create error bars, typically to visualise measurements. There are different models for error bars, this element assumes a measurement with two dimensions x and y or a measurement of a two dimensional entity. Now x can have an error or uncertainty or y can have an error or uncertainty. Note that errors a typically not negative values, however this approach does not restrict the number range for error sets. Authors have to care, that error sets have meaningful data. The error can be symmetrically around the value or it can be asymmetrically. This results in different data multiplets to be provided with the in.
The type of multiplet is indicated with the attribute errorSet.
Now the error bars can be presented in different ways, this is indicated with the attributes barX and barY.

errorSet

Description

Type: Attribute

This attribute indicates, which data multiplet is provided and presented. The attribute value indicates the type and the order of sets provided in the attribute in. If no type is indicated, the path is empty. There are the following types as possible values:

xydy
Only the y set has a symmetrical error.
xydx
Only the x set has a symmetrical error.
xydxdy
Both the x and y set have a symmetrical error.
xydy1dy2
Only the y set has an asymmetrical error.
xydx1dx2
Only the x set has an asymmetrical error.
xydydx1dx2
The y set has a symmetrical error. The x has an asymmetrical error.
xydxdy1dy2
The x set has a symmetrical error. The y has an asymmetrical error.
xydx1dx2dy1dy2
Both the x and y set have an asymmetrical error.
x1y1x2y2
Indicates directly the ends of an error bar as absolute values and allows error bars in arbitrary directions.
This notation implicates as well, that this error is related to an entity in a two dimensional space and should not be used, if the interpretation of the two dimensions implicates different units, for example like time and mass or angle and intensity.
This may be useful to indicate intervals too, however for such an application the author should provide additional meta information indicating the interpretation as an interval and whether the intervals are begin/end inclusive/exclusive.
xydr
As the previous type this indicates, that the error is related to an entity in a two dimensional space. The error margin is a circle around the given point with the radius dr.

barX

Description

Type: Attribute

This attribute indicates, how the error bar for the x dimension is presented (or for the case x1y1x2y2). The value is a number, indicating the half length of the bar line at the ends of the error bar. If the number is not provided or not interpretable as a number, the number is assumed to be 1.

barY

Description

Type: Attribute

This attribute indicates, how the error bar for the y dimension is presented. The value is a not negative number, indicating the half length of the bar line at the ends of the error bar. If the number is not provided or not interpretable as a number, the number is assumed to be 1.

For the presentation, a path is generated with subpaths for each data multiplet. For the further discussion a symmetrical error is expanded into two identical asymmetrical errors. First the case for other errorSet values than x1y1x2y2 or xydr is discussed:

Task if errors for y have to be presented. Let the data multiplet be noted as x, y, dy1, dy2. The subpath to be created for this multiplet is: M x, y-dy1 L x, y+dy2
If the number of barY is not zero (lets call it b here), two more subpaths are created: M x-b, y-dy1 L x+b, y-dy1 M x-b, y+dy2 L x+b, y+dy2

Task if errors for x have to be presented. Let the data multiplet be noted as x, y, dx1, dx2. The subpath to be created for this multiplet is: M x-dx1, y L x+dx2, y
If the number of barX is not zero (lets call it b here), two more subpaths are created: M x-dx1, y-b L x-dx1, y+b M x+dx2, y-b L x+dx2, y+b

The width and color of the error bar path is given as usual with the stroke properties.
Note, that negative values within the sets for errors are not excluded, but concerning the contents not useful and meaningful and will at least exchange the meaning of dx1 and dx2, respectively dy1 and dy2 in the graphics - or if only one of them is negative, both will be at one side of the data point.

In the case with the errorSet value x1y1x2y2 the following procedure applies:
Lets call the data according to the errorSet value x1y1x2y2.
And lets call the number of barX b.
First calculate the difference x3 = x1 -x2, y3 = y1 -y2.
Then calculate the length of the difference: r = (x32 + y32)1/2
Calculate help error bar positions: If r = 0, x4=1, y4=0; else x4 = -b y3/r, y4= b x3/r;
The first subpath to be created is: M x1 y1 L x2 y2.
If b is not zero, two more subpaths are created: M x1 - x4, y1 - y4 L x1 + x4, y1 + y4 M x2 - x4, y2 -y4 L x2 + x4 , y2 + y4

In the case with the errorSet value xydr the following procedure applies:
Lets call the data according to the errorSet value xydr.
Circles with the radius dr around the center x,y are used to indicate the error margin.

Animation: The represented bars are animatable with an animation of in, continuous animation too.
See the animation paragraph for details.
Additionally the attributes barX and barY are animatable (not paced).

dataPolarPath

Description

Type: Element

The sets from in are used to create a path in polar coordinates. An equivalent of the proposed polarPath is created as described in the proposal.

origin

Description

Type: Attribute

This attribute indicates the center or origin if the related sets are not provided. If sets for the commands P, p are available, they take precedence. The value is a whitespace separated coordinate pair indicating the origin of the polar path. Not specified values are assumed to be zero.

polarSet

Description

Type: Attribute

The value of the attribute is a whitespace separated list of keywords to indicate the order of provided path data in the attribute in.

The possible keywords are:

PC
Path commands and numbers of parameters to be inserted. The possible command characters are those from the polarPath proposal.
If no PC set is indicated, the path is empty.
Px
x coordinate of the origin
px
relative x coordinate of the origin
Py
y coordinate of the origin
py
relative y coordinate of the origin
Pr
the radial component r for the commands N, I, J, K, F, G
pr
the relative radial component r for the commands n, i, j, k, f, g
Pa
the angular component a for the commands N, I, J, K, F, G
pa
the relative angular component a for the commands n, i, j, k, f, g
Kr1
r first control point for command K.
kr1
relative r first control point for command k.
Ka1
a first control point for command K.
ka1
relative a first control point for command k.
Kr2
r second control point for command K.
Kr2
relative r second control point for command k.
Ka2
a second control point for command K.
ka2
relative a second control point for command k.
Gr2
r control point for command G.
gr2
relative r control point for command g.
Ga2
a control point for command G.
ga2
relative a control point for command g.
Jr2
r control point for command J.
Jr2
relative r control point for command j.
Ja2
a control point for command J.
ja2
relative a control point for command j.
R0
parameter 0 for command R.
r0
parameter 0 for command r.
R1
parameter 1 for command R.
r1
parameter 1 for command r.
R2
parameter 2 for command R.
r2
parameter 2 for command r.
R3
parameter 3 for command R.
r3
parameter 3 for command r.

The number behind a command character in the PC set indicates, how many data are taken from the sets related to the command. If after a number a second number appears, this only indicates an additional amount of data related to the same previous command.
Floating point numbers are rounded down.
If no positive number is provided, where parameters are required, the number is assumed to be 1.
Characters not interpretable as commands or numbers are ignored.
If numbers appear in positions, where no parameters within the path data are expected, the numbers are ignored.

Missing data or missing sets are interpreted as zero. These rules are processed in the order, they are noted here.

Animation: The path is animatable with an animation of in, continuous animation too, if the represented polar path data fit together for interpolation. This is for example the case, if the set with the commands is indicated to be not animated, but there are other possibilities too.
See the animation paragraph for details.
origin is animatable too.

Considerations: Are this element and maybe the elliptical arc command sufficient to create something like pie charts or should there be a specific element dataPieChart? To have this specific element has the advantage, that the structure is semantically more specific, what creates a better accessibility and authors do not have to think how to create such structures, if this is available with one element.

dataPolarErrorBars

Description

Type: Element

The sets from in are used to create error bars in polar coordinates, typically to visualise measurements. There are different models for error bars, this element assumes a measurement with two dimensions, the radial component r and the angular component a. Now r can have an error or uncertainty or a can have an error or uncertainty. The error can be symmetrically around the value or it can be asymmetrically. This results in different data multiplets to be provided with the in.
The type of multiplet is indicated with the attribute errorSet.
Now the error bars can be presented in different ways, this is indicated with the attributes barR and barA.
The attribute origin as already specified for dataPolarPath can be used to specify the origin.

errorSet

Description

Type: Attribute

This attribute indicates, which data multiplet is provided and presented. The attribute value indicates the type and the order of sets provided in the attribute in. If no type is indicated, the path is empty. There are the following types as possible values:

rada
Only the a set has a symmetrical error.
radr
Only the r set has a symmetrical error.
radrda
Both the r and a set have a symmetrical error.
rada1da2
Only the a set has an asymmetrical error.
radr1dr2
Only the r set has an asymmetrical error.
radadr1dr2
The a set has a symmetrical error. The r has an asymmetrical error.
radrda1da2
The r set has a symmetrical error. The a has an asymmetrical error.
radr1dr2da1da2
Both the r and a set have an asymmetrical error.

barR

Description

Type: Attribute

This attribute indicates, how the error bar for the r dimension is presented. The value is a number, indicating the half angular length of the bar line at the ends of the error bar. If the number is not provided or not interpretable as a number, the number is assumed to be 1.

barA

Description

Type: Attribute

This attribute indicates, how the error bar for the a dimension is presented. The value is a not negative number, indicating the half radial length of the bar line at the ends of the error bar. If the number is not provided or not interpretable as a number, the number is assumed to be 1.

For the presentation, a path is generated with subpaths for each data multiplet. For the further discussion a symmetrical error is expanded into two identical asymmetrical errors.

Task if errors for a have to be presented. Let the data multiplet be noted as r, a, da1, da2. The subpath to be created for this multiplet is: N r, a-da1 I r, a+da2
If the number of barA is not zero (lets call it b here), two more subpaths are created: N r-b, a-da1 I r+b, a-da1 N r-b, a+da2 I r+b, a+da2

Task if errors for r have to be presented. Let the data multiplet be noted as r, a, dr1, dr2. The subpath to be created for this multiplet is: N r-dr1, a I r+dr2, a
If the second number of barR is not zero (lets call it b here), two more subpaths are created: N r-dr1, a-b I r-dr1, a+b N r+dr2, a-b I r+dr2, a+b

The width and color of the error bar path is given as usual with the stroke properties.
Note, that negative values within the sets for errors are not excluded, but concerning the contents not useful and meaningful and will at least exchange the meaning of dr1 and dr2, respectively da1 and da2 in the graphics - or if only one of them is negative, both will be at one side of the data point.

Animation: The represented bars are animatable with an animation of in, continuous animation too.
See the animation paragraph for details.

dataScale

Description

Type: Element

A scale is presented for one direction.

scaleType

Description

Type: Attribute

The scale type is indicated. The value is a whitespace separated list of a key character followed by up to three numbers. The possible characters are 'x' or 'y' indicating the dimension, the scale is intended for. If the attribute or character is missing or not 'x' or 'y', 'x' is assumed.
The numbers are fallbacks, if corresponding sets are not provided.
The second number indicates the position within the other dimension, where the scale has to be presented. If missing, 0 is assumed. The other two numbers indicate the size of the scaling bars relative to the second number. If not provided they are assumed to be 1.

The presentation is a generated path as follows,where the positions of the bars are derived from the provided sets.

If 'x' is indicated, the first set indicates the x positions of the scale bars, lets call the data from the multiplet x. The second and third set indicate the size in y direction of the scale bar, lets call the data y1 and y2. If there is no x, no bar is presented, if both y1 and y2 are missing and no fallback is available from scaleType, no bar is presented. If either y1 or y2 is missing and no fallback from scaleType is available, the missing one is assumed to be the same as the provided one. Then there is one bar for each provided multiplet presented as a subpath of the scale path.
The subpath is: M x, y-y1 L x, y+y2

If 'y' is indicated, the first set indicates the y positions of the scale bars, lets call the data from the multiplet y. The second and third set indicate the size in x direction of the scale bar, lets call the data x1 and x2. If there is no y, no bar is presented, if both x1 and x2 are missing and no fallback is available from scaleType, no bar is presented. If either x1 or x2 is missing and no fallback from scaleType is available, the missing one is assumed to be the same as the provided one. Then there is one bar for each provided multiplet presented as a subpath of the scale path.
The subpath is: M x-x1, y L x+x2, y

The width and other styling is provided as usual with the related stroke properties.

Considerations: It could be useful to provide alternatively a method to specify a symbol for the scale markers instead of only allowing simple lines. Currently the scale has no axis. Obviously this can be simply done either with another scale item in the perpendicular direction or with one simple line. Because the lengths of the markers can be already specified, this can be used to create a grid, if required.
Another option could be to provide an angular scale too, the radial is already available with an x or y scale, is it useful to provide a scale with an arbitrary angle, not just in x and y direction?

dataSpaceSymbol

Description

Type: Element

Sometimes it is desirable to visualise data in a three dimensional space with a projection onto the two dimensional canvas. This element enables authors to do this with symbols as data representations. Obviously such a projection implies a loss of information and it will at least create plurivalences. But this can be useful as an additional presentation of three or multi dimensional data to improve the understandability of complex relations between data.
The human brain has some experience to identify and to interprete the data in such a projection, however in many cases the experience missguides the human brain as well due to the plurivalences. Sometimes animation of the projection helps to solve this problem, sometimes the wrong interpretation of the brain is stronger than any attempt of the author to solve this problem, therefore such a presentation is not really reliable. However because RDML specifies both, how the projection is created and which are the complete data before projection and presentation, the data themselves are still usable without plurivalences, if required.
Apart from the time as fourth dimension the human brain has no or almost no experience with a four dimensional space and projections onto a two dimensional canvas. Additionally if already two dimensions are lost within the projection, the plurivalences grow dramatically, therefore the presentation is limited to a projection from three to two dimensions.

projectionType

Description

Type: Attribute

There is more than one projection type common, therefore one has to specify, which type is intended. Which type is the most useful, depends on the data of course. The following types are available, indicated with a single character as value of the attribute. Separated with whitespace this can optionally followed by a + or -.
The specified value is assumed to be 'p', if the attribute is not provided or the value not identificable as one of the available ones.

p
A parallel projection is performed before presentation. This is often used for technical drawings and it is often possible to reconstruct the information. This projection type is typically closely related to a 'natural' visual impression, if the size of the object is very small compared to distance between the object and the observer, for example for a view on another galaxy or solar system. For such situations, this projection method is a good approximation too.
c
A central projection is performed before presentation. This is often used from painters to project an object onto a plain canvas placed somewhere between the object and the observer. This projection model takes into account, that if the distance to the object perpendicular to the canvas plane is larger, the size of the view angle of the object gets smaller. The (single eye of the) observer is assumed to be a point in space and the view direction it fixed perpendicular to the canvas plane, this is basically the only point and view direction, from where the projection corresponds to a realistic impression. If the object is still far away from the canvas compared to its size, this approximation is nevertheless often close to a 'natural' visual impression, because the human brain tends to adjust such presentations to previous experiences with the appearence of real objects and their real dimensions.
s
A spherical projection is performed before presentation. This is similar to the type c. An object is projected onto a (spherical) canvas placed somewhere between the object and the observer. This projection model takes into account, that if the distance to the object to the observer is larger, the size of the view angle of an object gets smaller. The (single eye of the) observer is assumed to be a point in space, the view direction is not relevant for a realistic impression. If the object is still far away from the canvas compared to its size, this approximation is often close to a 'natural' visual impression, because the human brain tends to adjust such presentations to previous experiences with the appearence of real objects and their real dimensions.

While with type p the distance of the object to the observer has no influence on the presentation, types c and s take this into account, but have different problems. The s type is more realistic in general and less sensitive to the choice of the viewpoint of the observer and less sensitive to problems with the presentation of objects close to the viewpoint, however the combination of human eye and brain already correct some distortions due to objects in different distances, this corresponds to typical corrections within the optics of cameras, therefore this type typically exaggerates perspective effects. The c type is sensitive to problems with the presentation of objects close to the viewpoint plane parallel to the canvas. This type neglects completely distortion due to the fact, that objects far away not only in the direction perpendicular to the canvas appear in a smaller view angle.

projectionDist

Description

Type: Attribute

The distances between the observer and the projection plane is indicated with the (recommended positive) number specified within the first attribute value. If not provided or not identificable as a number, the number is assumed to be 1.
Separated with whitespace a second number can be specified, indicating a translation of the object in z-direction after the object is oriented in space with the attribute orientation. If missing or not interpretable as a number, 0 is assumed. From the translation results a new z position of an object, where the observer is assumed to be at z=0 and the projection plane is at the position provided by the first number of this attribute.

orientation

Description

Type: Attribute

The data can be rotated into space before the projection takes place. The attribute specifies the orientation of the input dimensions x, y, z to the dimensions u, v, w used for projection doing a rotation around a vector from the origin to the point (x, y, z) = (p, q, r).
The value of orientation is a whitespace separated list of up to four numbers, the first with an optional unit. The first item is an angle (called a in the following discussion). If no unit is provided or the unit is not identificable, deg(ree) is assumed. If the angle is not identificable or not provided, 0 is assumed, this means no rotation at all.
Available units are deg, grad, rad and turns.
This second to fourth items are numbers, representing the vector (p, q, r). Missing numbers or items not identificable as a number are assumed to be zero. Only if all three numbers are missing or zero, the last number is corrected to the value 1, the other two to 0. Before further processing, a viewer has to reduce the length of vector to 1 such that the numbers represent a unit vector by deviding it to its length (Euclidian) without changing the orientation to use the formulas given in the following paragraphs.

symPar

Description

Type: Attribute

This attribute defines values, if there are missing sets or data. The value of the attribute is a whitespace separated list of up to five numbers. If more than five numbers are provided, the excessive numbers are not used. As for the sets, the first to third represent the coordinates x, y and z of the center of the symbol, the third and fourth the half width and height.
If the fifth list item is not provided, it is assumed to be 1, if the fourth list item is not provided, it is assumed to be 1, if the third list item is not provided, it is assumed to be 0, if the second list item is not provided, it is assumed to be 0, if the first list item is not provided, it is assumed to be 0, the same, if the attribute is not provided at all.
If a notation is not identificable as a number, this is the same as if it is not specified.

The SVG symbol to be used is referenced with the attribute href from XLink. The other attributes from Xlink are available too, as already specified: XLink attributes. Authors may reference other graphical elements or groups as well as already discussed for dataSymbol.
href from XLink is animatable.

In the following x, y, z are related to a data multiplet from the first three sets provided in the attribute in in this order, w and h are related to the fourth and fifth set of the multiplet indicating the half width and half height of the symbol.
a is the angle, (p, q, r) the unity vector, both derived from the attribute orientation as described.

Let c be the cosinus from the angle, s the sinus and t = 1 - cosinus of the angle and e the second number specified in projectionDist.
Then the new coordinates after rotation are x', y', z':
x' = (t p p + c) x + (t p q - s r) y + (t p r + s q) z
y' = (t p q + s r) x + (t q q + c) y + (t q r - s p) z
z' = e + (t p r - s q) x + (t r q + s p) y + (t r r + c) z

The presentation of this element is similar to that of multiple use elements referencing a symbol or a group of objects. If the projectionType is p, x' and y' are used as x and y positions of the symbol as specified for the element dataSymbol.
If within projectionType an additional + is provided, a symbol is only presented, if the z' is not negative (this means z' is zero or positive). But if an additional - is provided, a symbol is only presented, if the z' is not positive (this means z' is zero or negative).
Width and height of the symbol remain unchanged as specified in the related sets.

If the projectionType is c, the following projection is done with the first value item of the attribute projectionDist d:
x'' = x' d/z'
y'' = y' d/z'
w' = w d/z'
h' = h d/z'
if z' is not 0, else the symbol is not presented at all. Else it is presented, if neither + nor - is provided in projectionType.
If within projectionType an additional + is provided, a symbol is only presented, if the z' is positive. But if an additional - is provided, a symbol is only presented, if the z' is negative.
x'' and y'' are used as x and y positions and w' and h' the half width and height of the symbol as specified for the element dataSymbol.

If the projectionType is s, the following projection is done with the value of the attribute projectionDist d:
Let H = d /(x'2 + y'2 + z'2) 1/2 if this is a finite number.
Then the projection is
x'' = H x'
y'' = H y'
w' = H w
h' = H h
If H is not a finite number, the symbol is not presented at all. Else it is presented, if neither + nor - is provided in projectionType.
If within projectionType an additional + is provided, a symbol is only presented, if the z' is positive. But if an additional - is provided, a symbol is only presented, if the z' is negative.
x'' and y'' are used as x and y and w' and h' the half width and height positions of the symbol as specied for the element dataSymbol.

Else the presentation is as described for dataSymbol.

Note, that the formulas implicate a right handed system with the origin at the position of the observer and with a z-axis pointing from the observer to the presentation plane. Typically it is a good approach to specify the initial sets around zero and to translate them after orientation with a positive number for the second item of the projectionDist attribute away from the observer (and maybe projection plane as well) for the types c and s. A positive z' means, that the object is in front of the observer, therefore typically visible. A negative z' is behind the observer and typically not visible in a realistic situation. H = infinite (x' = y' = z' = 0) means for the type s, that the object position is in the eye of the observer. There is no visualisation of such a situation, therefore such a symbol is not displayed. Due to obvious mathematical problems, there is no visualisation of z' = 0 for the type c, therefore such symbols are not displayed as well.
Note further, that for example SVG filters use a different, left handed coordinate system with another origin, not much related to this projection problem for raw data.

The attributes projectionType, projectionDist and orientation are animatable.
Without animation the presentation of this element can be created step by step of course, however to animate only the in from dataSymbol results either in different effects or in the requirement to provide much more values for animation to approximate a similar effect. Without animation of course there is still a semantical advantage by using this element instead of dataSymbol, if it is the task to present three dimensional data with symbols.

dataSpacePath

Description

Type: Element

A projection of a three dimensional path to a two dimensional presentation.

The attributes projectionType, projectionDist and orientation are available as specified for dataSpaceSymbol.

The sets from in are used to generate an SVG path.

spaceSet

Description

Type: Attribute

The value of the attribute is a whitespace separated list of keywords to indicate the order of provided path data in the attribute in.

The possible keywords are:

PC
Path commands and numbers of parameters to be inserted. The possible command characters are the path commands M, L, Q, T, C, S, Z, z. The possible command characters are a subset of those from SVG path data, these are only absolute commands (large letters and z) and no elliptical arc commands and no short forms H and V.
If no PC set is indicated, the path is empty.
Px
x coordinate of points specified in M, L, C, S, Q, T.
Py
y coordinate of points specified in M, L, C, S, Q, T.
Pz
z coordinate of points specified in M, L, C, S, Q, T.
Cx1
x first control point for command C.
Cy1
y first control point for command C.
Cz1
z first control point for command C.
Cx2
x second control point for command C.
Cy2
y second control point for command C.
Cz2
z second control point for command C.
Sx2
x control point for command S.
Sy2
y control point for command S.
Sz2
z control point for command S.
Qx2
x control point for command Q.
Qy2
y control point for command Q.
Qz2
z control point for command Q.

The number behind a command character in the PC set indicates, how many data are taken from the sets related to the command. If after a number a second number appears, this only indicates an additional amount of data related to the same previous command.
Floating point numbers are rounded down.
If no positive number is provided, where parameters are required, the number is assumed to be 1.
Characters not interpretable as commands or numbers are ignored.
If numbers appear in positions, where no parameters within the path data are expected, the numbers are ignored.
Missing data or missing sets are interpreted as zero.
These rules are processed in the order, they are noted here.

The transformation into two dimensional path data is done for each coordinate triple xi, yi and zi as already described for such triples for the element dataSpaceSymbol. The resulting coordinate pairs are inserted into the path to be created. If it is found within processing, that a coordinate triple is not to be presented, the path fragment from the previous to the next presentable coordinate triple is dropped including related control points and the next presentable coordinate triple starts a new subpath. Within an animation this procedure is done for all interpolation steps, not only for the specified values, therefore the dropping condition may change from one animation step to the next, but this causes no further restriction on the possibility of continuous animations.

Authors have to note, that this is not intended or sufficient to create arbitrary three dimensional objects, respectively projections of them and that only the points and control points are transformed and projected. This does not take into account problems of the rendering order or the problem, that the same path in space described by different commands may result in (slightly) different projections, because only the points and control points are projected and the path is created after such a projection. The main task of this feature is to help to create an approximative visualisation of simple paths, the results are however still simple two dimensional paths. To get the impression of a more complex three dimensional object, typically an author has to use several small replacement paths and has to arrange them in a proper rendering order. Therefore this element does only the projection job for each small object fragment separately. How to put them together to a convincing illusion is still the task of the author.

Animation: The attributes projectionType, projectionDist and orientation are animatable as described for dataSpaceSymbol.
The path is animatable with an animation of in, continuous animation too, if the represented path data fit together for interpolation. This is for example the case, if the set with the commands is indicated to be not animated, but there are other possibilities too.
See the animation paragraph for details.

dataField

Description

Type: Element

The first set from in is used to generate a discrete two dimensional color distribution. This is mainly intended to provide a visualisation of measurements, depending on two parameters, for example intensities measured with multichannel arrays.
It is not intended as a replacement for a continuous gradient.

fieldDim

Description

Type: Attribute

This attribute indicates the dimensions of the dataField provided as the first set noted in in.

The value of the attribute is a whitespace separated list of up to two positive integers. If there is only one number, the second is assumed to be the same as the first. If there is no number or a list item is not interpretable as number, 2 is assumed. If a number is not an integer, it is rounded (down) to the next positive integer.

The first item indicates the number of data in x-direction, the second the number of data in y-direction. If a and b are the numbers, this means, the data 1 to a belong to x values 1 to a and y = 1. For a+1 to 2a they belong to y = 2 and x from 1 to a and so on.
If there are more than a*b data, the superfluous data are ignored.

fieldType

Description

Type: Attribute

This attribute indicates, which type of data is provided.
The value of the attribute is a keyword.

The possible keywords are:

intensity
The data are numbers between 0 and 1
percentage
The data are numbers between 0 and 100. Each data is divided by 100 before further processing to get an intensity value between 0 and 1.
color
A color value as allowed in SVG

If the attribute is not noted, 'intensity' is assumed.

fieldFallback

Description

Type: Attribute

The value of the attribute is a whitespace separated list of up to four fallback values for problematic data.

The first is a fallback for the case, that the data do not fit to the fieldType. If the fallback itself does not fit to the fieldType, 0 respectively black is assumed. An exception is a valid color, this is ok too for the cases 'intensity' or 'percentage' and indicates directly the color to be used for the fallback.

The second is a fallback for the case, that data are missing. If the fallback does not fit to the fieldType or the value is not provided at all, the first value is used as fallback. An exception is a valid color, this is ok too for the cases 'intensity' or 'percentage' and indicates directly the color to be used for the fallback.

The third is a fallback for the case, that for 'intensity' or 'percentage' data are smaller than zero. If the fallback does not fit to the fieldType or the value is not provided at all, the second value is used as fallback. An exception is a valid color, this is ok too for the cases 'intensity' or 'percentage' and indicates directly the color to be used for the fallback.

The fourth is a fallback for the case, that for 'intensity' or 'percentage' the data are larger than 1 for 'intensity' or 100 for 'percentage'. If the fallback does not fit to the fieldType or the value is not provided at all, the third value is used as fallback. An exception is a valid color, this is ok too for the cases 'intensity' or 'percentage' and indicates directly the color to be used for the fallback.

fieldColors

Description

Type: Attribute

For the fieldType 'intensity' or 'percentage' this is a whitespace separated list of colors, used to visualise the data. The first color corresponds to 0, the last to 1, respectively 100. For the values between between 0 and 1 (respectively 100) the colors are interpolated using the list in the given order. If no fieldKeys are provided, the provided fieldColors list is used with equidistant separation for the interpolation (This corresponds to the values list for animation). If the attribute is not noted, the following is assumed: fieldColors="black white"

fieldKeys

Description

Type: Attribute

For the fieldType 'intensity' or 'percentage' this is a whitespace separated list of keys, used to indicate the separation for the interpolation (This corresponds to the keyTimes list for animation). The first value has to be 0, the last 1. There have to be as many values as in fieldColors. Each successive value has to be greater than or equal to the preceding value. If the attribute value does not fit to these conditions, the attribute is ignored. If the attribute is not provided or ignored, equidistant steps are assumed and the corresponding key list implied.

fieldSplines

Description

Type: Attribute

For the fieldType 'intensity' or 'percentage' this is a whitespace separated list of key splines, used to indicate the interpolation curve between two fieldColors.

A set of Bézier control points associated with the fieldColors and fieldKeys list, defining a cubic Bézier function that controls interval pacing. The attribute value is a whitespace separated list of control point sets. Each control point set has two colors as values, describing the Bézier control points for one interpolation segment. The fieldKeys values that define the associated segment are the Bézier "anchor points", and the fieldSplines values are the control points. Thus, there must be one fewer sets of control points than there are fieldKeys. This means for n keys there are n-1 control point sets, respectively 2(n-1) control point colors. If there are too much control points, the superfluous are ignored. If there are not enough control points, the missing ones are assumed to be the same as the keys, the first control point is the same as the color of the interval begin, the second is the same as the interval end.

fieldBoxSize

Description

Type: Attribute

Each data point is presented as a rectangle (in the given order). This attribute indicates the sizes of all these rectangles. The value of the attribute is a whitespace separated list of up to four values.

The first list item indicates the width of the rectangle, the second the height, the third a width overlap delta, the fourth a height overlap delta.
If the last overlap delta is missing or not interpretable as a positive number, it is assumed to be the same as the first overlap delta. If the first overlap deltas is missing or the not interpretable as a positive number, zero is assumed. If the height is missing or not interpretable as a positive number, it is assumed to be the same as the width. If the width is missing or not interpretable as a positive number, it is assumed to be 1.
If the width overlap is larger than the width, the overlap is clamped to the width. If the height overlap is larger than the height, the overlap is clamped to the height.
These rules are processed in the given order.

fieldPosition

Description

Type: Attribute

This attribute indicates the position of the top left corner of the data field. The value of the attribute is a whitespace separated list of up to two values.

The first value indicates the x coordinate of the top left corner of the data field and the second the y coordinate. If the second is missing or not interpretable as a number, 0 is assumed. If the first value is missing or not interpretable as a number, or the complete attribute is missing, 0 is assumed.

The presentation of each data point is a rectangle. The rectangles are presented after each other, started with the first value and the following on top in rendering order due to the painters model.
If A is the x dimension and B the y dimension, n the data point, a number between 1 and N = A*B then:
Let y = floor ((n-1)/A)
Let x = (n-1) modulo A

Let the x-value from fieldPosition be a and the y-value be b.
Let w be the width from fieldSize and h the height, d the delta width and e the delta height.

The n-th data point rectangle has the x-position a+x and the y-position b+y. If x is not A-1 the width is w+d. If y is not B-1 the height is h+e. If x is A-1, the width is w. If y is B-1 the height is h. The fill color is derived from the data point.

If a stroke is noted on the element, this applies as a stroke around the complete field rectangle. fill-opacity applies as opacity to the complete processed field at once, with the result, that there are no visible residuals from the overlap, what would be the case, if fill-opacity would be applied to each generated rectangle separately.

Animation: The attributes fieldFallback, fieldColors, fieldKeys, fieldSplines, fieldBoxSize and fieldPosition are animatable. The structures of animation values have to fit together, else the animation of the corresponding attribute is only possible with calcMode 'discrete'.

in, fieldDim and fieldType are animatable too, just discrete of course, if fieldDim changes or the fieldType is switched between color and another type. If this is not the case, continuous interpolation for each data point separately is possible and therefore continuous animation too. The default calcMode is anyway 'discrete' for these three attributes.
Authors must not indicate another calcMode, if one of the attributes is modified in such a way, that continuous animation is not possible anymore. In case of such a conflict, the animation is ended, when the conflicting situation appears.

Considerations: Is it useful to extend the functionality of the element with two dimensional spline interpolation between the data points? Then this could be indeed used to create an arbitrary gradient.

dataAudio

Description

Type: Element

Creates an audio output as an interpretation of the provided data. This is an experimental feature to explore, how useful such a presentation is for such data, especially, if no visual presentation is available or possible, for example as an accessibility feature or a general alternative presentation of data. It is not intended to create some kind of fancy music or arbitrary noise.
The data from in are presented in an audible way. Therefore dataAudio is a timed element similar to the element audio with the same available attributes to control the timing, especially an (interactive) begin. The media duration is calculated automatically depending on the sets to be presented and the attributes specifying the time quants used for the presentation. Because the audible effect is specified directly, this does not require the interpretation of another audio format.

audioQuants

Description

Type: Attribute

This attribute indicates, how much time is used for the presentation of a single data, error or data multiplet. It is a whitespace separated list of up to four not negative numbers. Missing numbers or notations not interpretable as a non negative number are assumed to be zero. The list items indicate durations in seconds. The first item represents the duration, a single data is presented. The second item represents the pause until the next data is presented. The third item represents the pause after a data multiplet, the fourth the presentation time of an error bar. Presentation programs are expected to give a hint to the listener about the audioQuants on demand to simplify the identification of the timing for the listener.

audioSet

Description

Type: Attribute

This attribute indicates the meaning and order of sets indicated in the attribute in. It is a whitespace separated list of keywords with a possible parameter in paranthesis. The following keywords are possible:

s(*)
Indicates a data set. The * represents a not negative integer to relate error information in another set to this set and the order of presentation of the data. The data from the set with the lowest number are presented first, then that with the next larger number and so on. Floating point numbers are rounded down. Sets without a not negative integer are not presented. If there is more than one s with the same number, the first is presented, the others are ignored.
ds(*)
Indicates a symmetrical error to be presented. The * represents an existing number of an s keyword within the same list. If this does not exist, the set is not presented. If there is more than one ds with the same number, the first is presented, the others are ignored.
ds1(*)
Indicates an asymmetrical error to be presented, this is the first part of the asymmetrical error. The * represents an existing number of an s keyword within the same list. If this does not exist, the set is not presented. If there is more than one ds1 with the same number, the first is presented, the others are ignored.
ds2(*)
Indicates an asymmetrical error to be presented, this is the second part of the asymmetrical error. The * represents an existing number of an s keyword within the same list. If this does not exist, the set is not presented. If there is more than one ds2 with the same number, the first is presented, the others are ignored.

If both, ds(*) and ds1(*) and ds2(*) for the same set are specified, the ds(*) is ignored. If only one of ds1(*) and ds2(*) is specified and ds(*), ds(*) is used for the missing set, if ds(*) is missing either, the missing set of the asymmetrical error is presented without an audible audio output. If none of them are specified, no errors are presented.

For the presentation, the data are interpreted as frequencies in Hz. Authors should take into account, that the typical audible range is about 40Hz to 10kHz. If a data is not interpretable as positive number, the presentation is no audio output. Due to technical limitations there is a high probability, that frequencies far away from the audible range cannot be presented - the result will be no audio output as well.
Autors may provide an additional multiplet or sets to indicate a relation between characteristic numbers like 0 and 1 or a corresponding scaling indication and the audio output.
Let the numbers within audioQuants be q, p, m, e.

If only one set has to be presented, this happens as follows: Each data frequency is presented for q seconds, then there is a pause of p seconds followed by the next data presented again for q seconds and so on. After the last data there is no pause added and the presentation is completed.
For n > 0 data the media duration is therefore n q + (n-1) p seconds, for zero data the media duration is zero as well.

If a data multiplet is presented, this happens as follows: Each data frequency within a data multiplet is presented for q seconds, then there is a pause of q seconds followed by the next data presented again for q seconds and so on until one data multiplet is finished. Instead of using q, the last pause of a multiplet is m seconds, then the first data of the next multiplet is presented and so on. After the last data there is no pause added and the presentation is completed. A missing data is presented as no audio output.
For n > 0 data multiplets with i > 0 sets in each multiplet the media duration is therefore n (i q + (i-1)p) + (n-1)m seconds, for zero data the media duration is zero as well.

Error bar presentation for a set is inserted directly before and after the presentation interval of the data. The presentation time of the error bar is e seconds for each part of the error bar. If e is zero, the error bars are not presented.
The frequency f within the presentation changes as follows, using t as a time in seconds starting with 0 at the beginning of the presentation of the first part of the error bar, ds1 the first error bar data, ds2 the second, s the data. For symmetrical errors ds1 and ds2 are the same.
f(t) = (1 -t/e)(s -ds1) + s(t/e) for t from 0 to e.
f(t) = s for t from e to e+q
f(t+e+q) = (1 -t/e)(s) + (s+ds2)(t/e) for t+e+q from e+q to 2e+q.
Therefore the calculation of the media duration time is modified, for those data with errors instead of q the value 2e+q has to be taken to calculate the media duration time.

Considerations: Is this useful as a presentation, when no graphical presentation is available?
Some help and enlightment would be helpful here to improve the usability and functionality of this feature ;o) email the author ...

Samples

Within the current SVG 1.1 and tiny 1.2 RDML can only be used to provide the reusable raw data additionally to the graphical representation. It is possible to provide only the raw data with a small subset of RDML or the author can indicate the relation between the raw data and the graphical representation.

As an example to provide the raw data additionally: 3D-representation of a velocity resolved spectrum.
Another example shows how to provide the relation between the raw data and graphical representation: spectrum.
In a third example RDML is used as an extension of SVG. If a viewer supports both formats (or RDML is accepted as an SVG module in a future version), this should result in a similar presentation as the previous sample: spectrum (RDML used as extension).
Note that in the other two samples a PHP script is used to create the graphical representation, in the third sample this is not required anymore, everything is provided in a simple static file.

Example script to test the behaviour of interpolation with the formulas for dataInterpolation:
script sample interpolation
Interpolation of a circle as a sample for a curve. To calculate the derivatives respectively control points, only adjacent points are taken into account.
Available parameters (change in URI to test different combinations):
n: number of points
t: type of curve, 0 closed, 1 open
r,s: curvature information, r first control point, s second,
typically both a value around 1
In green a circle for comparison is given, blue is the cubic spline. Small circles indicate the given points (green-yellow), correspondingly the control points (cyan and magenta).

Formal Schema

Currently there is only a prototype available for a document type definition.

References

  1. SVG
  2. Literature Markup Language (LML)
  3. Text in SVG
  4. RDFa syntax
  5. XLink
  6. XHTML (1, 2), HTML4
  7. XHTML vocabulary
  8. WAI ARIA
  9. XHTML role attribute
  10. CURIE Syntax
  11. RDF, Semantic Web
  12. Dublin Core Metadata Initiative terms
  13. grace

Valid XHTML + RDFa