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

Implementation of functions for converting a XML schema document to a TreeTable structure containing the schema definitions. More...

#include "treeTableSchema.h"
#include "dynamicArray.h"
#include "EXIParser.h"
#include "genUtils.h"
#include "stringManipulate.h"
#include "memManagement.h"
#include "grammars.h"
#include "initSchemaInstance.h"
#include "grammarGenerator.h"

Go to the source code of this file.

Data Structures

struct  TreeTableParsingData
 State required when parsing a schema to build a TreeTable. More...
 

Macros

#define INITIAL_STATE   0
 
#define SCHEMA_ELEMENT_STATE   1
 
#define SCHEMA_CONTENT_STATE   2
 
#define FULL_EXPANSION
 

Functions

errorCode generateTreeTable (BinaryBuffer buffer, SchemaFormat schemaFormat, EXIOptions *opt, TreeTable *treeT, EXIPSchema *schema)
 Performs two things: builds a treeTable and the string tables of the EXIPSchema object. More...
 
void printTreeTableEntry (TreeTableEntry *treeTableEntryIn, int indentIdx, char *prefix)
 Print a tree table entry. More...
 

Variables

const String XML_SCHEMA_NAMESPACE
 

Detailed Description

Date
Mar 13, 2012
Author
Rumen Kyusakov
Robert Cragie
Version
0.5
[Revision] $Id: treeTableBuild.c 332 2014-05-05 18:22:55Z kjussakov $

Definition in file treeTableBuild.c.

Macro Definition Documentation

#define FULL_EXPANSION

Definition at line 837 of file treeTableBuild.c.

#define INITIAL_STATE   0

Definition at line 28 of file treeTableBuild.c.

#define SCHEMA_CONTENT_STATE   2

Definition at line 30 of file treeTableBuild.c.

#define SCHEMA_ELEMENT_STATE   1

Definition at line 29 of file treeTableBuild.c.

Function Documentation

errorCode generateTreeTable ( BinaryBuffer  buffer,
SchemaFormat  schemaFormat,
EXIOptions opt,
TreeTable treeT,
EXIPSchema schema 
)
  1. From the XML schema definitions builds an analogous treeTable
  2. Fills in the pre-populated entries in the string tables of the EXIPSchema object

The pre-populated entries in the string tables are sorted in generateSchemaInformedGrammars() after all the treeTables are generated.

The schema and treeT objects should be initialized before calling this function.

Parameters
[in]bufferan input buffer holding (part of) the representation of the schema
[in]schemaFormatEXI, XSD, DTD or any other schema representation supported
[in]optoptions used for EXI schemaFormat - otherwise NULL. If options are set then they will be used for processing the EXI XSD stream although no options are specified in the EXI header. If there are options defined in the EXI header of the XSD stream then this parameter must be NULL.
[out]treeTa memory representation of the XML schema definitions. Must be initialized.
[out]schemapartly built schema information (only the string tables) used for processing EXI streams. Must be initialized.
Returns
Error handling code

Definition at line 161 of file treeTableBuild.c.

void printTreeTableEntry ( TreeTableEntry treeTableEntryIn,
int  indentIdx,
char *  prefix 
)
Parameters
[in]treeTableEntryIna tree table object
[in]indentIdxIndent index
[in]prefixprefix for the C definitions

Definition at line 839 of file treeTableBuild.c.

Variable Documentation

const String XML_SCHEMA_NAMESPACE

Definition at line 85 of file sTables.c.