2.1.4 Ink Content Part

The following table shows the content type and source relationship of an Ink Content part.

Part components 

Value

Content Type

application/inkml+xml

Source Relationship

http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml

An instance of this part specifies an Ink object.

An Ink Content part MUST be the target of an explicit relationship with a Document part containing a contentPart element ([ISO/IEC29500-1:2016] section 17.3.3.2), WordprocessingML Drawing contentPart (2.3.1.3) or lockedCanvas element ([ISO/IEC29500-1:2016] section 20.3.2.1) with contentPart element (2.3.1.3), a Slide part containing a contentPart element ([ISO/IEC29500-1:2016] section 19.3.1.14), a Worksheet Drawing part containing a contentPart element ([ISO/IEC29500-1:2016] section 20.5.2.12) or SpreadsheetML group contentPart element (2.20.1.1), or a Chart Drawing part containing a contentPart element (2.3.1.4).

The content of the Ink part is XML as specified by a subset of syntax and semantics for the Ink Markup Language as specified in [InkML]. The following table defines the subset of constructs supported as specified in [InkML]. The sections in the first column are references to the sections of [InkML]. The second column indicates the level of support for the construct.

InkML Structural Element

Description

ink

The root element of this part MUST be ink, and it MUST be in the http://www.w3.org/2003/InkML namespace.

traceFormat

MUST be a child of an inkSource to be recognized. It can be a child of other elements specified in [InkML], but its presence in elements other than inkSource is ignored and not persisted.

intermittentChannels

Can appear as a child element of traceFormat elements, but is ignored and not persisted.

channel

One or more channel elements MUST appear as child elements of a traceFormat element.

The name attribute can be any string, but strings other than the following strings are ignored: X, Y, Z, S, T, SN, F, TP, BP, OTx, OTy, OA, OE, OR, RP, RR, RY, TW, TH, and TC.  If the channel type "T" is used, the channel values MUST be integers that represent milliseconds.

The orientation attribute can be present, but is ignored.

The respectTo attribute can be present, but is ignored.

The units attribute can be any string, but any value other than the following value is ignored: dev, in, cm, deg, rad, s, lb, and g.

trace

There can be one or more trace elements at the root level of the part, or as child elements of traceGroup elements.

The type attribute can be present, but is ignored and not persisted.

The continuation attribute can be present, but is ignored and not persisted.

The priorRef attribute can be present, but is ignored and not persisted.

The contextRef attribute MUST be present and MUST reference the id of a context element defined in this part.

The brushRef attribute MUST be present and MUST reference the id of a brush element defined in this part.

The duration attribute can be present, but is ignored and not persisted.

The timeOffset attribute can be present, but is ignored and not persisted.

The contents of a trace element MUST be a string that conforms to the syntax and semantics for the Ink Markup Language as specified in [InkML] section 3.2.1.

traceGroup

There can be one or more traceGroup elements at the root level of the part, or as child elements of other traceGroup elements.

The contextRef attribute can be present, but is ignored and not persisted.

The brushRef attribute can be present, but is ignored and not persisted.

The annotation element can be present as a child element, but is ignored and not persisted.

The annotationXML element can be present as a child element. If present, it MUST contain an emma:emma element conforming to the format described in the following section on the Extensible MultiModal Annotation markup language (EMMA) as specified in the [EMMA] specification. Any other content is ignored and not persisted.

traceView

The traceView element can be present, but is ignored and not persisted.

context

MUST be a child of a definitions element to be recognized. It can be a child of other elements, but its presence in elements other than definitions is ignored and not persisted.

The contextRef attribute can be present, but is ignored and not persisted.

The canvasRef attribute can be present, but is ignored and not persisted.

The canvasTransformRef attribute can be present, but is ignored and not persisted.

The traceFormatRef attribute can be present, but is ignored and not persisted.

The inkSourceRef attribute can be present, but is ignored and not persisted.

The brushRef attribute can be present, but is ignored and not persisted.

The timestampRef attribute can be present, but is ignored and not persisted.

The canvas element can be present as a child element, but is ignored and not persisted.

The canvasTransform element can be present as a child element, but is ignored and not persisted.

The timestamp element can be present as a child element, but is ignored and not persisted.

inkSource

The xml:id attribute MUST be present.

sampleRate

Can be present as a child element, but is ignored and not persisted.

latency

Can be present as a child element, but is ignored and not persisted.

activeArea

Can be present as a child element, but is ignored and not persisted.

srcProperty

Can be present as a child element, but is ignored and not persisted.

channelProperties

The channelProperties element is optional and can contain zero or more channelProperty elements.  If absent, default properties are used that vary depending on the operating system and device drivers present. Can be present as a child element.

channelProperty

The channelProperty element is optional and specifies properties of a given channel. If absent, default properties are used that vary depending on the operating system and device drivers present. Can appear as a child of channelProperties elements.

The channel attribute MUST specify a channel previously defined in a traceFormat.

The name attribute can contain any name, but only the value "resolution" is regarded and persisted. All other values are ignored and not persisted.

brush

Can have a brushRef attribute, but it is ignored and not persisted.

brushProperty

The brushProperty element MUST have a name attribute. The value of name can be any string, but only the values width, height, color, transparency, tip, rasterOp, antiAliased, fitToCurve, and ignorePressure are used.  Any other value causes the brushProperty element to be ignored.

The optional value and units attributes MUST conform to certain parameters depending on the name attribute value.   If the value or units values do not conform to the following list, then a default value/unit is used.

width

Width of the brush.

The value attribute MUST be an xsd:decimal, and the units attribute MUST be a length unit as specified in [InkML] section 6.4.

Default is .053 cm.

height

Height of the brush.

The value attribute MUST be an xsd:decimal, and the units attribute MUST be a length unit as specified in [InkML] section 6.4.

Default is .001 cm.

color

Color of brush in RGB.

The value attribute MUST be a string that begins with a ‘#’ character followed by six hexadecimal digits.  The units attribute MUST NOT be present.

Default is #000000.

transparency

Transparency of brush.

The value attribute MUST be an xsd:int in the range of 0-255.  The units attribute MUST NOT be present.

Default is 0.

tip

The type of pen tip.

The value attribute MUST be either ellipse or rectangle.  The units attribute MUST NOT be present.

Default is ellipse.

rasterOp

A value that defines how the colors of the pen and background interact.

The value attribute MUST be black, copyPen, maskNotPen, maskPenNot, maskPen, mergeNotPen, mergePen, mergePenNot, noOperation, not, notCopyPen, notMaskPen, notMergePen, notXOrPen,  white or xOrPen. The units attribute MUST NOT be present.

black specifies a black pen color.

copyPen specifies that the current pen color property is used.

maskNotPen specifies a combination of the colors are common to both the pen and the inverse of the display.

maskPenNot specifies a combination of the colors are common to the background color and the inverse of the pen.

maskPen specifies a combination of the colors common to both the pen and the display.

mergeNotPen specifies a combination of the display color and the inverse of the pen color.

mergePen specifies a combination of the pen color and the display color.

mergePenNot specifies a combination of the pen color and the inverse of the display color.

noOperation specifies no operation; the output remains unchanged.

not specifies the inverse of the display color.

notCopyPen specifies the inverse of copyPen.

notMaskPen specifies the inverse of maskPen.

notMergePen specifies the inverse of mergePen.

notXOrPen specifies an inverse of xOrPen.

white specifies a white pen color.

xOrPen specifies a combination of the colors in the pen and in the display color, but not in both.

The default value is copyPen, which indicates that the current pen color is used.

antiAliased

A value that indicates if the drawn ink is anti-aliased.

The value attribute MUST be a xsd:boolean.  The units attribute MUST NOT be present.

      

Default is true.

fitToCurve

A value that indicates if the ink is rendered as a series of curves versus as lines between pen sample points.

The value attribute MUST be a xsd:boolean.  The units attribute MUST NOT be present.

Default is false.

ignorePressure

A value that indicates if pressure from the pen tip is ignored.

The value attribute MUST be a xsd:boolean.  The units attribute MUST NOT be present.

Default is false.

timestamp

Can be present, but is ignored and not persisted.

canvas

Can be present, but is ignored and not persisted.

canvasTransform

Can be present, but is ignored and not persisted.

mapping

Can be present, but is ignored and not persisted.

bind

Can be present, but is ignored and not persisted.

table

Can be present, but is ignored and not persisted.

matrix

Can be present, but is ignored and not persisted.

definitions

Can contain child trace elements, but they are ignored and not persisted. The trace element is regarded as a child element of only ink or traceGroup parent elements.

Can contain child traceGroup elements, but they are ignored and not persisted. The traceGroup element is regarded as a child element of only ink or other traceGroup parent elements.

Can contain child inkSource elements, but they are ignored and not persisted. The inkSource element is regarded as a child element of only context parent elements.

Can contain child traceFormat elements, but they are ignored and not persisted. The traceFormat element is regarded as a child element of only inkSource parent elements.

annotation

Can be present, but is ignored and not persisted.

annotationXML

If present as a child element of a traceGroup element, it MUST contain an emma:emma element that conforms to the subset of the EMMA as specified in [EMMA]. Otherwise, it is ignored and not persisted.

The annotationXML elements of a traceGroup element if present MUST contain XML that conforms to a subset of the EMMA as specified in [EMMA]. The following table defines the subset of constructs that are supported as specified in [EMMA]. The sections in the first column are references to the sections of [EMMA]. The second column indicates the level of support for the construct.

EMMA structural element

Description

Root element: emma:emma

The root element of the part MUST be emma, and it MUST be in the http://www.w3.org/2003/04/emma namespace.

Interpretation element: emma:interpretation

The first child element MUST be an emma:interpretation element, and it MUST contain a context element.

The id attribute of the emma:interpretation element can be present. If present, this attribute SHOULD be a GUID. If this attribute is present but the value is not a GUID, then the attribute is ignored and not round-tripped.

The emma:mode attribute MUST be present and MUST be set to "ink".

emma:one-of element

The second child element of emma:emma is an emma:one-of element, it MUST contain one or more emma:interpretation elements, and the child elements MUST be emma:literal elements that contain plain text. The series of literal interpretations specifies the recognized text of the ink object. The order of the emma:interpretation elements MUST be sorted in order of confidence, from highest to lowest.

The disjunction-type attribute MUST be present and MUST be set to "recognition".

emma:group element

The emma:emma element can contain an emma:group element, but its contents are ignored and not persisted.

emma:sequence element

The emma:emma element can contain an emma:sequence element, but its contents are ignored and not persisted.

Lattice markup: emma:lattice, emma:arc, and emma:node elements

The emma:interpretation element can contain an emma:lattice element, but its contents are ignored and not persisted.