Home > Support > Documentation

EXI decode structures and functions.


Classes

struct  OSEXIDecStringTable
 This structure defines the structure of the various string table partitions used by the decoder. More...
struct  OSEXIDecStringTables
 This structure defines the complete set of string table partitions used by the decoder. More...

Functions

EXTERNEXI int rtEXIDecAtmAddTransition (OSCTXT *pctxt, OSEXIAutomaton *pAutomaton, OSEXIState fromState, OSEXIState toState, const OSEXIEvent *pEvent, const OSEXIEventCode *pEventCode)
 This function adds a transition between two states.
EXTERNEXI OSEXIEventrtEXIDecAutomatonAdvance (OSCTXT *pctxt, OSEXIAutomaton *pAutomaton, const OSEXIEventCode *pEventCode, OSBOOL dynamicItems)
 This function advances the decoder automaton based on event code, adding new transitions if dynamicItems is set to true and either SE(*) or AT(*) are matched instead of SE(qname) or AT(qname), respectively.
EXTERNEXI OSEXIAutomatonrtEXIDecGetDocAutomaton (OSCTXT *pctxt, size_t numGblElems, const OSXMLFullQName *gblElems)
 This functions returns an automaton that accepts the built-in document grammar.
EXTERNEXI OSEXIAutomatonrtEXIDecGetElemAutomaton (OSCTXT *pctxt, OSXMLFullQName *pqname)
 This function returns an automaton that accepts the built-in element grammar.
EXTERNEXI int rtEXIDecAttribute (OSCTXT *pctxt, OSXMLFullQName *pqname, const OSUTF8CHAR **ppvalue)
 Decodes the attribute at the current position in the decode stream.
EXTERNEXI int rtEXIDecBoolValue (OSCTXT *pctxt, OSBOOL *pvalue)
 This function decodes a boolean value.
EXTERNEXI int rtEXIDec_CH_String_EE (OSCTXT *pctxt, const OSXMLFullQName *pqname, const OSUTF8CHAR **ppvalue)
 This function decodes a CH event (assumed to be a one part code = 0 in a 1 bit field) followed by string content followed by an EE event (assumed to be a one part code = 0 in a 1 bit field).
EXTERNEXI int rtEXIDecDate (OSCTXT *pctxt, OSNumDateTime *pvalue)
 This function decodes a date value into a structured variable.
EXTERNEXI int rtEXIDecDateString (OSCTXT *pctxt, const OSUTF8CHAR **ppvalue)
 This function decodes a date value into a string.
EXTERNEXI int rtEXIDecDocumentType (OSCTXT *pctxt, const OSUTF8CHAR **ppName, const OSUTF8CHAR **ppPublic, const OSUTF8CHAR **ppSystem, const OSUTF8CHAR **ppText)
 This function decodes an XML document type declaration (DTD).
EXTERNEXI int rtEXIDecEventCodePart1 (OSCTXT *pctxt, OSINT32 *ppart, OSUINT32 nbits)
 This function decodes part 1 of an event code.
EXTERNEXI OSBOOL rtEXIDecHasNext (OSCTXT *pctxt)
 This functions checks for additonal events in the decode stream.
EXTERNEXI int rtEXIDecIntValue (OSCTXT *pctxt, OSINT32 *pvalue)
 This function decodes a signed integer value.
EXTERNEXI int rtEXIDecLocalName (OSCTXT *pctxt, const OSUTF8CHAR **ppname)
 Returns the local name associated with the current event.
EXTERNEXI int rtEXIDecNamespaceURI (OSCTXT *pctxt, const OSUTF8CHAR **ppNSURI)
 Returns the namespace associated with the current event.
EXTERNEXI int rtEXIDecNBitUIntValue (OSCTXT *pctxt, OSUINT32 *pvalue, OSUINT32 nbits)
 This function decodes an unsigned integer value from a bit field of the given width.
EXTERNEXI int rtEXIDecNextEventType (OSCTXT *pctxt, OSEXIEventType *pEventType)
 Returns the next OSEXIEventType read by this decoder.
EXTERNEXI int rtEXIDecPrefix (OSCTXT *pctxt, const OSUTF8CHAR *uri, const OSUTF8CHAR **ppPrefix)
 Returns the namespace associated with the current event.
EXTERNEXI int rtEXIDecProcessingInstruction (OSCTXT *pctxt, const OSUTF8CHAR **ppTarget, const OSUTF8CHAR **ppData)
 This function decodes an XML processing instruction (PI).
EXTERNEXI int rtEXIDecQName (OSCTXT *pctxt, OSXMLFullQName *pqname)
 Returns the qname associated with the current event.
EXTERNEXI int rtEXIDecReset (OSCTXT *pctxt)
 Resets the decoder for decoding a new message instance.
EXTERNEXI int rtEXIDecString (OSCTXT *pctxt, const OSXMLFullQName *pqname, const OSUTF8CHAR **ppvalue)
 Returns the value associated with the current event.
EXTERNEXI int rtEXIDecStringCHEvent (OSCTXT *pctxt, const OSXMLFullQName *pqname, const OSUTF8CHAR **ppvalue)
 This function decodes a CH event (assumed to be a one-bit field with code 0) followed by string content.
EXTERNEXI int rtEXIDecStringToCharArray (OSCTXT *pctxt, const OSUTF8CHAR *target, size_t start, size_t length)
 Similar to rtEXIDecString but the characters are copied into a fixed-size character array.
EXTERNEXI int rtEXIDecStringLength (OSCTXT *pctxt)
 Returns the length of the string returned by rtEXIDecString.
EXTERNEXI int rtEXIDecUIntValue (OSCTXT *pctxt, OSUINT32 *pvalue)
 This function decodes an unsigned integer value.
EXTERNEXI int rtEXIDecUTF8Str (OSCTXT *pctxt, OSUTF8CHAR **ppvalue)
 This function decodes a UTF-8 string value.
EXTERNEXI int rtEXIDecUTF8Chars (OSCTXT *pctxt, OSUTF8CHAR **ppvalue, OSUINT32 nchars)
 This function reads the given number of characters from the decode stream and creates a UTF-8 string.
EXTERNEXI void rtEXIDecStringTableInit (OSCTXT *pctxt, OSEXIDecStringTable *pstrtab, size_t capacity)
 This function initializes the given string table structure.
EXTERNEXI OSEXIDecStringTablertEXIDecNewStringTable (OSCTXT *pctxt, size_t capacity)
 This function allocates and initializes a new string table structure.
EXTERNEXI void rtEXIDecStringTableClear (OSCTXT *pctxt, OSEXIDecStringTable *pstrtab)
 This function clears all strings out of the existing table.
EXTERNEXI OSUINT32 rtEXIDecStringTableAdd (OSCTXT *pctxt, OSEXIDecStringTable *pstrtab, const OSUTF8CHAR *str)
 This function adds a string to the given string table.
EXTERNEXI const OSUTF8CHAR * rtEXIDecStringTableGetString (OSEXIDecStringTable *pstrtab, OSUINT32 index)
 This function gets the string at the given index (i.e.
EXTERNEXI void rtEXIDecStrTabsInit (OSCTXT *pctxt, OSEXIDecStringTables *pstrtabs)
 This function initializes all EXI string table partitions.
EXTERNEXI void rtEXIDecStrTabsClear (OSCTXT *pctxt, OSEXIDecStringTables *pstrtabs)
 This function clears all EXI string table partitions.
EXTERNEXI OSUINT32 rtEXIDecStrTabsAddURI (OSCTXT *pctxt, OSEXIDecStringTables *pstrtabs, const OSUTF8CHAR *uri)
 This function will add a URI to the URI string table partition.
EXTERNEXI const OSUTF8CHAR * rtEXIDecStrTabsGetURI (OSEXIDecStringTables *pstrtabs, OSUINT32 index)
 This function will get the compact identifier of the given URI from the URI string table partition.
EXTERNEXI OSUINT32 rtEXIDecStrTabsGetURITableSize (OSEXIDecStringTables *pstrtabs)
 This function returns the current number of entries in the URI string table partition.
EXTERNEXI OSUINT32 rtEXIDecStrTabsAddPrefix (OSCTXT *pctxt, OSEXIDecStringTables *pstrtabs, const OSUTF8CHAR *uri, const OSUTF8CHAR *prefix)
 This function adds the given prefix to the prefix table partition identified by the given URI.
EXTERNEXI const OSUTF8CHAR * rtEXIDecStrTabsGetPrefix (OSEXIDecStringTables *pstrtabs, const OSUTF8CHAR *uri, OSUINT32 index)
 This function will get the compact identifier of the given prefix from the prefix string table partition identified by the given URI.
EXTERNEXI OSUINT32 rtEXIDecStrTabsGetPrefixTableSize (OSEXIDecStringTables *pstrtabs, const OSUTF8CHAR *uri)
 This function returns the current number of entries in the prefix string table partition identified by the given URI.
EXTERNEXI OSUINT32 rtEXIDecStrTabsAddLocalName (OSCTXT *pctxt, OSEXIDecStringTables *pstrtabs, const OSUTF8CHAR *uri, const OSUTF8CHAR *name)
 This function adds the given local name to the local name table partition identified by the given URI.
EXTERNEXI const OSUTF8CHAR * rtEXIDecStrTabsGetLocalName (OSEXIDecStringTables *pstrtabs, const OSUTF8CHAR *uri, OSUINT32 index)
 This function will get the compact identifier of the given localName from the localName string table partition identified by the given URI.
EXTERNEXI OSUINT32 rtEXIDecStrTabsGetLocalNameTableSize (OSEXIDecStringTables *pstrtabs, const OSUTF8CHAR *uri)
 This function returns the current number of entries in the localName string table partition identified by the given URI.
EXTERNEXI OSUINT32 rtEXIDecStrTabsAddLocalValue (OSCTXT *pctxt, OSEXIDecStringTables *pstrtabs, const OSXMLFullQName *qname, const OSUTF8CHAR *value)
 This function adds the given local value to the local value table partition identified by the given QName.
EXTERNEXI const OSUTF8CHAR * rtEXIDecStrTabsGetLocalValue (OSEXIDecStringTables *pstrtabs, const OSXMLFullQName *qname, OSUINT32 index)
 This function will get the compact identifier of the given local value from the local value string table partition identified by the given QName.
EXTERNEXI OSUINT32 rtEXIDecStrTabsGetLocalValueTableSize (OSEXIDecStringTables *pstrtabs, const OSXMLFullQName *qname)
 This function returns the current number of entries in the local value string table partition identified by the given QName.
EXTERNEXI OSUINT32 rtEXIDecStrTabsAddGlobalValue (OSCTXT *pctxt, OSEXIDecStringTables *pstrtabs, const OSUTF8CHAR *value)
 This function will add a string value to the global value string table partition.
EXTERNEXI const OSUTF8CHAR * rtEXIDecStrTabsGetGlobalValue (OSEXIDecStringTables *pstrtabs, OSUINT32 index)
 This function will get the compact identifier of the given string value from the global value string table partition.
EXTERNEXI OSUINT32 rtEXIDecStrTabsGetGlobalValueTableSize (OSEXIDecStringTables *pstrtabs)
 This function returns the current number of entries in the global value string table partition.

Function Documentation

EXTERNEXI int rtEXIDec_CH_String_EE OSCTXT *  pctxt,
const OSXMLFullQName *  pqname,
const OSUTF8CHAR **  ppvalue
 

This function decodes a CH event (assumed to be a one part code = 0 in a 1 bit field) followed by string content followed by an EE event (assumed to be a one part code = 0 in a 1 bit field).

Parameters:
pctxt Pointer to a context structure.
pqname QName the value is associated with. This should be the QName that was decoded from the stream prior to calling this function.
ppvalue Pointer to variable to receive decoded data. Memory for the decoded name is allocated with rtxMemAlloc. It must be freed with rtxMemFreePtr or it will be freed when all memory in the context is freed (rtxMemFreeAll or rtxFreeContext).
Returns:
Status of the operation:
  • 0 if success
  • a negative status code if failure

EXTERNEXI int rtEXIDecAtmAddTransition OSCTXT *  pctxt,
OSEXIAutomaton pAutomaton,
OSEXIState  fromState,
OSEXIState  toState,
const OSEXIEvent pEvent,
const OSEXIEventCode pEventCode
 

This function adds a transition between two states.

The transition is defined by a pair of states, and event and event code.

Parameters:
pctxt Pointer to context block structure.
pAutomaton Pointer to automaton structure.
fromState The origin state for this transition.
toState The destination state for this transition.
pEvent The event on which this transition occurs.
pEventCode The event code returned after the transition.
Returns:
Zero if operation was successful; a negative status code otherwise.

EXTERNEXI int rtEXIDecAttribute OSCTXT *  pctxt,
OSXMLFullQName *  pqname,
const OSUTF8CHAR **  ppvalue
 

Decodes the attribute at the current position in the decode stream.

This function is called when the application receives an AT event to get the attribute data.

Parameters:
pctxt Pointer to a context structure.
pqname Pointer to variable to receive decoded attribute QName. Memory for the decoded name components is allocated with rtxMemAlloc. It must be freed with rtxMemFreePtr or it will be freed when all memory in the context is freed (rtxMemFreeAll or rtxFreeContext).
ppvalue Pointer to variable to receive decoded data. Memory for the decoded name is allocated with rtxMemAlloc. It must be freed with rtxMemFreePtr or it will be freed when all memory in the context is freed (rtxMemFreeAll or rtxFreeContext).
Returns:
Status of the operation:
  • 0 if success
  • a negative status code if failure

EXTERNEXI OSEXIEvent* rtEXIDecAutomatonAdvance OSCTXT *  pctxt,
OSEXIAutomaton pAutomaton,
const OSEXIEventCode pEventCode,
OSBOOL  dynamicItems
 

This function advances the decoder automaton based on event code, adding new transitions if dynamicItems is set to true and either SE(*) or AT(*) are matched instead of SE(qname) or AT(qname), respectively.

Dynamic transitions for CH are also added according to the spec.

Parameters:
pctxt Pointer to context block structure.
pAutomaton Pointer to automaton structure.
pEventCode Event code on which to advance the automaton.
dynamicItems Flag to add dynamic transitions to the automaton.
Returns:
The event code returned as a result of this transition.

EXTERNEXI int rtEXIDecBoolValue OSCTXT *  pctxt,
OSBOOL *  pvalue
 

This function decodes a boolean value.

Parameters:
pctxt Pointer to context block structure.
pvalue Pointer to boolean to receive decoded value.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.

EXTERNEXI int rtEXIDecDate OSCTXT *  pctxt,
OSNumDateTime *  pvalue
 

This function decodes a date value into a structured variable.

Parameters:
pctxt Pointer to context block structure.
pvalue Pointer to structured variable to receive decoded data.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.

EXTERNEXI int rtEXIDecDateString OSCTXT *  pctxt,
const OSUTF8CHAR **  ppvalue
 

This function decodes a date value into a string.

Parameters:
pctxt Pointer to context block structure.
ppvalue Pointer to variable to receive decoded data. Memory for the decoded name is allocated with rtxMemAlloc. It must be freed with rtxMemFreePtr or it will be freed when all memory in the context is freed (rtxMemFreeAll or rtxFreeContext).
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.

EXTERNEXI int rtEXIDecDocumentType OSCTXT *  pctxt,
const OSUTF8CHAR **  ppName,
const OSUTF8CHAR **  ppPublic,
const OSUTF8CHAR **  ppSystem,
const OSUTF8CHAR **  ppText
 

This function decodes an XML document type declaration (DTD).

Parameters:
pctxt Pointer to a context structure.
ppName Pointer to variable to receive decoded DTD name. Memory for the decoded name is allocated with rtxMemAlloc. It must be freed with rtxMemFreePtr or it will be freed when all memory in the context is freed (rtxMemFreeAll or rtxFreeContext).
ppPublic Pointer to variable to receive decoded DT public data. Memory for the decoded name is allocated with rtxMemAlloc. It must be freed with rtxMemFreePtr or it will be freed when all memory in the context is freed (rtxMemFreeAll or rtxFreeContext).
ppSystem Pointer to variable to receive decoded DT system data. Memory for the decoded name is allocated with rtxMemAlloc. It must be freed with rtxMemFreePtr or it will be freed when all memory in the context is freed (rtxMemFreeAll or rtxFreeContext).
ppText Pointer to variable to receive decoded DT text. Memory for the decoded name is allocated with rtxMemAlloc. It must be freed with rtxMemFreePtr or it will be freed when all memory in the context is freed (rtxMemFreeAll or rtxFreeContext).
Returns:
Status of the operation:
  • 0 if success
  • a negative status code if failure

EXTERNEXI int rtEXIDecEventCodePart1 OSCTXT *  pctxt,
OSINT32 *  ppart,
OSUINT32  nbits
 

This function decodes part 1 of an event code.

It will decode and skip undeclared items until a schema-valid event code is received.

Parameters:
pctxt Pointer to a context structure.
ppart Pointer to event code part to receive decoded value.
nbits Number of bits in the part.
Returns:
Status of the operation:
  • 0 if success
  • a negative status code if failure

EXTERNEXI OSEXIAutomaton* rtEXIDecGetDocAutomaton OSCTXT *  pctxt,
size_t  numGblElems,
const OSXMLFullQName *  gblElems
 

This functions returns an automaton that accepts the built-in document grammar.

This grammar is not extensible, so all the event codes created are immutable.

Parameters:
pctxt Pointer to context block structure.
Returns:
Pointer to document automaton.

EXTERNEXI OSEXIAutomaton* rtEXIDecGetElemAutomaton OSCTXT *  pctxt,
OSXMLFullQName *  pqname
 

This function returns an automaton that accepts the built-in element grammar.

The elementName is associated with the automaton.

Parameters:
pctxt Pointer to context block structure.
pqname Pointer to element QName.
Returns:
Pointer to element automaton.

EXTERNEXI OSBOOL rtEXIDecHasNext OSCTXT *  pctxt  ) 
 

This functions checks for additonal events in the decode stream.

Parameters:
pctxt Pointer to a context structure.
Returns:
True if there are more decoding events or false otherwise.

EXTERNEXI int rtEXIDecIntValue OSCTXT *  pctxt,
OSINT32 *  pvalue
 

This function decodes a signed integer value.

Parameters:
pctxt Pointer to context block structure.
pvalue Pointer to integer to receive decoded value.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.

EXTERNEXI int rtEXIDecLocalName OSCTXT *  pctxt,
const OSUTF8CHAR **  ppname
 

Returns the local name associated with the current event.

For event type SE and AT, it returns the local name of the element and attribute, respectively. For all other event types, the value returned by this method is undefined.

Parameters:
pctxt Pointer to a context structure.
ppname Pointer to variable to receive decoded data. Memory for the decoded name is allocated with rtxMemAlloc. It must be freed with rtxMemFreePtr or it will be freed when all memory in the context is freed (rtxMemFreeAll or rtxFreeContext).
Returns:
Status of the operation:
  • 0 if success
  • a negative status code if failure

EXTERNEXI int rtEXIDecNamespaceURI OSCTXT *  pctxt,
const OSUTF8CHAR **  ppNSURI
 

Returns the namespace associated with the current event.

For event type SE and AT, it returns the namespace URI of the element and attribute, respectively. For NS, it returns the URI bound to the prefix in the declaration. For all other event types, the value returned by this function is undefined.

Parameters:
pctxt Pointer to a context structure.
ppNSURI Pointer to variable to receive decoded data. Memory for the decoded name is allocated with rtxMemAlloc. It must be freed with rtxMemFreePtr or it will be freed when all memory in the context is freed (rtxMemFreeAll or rtxFreeContext).
Returns:
Status of the operation:
  • 0 if success
  • a negative status code if failure

EXTERNEXI int rtEXIDecNBitUIntValue OSCTXT *  pctxt,
OSUINT32 *  pvalue,
OSUINT32  nbits
 

This function decodes an unsigned integer value from a bit field of the given width.

Parameters:
pctxt Pointer to context block structure.
pvalue Pointer to unsigned integer to receive decoded value.
nbits Size of bit field.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.

EXTERNEXI OSEXIDecStringTable* rtEXIDecNewStringTable OSCTXT *  pctxt,
size_t  capacity
 

This function allocates and initializes a new string table structure.

Parameters:
pctxt Pointer to context block structure.
capacity Capacity of the array list or zero to use default.
Returns:
Allocated string table structure.

EXTERNEXI int rtEXIDecNextEventType OSCTXT *  pctxt,
OSEXIEventType pEventType
 

Returns the next OSEXIEventType read by this decoder.

Attributes and namespaces are reported as separate events.

Parameters:
pctxt Pointer to a context structure.
pEventType Pointer to variable to receive decoded data.
Returns:
Status of the operation:
  • 0 if success
  • a negative status code if failure

EXTERNEXI int rtEXIDecPrefix OSCTXT *  pctxt,
const OSUTF8CHAR *  uri,
const OSUTF8CHAR **  ppPrefix
 

Returns the namespace associated with the current event.

For event type SE and AT, it returns the namespace URI of the element and attribute, respectively. For NS, it returns the URI bound to the prefix in the declaration. For all other event types, the value returned by this function is undefined.

Parameters:
pctxt Pointer to a context structure.
uri Namespace URI that prefix is associated with.
ppPrefix Pointer to variable to receive decoded data. Memory for the decoded name is allocated with rtxMemAlloc. It must be freed with rtxMemFreePtr or it will be freed when all memory in the context is freed (rtxMemFreeAll or rtxFreeContext).
Returns:
Status of the operation:
  • 0 if success
  • a negative status code if failure

EXTERNEXI int rtEXIDecProcessingInstruction OSCTXT *  pctxt,
const OSUTF8CHAR **  ppTarget,
const OSUTF8CHAR **  ppData
 

This function decodes an XML processing instruction (PI).

Parameters:
pctxt Pointer to a context structure.
ppTarget Pointer to variable to receive decoded PI target. Memory for the decoded name is allocated with rtxMemAlloc. It must be freed with rtxMemFreePtr or it will be freed when all memory in the context is freed (rtxMemFreeAll or rtxFreeContext).
ppData Pointer to variable to receive decoded PI data. Memory for the decoded name is allocated with rtxMemAlloc. It must be freed with rtxMemFreePtr or it will be freed when all memory in the context is freed (rtxMemFreeAll or rtxFreeContext).
Returns:
Status of the operation:
  • 0 if success
  • a negative status code if failure

EXTERNEXI int rtEXIDecQName OSCTXT *  pctxt,
OSXMLFullQName *  pqname
 

Returns the qname associated with the current event.

For SE and AT it returns the name of the element and attribute, respectively. For all other event types, the value returned by this method is undefined.

Parameters:
pctxt Pointer to a context structure.
pqname Pointer to variable to receive decoded data. Memory for the decoded name components is allocated with rtxMemAlloc. It must be freed with rtxMemFreePtr or it will be freed when all memory in the context is freed (rtxMemFreeAll or rtxFreeContext).
Returns:
Status of the operation:
  • 0 if success
  • a negative status code if failure

EXTERNEXI int rtEXIDecReset OSCTXT *  pctxt  ) 
 

Resets the decoder for decoding a new message instance.

The decoder's state after calling this method is identical to that of a newly created instance.

Parameters:
pctxt Pointer to a context structure.
Returns:
Status of the operation:
  • 0 if success
  • a negative status code if failure

EXTERNEXI int rtEXIDecString OSCTXT *  pctxt,
const OSXMLFullQName *  pqname,
const OSUTF8CHAR **  ppvalue
 

Returns the value associated with the current event.

For character (CH) and comment (CM), it returns the corresponding characters. For attribute (AT) it returns the attribute value. For entity reference (ER), it returns the entity's name. For all other event types, the value returned by this method is undefined.

Parameters:
pctxt Pointer to a context structure.
pqname QName the value is associated with. This should be the QName that was decoded from the stream prior to calling this function.
ppvalue Pointer to variable to receive decoded data. Memory for the decoded name is allocated with rtxMemAlloc. It must be freed with rtxMemFreePtr or it will be freed when all memory in the context is freed (rtxMemFreeAll or rtxFreeContext).
Returns:
Status of the operation:
  • 0 if success
  • a negative status code if failure

EXTERNEXI int rtEXIDecStringCHEvent OSCTXT *  pctxt,
const OSXMLFullQName *  pqname,
const OSUTF8CHAR **  ppvalue
 

This function decodes a CH event (assumed to be a one-bit field with code 0) followed by string content.

Parameters:
pctxt Pointer to a context structure.
pqname QName the value is associated with. This should be the QName that was decoded from the stream prior to calling this function.
ppvalue Pointer to variable to receive decoded data. Memory for the decoded name is allocated with rtxMemAlloc. It must be freed with rtxMemFreePtr or it will be freed when all memory in the context is freed (rtxMemFreeAll or rtxFreeContext).
Returns:
Status of the operation:
  • 0 if success
  • a negative status code if failure

EXTERNEXI int rtEXIDecStringLength OSCTXT *  pctxt  ) 
 

Returns the length of the string returned by rtEXIDecString.

Parameters:
pctxt Pointer to a context structure.
Returns:
The length of the string or a negative status code if decoding failed.

EXTERNEXI OSUINT32 rtEXIDecStringTableAdd OSCTXT *  pctxt,
OSEXIDecStringTable pstrtab,
const OSUTF8CHAR *  str
 

This function adds a string to the given string table.

The string is not added if it already exists in the table. Its compact identifier is returned in either case.

Parameters:
pctxt Pointer to context block structure.
pstrtab Pointer to string table structure.
str Pointer to string to be added to table. Memory for the string is assumed to have been allocated by the user using rtxMemAlloc. It will be freed when the table is cleared.
Returns:
Index of string in table. Note that this is an unsigned value and therefore a negative value cannot be used to signal an error condition as in other functions. In this case, the user must check the status value within the error information in the context to determine if an error occurred.

EXTERNEXI void rtEXIDecStringTableClear OSCTXT *  pctxt,
OSEXIDecStringTable pstrtab
 

This function clears all strings out of the existing table.

Memory for all strings is freed using rtxMemFreePtr.

Parameters:
pctxt Pointer to context block structure.
pstrtab Pointer to string table structure.

EXTERNEXI const OSUTF8CHAR* rtEXIDecStringTableGetString OSEXIDecStringTable pstrtab,
OSUINT32  index
 

This function gets the string at the given index (i.e.

compact identifier) in the given string table.

Parameters:
pstrtab Pointer to string table structure.
index Index to string in table.
Returns:
Pointer to string in table.

EXTERNEXI void rtEXIDecStringTableInit OSCTXT *  pctxt,
OSEXIDecStringTable pstrtab,
size_t  capacity
 

This function initializes the given string table structure.

Parameters:
pctxt Pointer to context block structure.
pstrtab Pointer to string table structure.
capacity Capacity of the array list or zero to use default.

EXTERNEXI int rtEXIDecStringToCharArray OSCTXT *  pctxt,
const OSUTF8CHAR *  target,
size_t  start,
size_t  length
 

Similar to rtEXIDecString but the characters are copied into a fixed-size character array.

Parameters:
pctxt Pointer to a context structure.
target Destination array in which to copy the chars.
start Start index in target where the chars are copied.
length Maximum number of chars to copy.
Returns:
The actual number of chars copied into target or a negative error code if decoding failed.

EXTERNEXI OSUINT32 rtEXIDecStrTabsAddGlobalValue OSCTXT *  pctxt,
OSEXIDecStringTables pstrtabs,
const OSUTF8CHAR *  value
 

This function will add a string value to the global value string table partition.

Parameters:
pctxt Pointer to context block structure.
pstrtabs Pointer to full string table set structure.
value Value to be added.
Returns:
Index (compact identifier) of the added value.

EXTERNEXI OSUINT32 rtEXIDecStrTabsAddLocalName OSCTXT *  pctxt,
OSEXIDecStringTables pstrtabs,
const OSUTF8CHAR *  uri,
const OSUTF8CHAR *  name
 

This function adds the given local name to the local name table partition identified by the given URI.

Parameters:
pctxt Pointer to context block structure.
pstrtabs Pointer to full string table set structure.
uri URI identifier of local name table partition.
name Name to be added.
Returns:
Index (compact identifier) of the added value.

EXTERNEXI OSUINT32 rtEXIDecStrTabsAddLocalValue OSCTXT *  pctxt,
OSEXIDecStringTables pstrtabs,
const OSXMLFullQName *  qname,
const OSUTF8CHAR *  value
 

This function adds the given local value to the local value table partition identified by the given QName.

Parameters:
pctxt Pointer to context block structure.
pstrtabs Pointer to full string table set structure.
qname QName identifier of local value table partition.
value Value to be added.
Returns:
Index (compact identifier) of the added value.

EXTERNEXI OSUINT32 rtEXIDecStrTabsAddPrefix OSCTXT *  pctxt,
OSEXIDecStringTables pstrtabs,
const OSUTF8CHAR *  uri,
const OSUTF8CHAR *  prefix
 

This function adds the given prefix to the prefix table partition identified by the given URI.

Parameters:
pctxt Pointer to context block structure.
pstrtabs Pointer to full string table set structure.
uri URI identifier of prefix table partition.
prefix Prefix to be added.
Returns:
Index (compact identifier) of the added value.

EXTERNEXI OSUINT32 rtEXIDecStrTabsAddURI OSCTXT *  pctxt,
OSEXIDecStringTables pstrtabs,
const OSUTF8CHAR *  uri
 

This function will add a URI to the URI string table partition.

Parameters:
pctxt Pointer to context block structure.
pstrtabs Pointer to full string table set structure.
uri URI to be added.
Returns:
Index (compact identifier) of the added URI.

EXTERNEXI void rtEXIDecStrTabsClear OSCTXT *  pctxt,
OSEXIDecStringTables pstrtabs
 

This function clears all EXI string table partitions.

Parameters:
pctxt Pointer to context block structure.
pstrtabs Pointer to string table set structure.

EXTERNEXI const OSUTF8CHAR* rtEXIDecStrTabsGetGlobalValue OSEXIDecStringTables pstrtabs,
OSUINT32  index
 

This function will get the compact identifier of the given string value from the global value string table partition.

Parameters:
pstrtabs Pointer to full string table set structure.
index Global value table compact identifier.
Returns:
Index (compact identifier) or the null index identifier (OSEXINULLINDEX) if not found.

EXTERNEXI OSUINT32 rtEXIDecStrTabsGetGlobalValueTableSize OSEXIDecStringTables pstrtabs  ) 
 

This function returns the current number of entries in the global value string table partition.

Parameters:
pstrtabs Pointer to full string table set structure.
Returns:
Current number of entries in the partition.

EXTERNEXI const OSUTF8CHAR* rtEXIDecStrTabsGetLocalName OSEXIDecStringTables pstrtabs,
const OSUTF8CHAR *  uri,
OSUINT32  index
 

This function will get the compact identifier of the given localName from the localName string table partition identified by the given URI.

Parameters:
pstrtabs Pointer to full string table set structure.
uri URI identifier of localName table partition.
index Name table compact identifier.
Returns:
Index (compact identifier) of the value.

EXTERNEXI OSUINT32 rtEXIDecStrTabsGetLocalNameTableSize OSEXIDecStringTables pstrtabs,
const OSUTF8CHAR *  uri
 

This function returns the current number of entries in the localName string table partition identified by the given URI.

Parameters:
pstrtabs Pointer to full string table set structure.
uri URI identifier of localName table partition.
Returns:
Current number of entries in the partition.

EXTERNEXI const OSUTF8CHAR* rtEXIDecStrTabsGetLocalValue OSEXIDecStringTables pstrtabs,
const OSXMLFullQName *  qname,
OSUINT32  index
 

This function will get the compact identifier of the given local value from the local value string table partition identified by the given QName.

Parameters:
pstrtabs Pointer to full string table set structure.
qname Identifier of table partition.
index Local value table compact identifier.
Returns:
Index (compact identifier) of the value.

EXTERNEXI OSUINT32 rtEXIDecStrTabsGetLocalValueTableSize OSEXIDecStringTables pstrtabs,
const OSXMLFullQName *  qname
 

This function returns the current number of entries in the local value string table partition identified by the given QName.

Parameters:
pstrtabs Pointer to full string table set structure.
qname Identifier of table partition.
Returns:
Current number of entries in the partition.

EXTERNEXI const OSUTF8CHAR* rtEXIDecStrTabsGetPrefix OSEXIDecStringTables pstrtabs,
const OSUTF8CHAR *  uri,
OSUINT32  index
 

This function will get the compact identifier of the given prefix from the prefix string table partition identified by the given URI.

Parameters:
pstrtabs Pointer to full string table set structure.
uri URI identifier of prefix table partition.
index Prefix table compact identifier.
Returns:
Index (compact identifier) of the value.

EXTERNEXI OSUINT32 rtEXIDecStrTabsGetPrefixTableSize OSEXIDecStringTables pstrtabs,
const OSUTF8CHAR *  uri
 

This function returns the current number of entries in the prefix string table partition identified by the given URI.

Parameters:
pstrtabs Pointer to full string table set structure.
uri URI identifier of prefix table partition.
Returns:
Current number of entries in the partition.

EXTERNEXI const OSUTF8CHAR* rtEXIDecStrTabsGetURI OSEXIDecStringTables pstrtabs,
OSUINT32  index
 

This function will get the compact identifier of the given URI from the URI string table partition.

Parameters:
pstrtabs Pointer to full string table set structure.