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

Implementation of functions for generating Schema-informed Grammar definitions. More...

#include "grammarGenerator.h"
#include "treeTableSchema.h"
#include "stringManipulate.h"
#include "memManagement.h"
#include "initSchemaInstance.h"
#include "sTables.h"

Go to the source code of this file.

Functions

errorCode generateSchemaInformedGrammars (BinaryBuffer *buffers, unsigned int bufCount, SchemaFormat schemaFormat, EXIOptions *opt, EXIPSchema *schema, errorCode(*loadSchemaHandler)(String *namespace, String *schemaLocation, BinaryBuffer **buffers, unsigned int *bufCount, SchemaFormat *schemaFormat, EXIOptions **opt))
 Given a set of XML schemes, generates all Schema-informed Element and Type Grammars as well as the pre-populated string tables (i.e. More...
 
void destroySchema (EXIPSchema *schema)
 Frees all the memory allocated by an EXIPSchema object. More...
 

Detailed Description

Date
Nov 22, 2010
Author
Rumen Kyusakov
Version
0.5
[Revision] $Id: grammarGenerator.c 352 2014-11-25 16:37:24Z kjussakov $

Definition in file grammarGenerator.c.

Function Documentation

void destroySchema ( EXIPSchema schema)
Parameters
[in]schemathe schema containing the EXI grammars to be freed

Definition at line 151 of file grammarGenerator.c.

errorCode generateSchemaInformedGrammars ( BinaryBuffer buffers,
unsigned int  bufCount,
SchemaFormat  schemaFormat,
EXIOptions opt,
EXIPSchema schema,
errorCode(*)(String *namespace, String *schemaLocation, BinaryBuffer **buffers, unsigned int *bufCount, SchemaFormat *schemaFormat, EXIOptions **opt)  loadSchemaHandler 
)

EXIPSchema instance) The current version supports only SCHEMA_FORMAT_XSD_EXI format of the XML schema.

Parameters
[in]buffersan array of input buffers holding the representation of the schema. Each buffer refers to one schema file.
[in]bufCountthe number of buffers in the array
[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]schemathe resulted schema information used for processing EXI streams
[in]loadSchemaHandlerCall-back handler for loading -ed or <import>-ed schema files; Can be left NULL if no or <import> statements are used in the XML schema.
Returns
Error handling code
Note
In the case of - both the host- and included-schema must have identical target namespace. That is, the current implementation does not support the case of using from XML Schema that has non empty target namespace and the referenced/included XML schema have an empty target namespace, although this is allowed by the XML Schema spec.

Definition at line 33 of file grammarGenerator.c.