exip  Alpha 0.5.4
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
initSchemaInstance.c File Reference

Implements the initialization functions for the EXIPSchema object. More...

#include "initSchemaInstance.h"
#include "sTables.h"
#include "grammars.h"

Go to the source code of this file.

Macros

#define DEFAULT_GRAMMAR_TABLE   300
 
#define DEFAULT_SIMPLE_GRAMMAR_TABLE   75
 
#define DEFAULT_ENUM_TABLE   5
 

Functions

errorCode initSchema (EXIPSchema *schema, InitSchemaType initializationType)
 Initialize a EXIPSchema object. More...
 
errorCode generateBuiltInTypesGrammars (EXIPSchema *schema)
 Generate a Schema-informed Type and TypeEmpty Grammars for all built-in XML Schema Types. More...
 
errorCode createBuiltInTypesDefinitions (SimpleTypeTable *simpleTypeTable, AllocList *memList)
 Populate initial simple type array with the build-in simple types. More...
 

Detailed Description

Date
Nov 28, 2011
Author
Rumen Kyusakov
Version
0.5
[Revision] $Id: initSchemaInstance.c 348 2014-11-21 12:34:51Z kjussakov $

Definition in file initSchemaInstance.c.

Macro Definition Documentation

#define DEFAULT_ENUM_TABLE   5

Definition at line 31 of file initSchemaInstance.c.

#define DEFAULT_GRAMMAR_TABLE   300

Definition at line 23 of file initSchemaInstance.c.

#define DEFAULT_SIMPLE_GRAMMAR_TABLE   75

Definition at line 27 of file initSchemaInstance.c.

Function Documentation

errorCode createBuiltInTypesDefinitions ( SimpleTypeTable simpleTypeTable,
AllocList memList 
)
Parameters
[in,out]simpleTypeTableDynamic array storing the simple types definitions
[in,out]memListmemory allocations
Returns
Error handling code

Definition at line 205 of file initSchemaInstance.c.

errorCode generateBuiltInTypesGrammars ( EXIPSchema schema)

It is used by generateSchemaInformedGrammars() and when the value of the "schemaId" element is empty, no user defined schema information is used for processing the EXI body; however, the built-in XML schema types are available for use in the EXI body.

Parameters
[in,out]schemaschema for which the grammars are generated
Returns
Error handling code

Add the grammar to the schema grammar table

Definition at line 79 of file initSchemaInstance.c.

errorCode initSchema ( EXIPSchema schema,
InitSchemaType  initializationType 
)

Generate all build in Schema-informed Element and Type Grammars when not in schema-less mode. It is also used during grammar generation.

Parameters
[in,out]schemaa resulting EXIPSchema container
[in]initializationTypeone of INIT_SCHEMA_SCHEMA_LESS_MODE, INIT_SCHEMA_BUILD_IN_TYPES or INIT_SCHEMA_SCHEMA_ENABLED
Returns
Error handling code

Definition at line 34 of file initSchemaInstance.c.