|
OSS XSD Tools for C/C++
Enhancements
|
|
 |
OSS XSD Tools for C/C++ Version 2.3 - Now with Fast Infoset and SAX Support
New XSD compiler command-line options
-finf and
-finfSoap are now available to support Fast Infoset. The option
-finf can be used when compiling XML Schema specifications. This option is similar to the
-xml/-ber/-cer/-der/-per/-uper options in that it allows you to encode and decode data using the binary Fast Infoset serialization format.
The ossxEncode()/ossxDecode() runtime functions have been enhanced to allow you to encode and decode any Global Element defined in the input XML schema using the Fast Infoset (FI) encoding method. To use this new feature, simply XSD-compile your specification with the -finf option specified and then set the OSSX_FINF encoding rules (e.g., via the ossxSetEncodingMethod() function call) before encoding or decoding.
A new runtime library for the SAX/C++ API has been implemented. The SAX/C++
interface parses XML and Fast Infoset. In addition, if the SAX/C API for
PER add-on is purchased, the SAX/C++ API can also parse PER encodings.
OSS XSD Tools for C/C++ Version 2.2
A new compiler option,
-reservedWords, allows you to instruct the XSD compiler to mangle the words you specify for this option; this will avoid name conflicts with reserved words that must be present in the generated output. The XSD namespace’s URI is used to mangle the specified words.
A new compiler option, -helperEnumNames, instructs the XSD compiler to use context-based naming conventions (helper) for #define constants used in bit-masks with the suffix of "_present" or "_chosen". Similarly, a new option, -helperEnumNames, instructs the compiler to use context-based names for generated enumerators.
A new runtime function, ossxIdentifyElementByXMLName(), returns the Global Element Number when supplied with the associated XML element name.
The LED XML encoder has been optimized for the encoding of xsd:decimal values. Encoding of these values (when the C representation exponential form is not used) is up to 20% faster than the previous version.
OSS XSD Tools for C/C++ Version 2.1
The XSD compiler now supports a new OSS-specific attribute,
selfCompleteWildcard, which can be used to mark 'xsd:any' XSD element
wildcards as self-complete entities. In the presence of this attribute,
the XML decoder will treat the element wildcard as a self-complete entity,
meaning that the decoder will not attempt to inherit the namespace
declarations from the outer tags when decoding the element wildcard.
The content of this marked entity will be a complete XML document that
can be passed to another application or function. A corresponding
global directive, selfCompleteWildcard, is also available to affect
element wildcards that appear in all input schemas or only those that
appear within some specified XSD namespaces.
OSS XSD Tools for C/C++ Version 2.0
A new command line option, -nulltermStrings,
instructs the XSD compiler to generate null-terminated
length strings (rather than the unbounded representation with a
length-value pair) for all XSD string and time types.
A new command line option, -namespacePrefix,
instructs the XSD compiler to add the specified prefix to
the generated names derived from the XSD components defined
in the namespace.
Two new compiler options, -encodeonly and
-decodeonly, instruct the compiler to generate
only encoder routines or only decoder routines into the
control table. This results in smaller runtime libraries.
The XSD compiler now supports extensibility of XSD complex
types. This feature ensures interoperability with applications
using future XSD versions.
A new aggregate option, -helperAPI, activates new
options -helperNames, -helperMacros,
-helperListAPI, while
-noHelperAPI results in
-noHelperNames, -noHelperMacros,
-noHelperListAPI.
-
-helperNames instructs the XSD compiler to
generate intuitive names for structures based on
XSD names.
-
-helperMacros generates helper macros to
reduce your development effort. The generated macros
automate memory allocation, populate instances
of generated C types with data, perform query
functions, etc.
-
-helperListAPI generates helper functions
to manipulate our new DLINKED-PLUS representation.
DLINKED-PLUS is a doubly-linked list with a
header block containing pointers to the node counter,
and to the first and last nodes. The helper
functions automate list and node allocation,
add elements to the beginning/middle/end of the
list, remove elements from the list, etc.
A new compiler option, -saxEncode, enables the
new ossxSAXEncode() function from the OSS SAX API
for C library which is newly available.
A new runtime library, OSS SAX API for C, is implemented
as an add-on component for the OSS XSD Tools for C/C++, and
supports the following main features:
-
The PER SAX decoder function,
ossSAXDecode(),
provides an event-based approach enabling your application
to process the ASN.1 PER binary encoded data as it is
encountered (as it is parsed), rather than having to
fully decode the message before accessing its fields.
-
Another function,
ossxSAXEncode(),
scans a decoded value (the result of the ossxDecode
function call) and generates C SAX events for this value,
as if the ossxSAXDecode function were called with the
PER encoding of the same value. As this function works
with already decoded (or unencoded) values, it is
independent from the decoder and can be used with any
encoding rules (not just PER) or with binary values
created manually in memory.
The XSD Tools now include the Lean Encoder/Decoder (LED)
library which is smaller and faster than the default library
(SOED - space-optimized encoder/decoder).
The LED fully supports compression and user-defined
encryption after encoding data, and decompression/decryption
before decoding data.
A new memory management mode, "Memory Handle API",
supports optimized dynamic memory allocation.
Using this API, it is possible to:
-
Decrease the number of calls to system
'
malloc' and 'free'
functions when encoding and decoding
-
Reuse allocated dynamic memory blocks when the
encoder and decoder are being run in a loop
-
Significantly speed up freeing of complex data
structures
New API functions were added to provide the capability to
generate self-identifying encodings for binary encoding
rules that are not self-descriptive by nature (eg., PER),
and to decode binary messages without advance knowledge
of which message is being processed. This is done via the
addition of a prefix added by the encoder.
The OSS XSD runtime now supports the standalone compression
API functions ossxCompress() and
ossxUnCompress(). This API enables encoded data
compression using the default built-in zlib compressor.
It can also be used for any other encoded data transformations
(eg., encryption) via user-provided functions set by a previous
ossxSetCompressDecompressFunctions() call.
New API functions allow users to set various debugging
levels to control the amount of debug data that is
generated at runtime while encoding or decoding.
The ossPrintHex function has been enhanced
to display the hex data and its ASCII equivalent.
.:. Top
Copyright © 2008 OSS Nokalva, Inc. All Rights Reserved.