OGLML Descriptor Format
The first byte of an OGLML Descriptor defines the type of information to follow.
No OGLML Descriptor (0x00)
This is used when there is no OGLML document referenced by this descriptor.
Field |
length |
Description |
desctype |
1 (uint8) |
0x00 |
content |
0 |
No content is provided in this case |
Descriptor provided by external object (0x01)
This is used when the descriptor is contained in an external object.
Field |
length |
Description |
desctype |
1 (uint8) |
0x01 |
content |
2 (uint16) |
The external object ID of the object containing the OGLML Descriptor |
OGLML Document provided by URL (0x02)
The OGLML document is hosted on a web server. The descriptor provides the URL of the OGLML Document.
Field |
length |
Description |
desctype |
1 (uint8) |
0x02 |
urllen |
1 (uint8) |
The length of the URL to follow including the null terminator |
url |
urllen |
The null-terminated URL of the external object. This must begin with “http://” or “https://”. The content on the webserver can be uncompressed or follow web conventions for zip or deflate compression.
file:// URLs may also be used but this should generally only be for development purposes and not actually on a released device. |
Descriptor provides the OGLML Document in-line (0x03)
The OGLML File document immediately follows the descriptor type field.
Field |
length |
Description |
desctype |
1 (uint8) |
0x03 |
content |
* |
OGLML XML File Content |
Descriptor provides a GZipped OGLML Document in-line (0x04)
The OGLML document is provided immediately following the descriptor type field (document is compressed in GZip format).
Field |
length |
Description |
desctype |
1 (uint8) |
0x04 |
content |
* |
GZipped OGLML XML File Content |
Descriptor provides a Deflate OGLML Document in-line (0x05)
The OGLML document is provided immediately following the descriptor type field (document is compressed in Deflate format).
Field |
length |
Description |
desctype |
1 (uint8) |
0x05 |
content |
* |
Deflate OGLML XML File Content |