<P5:Attributes> Element

The <p5:Attributes> element is a child element of the <p5:MetaInfo> element. It is used to describe user-defined attributes that contain various information on topobase shapes. An element that describes a user-defined element, must be named <p5:Attribute>. This element is a child element of <p5:Attributes> and has the following mandatory attributes: Name and Type. <p5:Attribute> has a child element <p5:Data>, which attributes contain actual attribute values, related to a specific shape.

The following attributes are used to create topobases:

The <p5:Attributes> attribute and all its child attributes are optional. If any of the attributes is missing, when converting values, its value can be skipped, default value can be used, or the value can be generated automatically.

Syntax

<p5:Attributes>

<p5:Attribute Name="ISO" Type="string">

<p5:Data Id="RU-MOS" Value="RU-MOS" />

...

</p5:Attribute>

<p5:Attribute Name="OriginOffset" Type="point">

<p5:Data Id="RU-MOS" Value="0.5,0.5" />

...

</p5:Attribute>

<p5:Attribute Name="TextOriginOffset" Type="point">

<p5:Data Id="RU-MOS" Value="0.5,0.5" />

...

</p5:Attribute>

<p5:Attribute Name="BarOriginOffset" Type="point">

<p5:Data Id="RU-MOS" Value="0.5,0.5" />

...

</p5:Attribute>

<p5:Attribute Name="PieOriginOffset" Type="point">

<p5:Data Id="RU-MOS" Value="0.5,0.5" />

...

</p5:Attribute>

<p5:Attribute Name="ImageOriginOffset" Type="point">

<p5:Data Id="RU-MOS" Value="0.5,0.5" />

...

</p5:Attribute>

</p5:Attributes>

Element Attributes

The <p5:Attributes> element has no attributes.

Attributes of the <p5:Attribute> element:

Attribute Description
Name Attribute name.
Type Available types of attribute values. The following values are available:
  • int. Integer values.

  • double. Real values (a point is used as a decimal separator).

  • bool. Boolean values.

  • string. String values.

  • date. Date and time.

  • point. A point on a plane, described by two double type coordinates, separated with a comma.

Attributes of the <p5:Data> element:

Attribute Description
Id Identifier of the shape to which the data belong.
Value Actual value that corresponds to the shape. Value type must correspond to the type defined in the Type attribute of the <p5:Attribute> element.

IMPORTANT. Names of all attributes must begin from an upper-case letter. Shape identifier must not start from a number.

See also:

SVG Topobase Structure