Home

MS Base

  • prefix: ms:
  • schema: b:

Categories (Data):

Categories (Governance):

values:

 
 

Schema element "b:encapsulate"

Describes how to convert bytes into bytes.

Definitions

<attributeGroup name="encapsulate">
  <attribute name="charset"    type="b:Constant" />
  <attribute name="encoded"    type="b:Constant" />
  <attribute name="compressed" type="b:Constant" />
</attributeGroup>

Description

Not all data is text, and not all text uses character-set UTF-8 (which is this library's native character-set). Therefore, quite a number of elements carry these optional attributes to indicate that processing has been done.

When the data is added, it will first convert from character-set to bytes, then compress, and finally encode. When the data is consumed, it will be first decoded, then uncompressed, and is than in the specified character-set

When decompression and/or decoding takes place, then the charset will default to ms:Charset/None. You MAY want to specify ms:Charset/Unknown when you think it is text. When no encoding or compression takes place, then the charset is inherited from the nested data structure.

attribute compressed

Contains a ms:Compress/ compression constant which explains which compression has taken place (before the optional encoding)

attribute encoded

When a byte (octet) string contains characters outside the ascii printable range, it SHALL be encoded with any format defined in ms:Encode/.

element charset

Charset is a common abbreviation of character set. Data elements (Unit content) always carry a character-set. By default, it is ms:Charset/None, expressing binary data. When it is character data, of undefined encoding, use ms:Charset/Unknown: maybe the application does not care.


mark@overmeer.net      Web-pages generated on 2023-12-19