|
OSS XSD Tools for C/C++
Enhancements
|
|
 |
OSS XSD Tools for C/C++ Version 3.1 - Now Available
The OSS XSD compiler now supports the -namespace option which provides namespace support. All the compiler-generated types are placed in a C++ namespace. This avoids potential clashes of the compiler-generated type names with other type names used in the application.
The OSS XSD compiler and runtime have been enhanced to allow the decoding of an XML value with a missing mandatory element that has a nonzero minOccurs facet and a maxOccurs facet greater than 1.
For example:
<xsd:complexType name="S">
<xsd:sequence>
<xsd:element name="b" type="xsd:integer" minOccurs="1"
maxOccurs="10" />
</xsd:sequence>
</xsd:complexType>
Has the following encoded value:
<S></S>
The OSS SAX API for binary data is now included with the base shipment of the OSS XSD Tools. Previously, this component had to be purchased for an additional fee.
The new API function ossxSkipCompressionPrefix() has been added to the XSD runtime libraries. A full encoding produced by the OSS Tools using compression consists of the compression prefix followed by the compressed encoding. Given an OssxBuf structure that describes a full encoding, the function returns lengths of the original (uncompressed) and the compressed encodings and modifies the OssxBuf structure.
The XML encoders will now generate an xml-stylesheet processing instruction when the encoding is created using an XSL file.
OSS XSD Tools for C/C++ Version 3.0
The OSS XSD tools now supports the new XML Schema (XSD) to ASN.1 mapping defined in the standard ITU-T Rec. X.694 | ISO/IEC 8825-5 "Mapping W3C XML Schema definitions into ASN.1". The mapping was updated to add support for the new time types that provide more efficient binary (PER) encoding of the XSD duration and time values. It also resolved some known issues for the previous mapping. As a result, the compiler-generated type names may slightly differ from the previous release. The previous mapping can be preserved by using backward compatibility options.
The OSS XSD compiler and runtime now supports integer types whose C representations exceed the maximum integer type available on the target platform. Such integers have a special C-representation:
struct {
unsigned short length;
unsigned char *value;
}
The integer is stored in binary format in the series of octets referenced by the value field above.
The OSS Binary Fast Infoset API has been enhanced to support the
OSSX_ENC_UTF8 and
OSSX_ENC_UTF16 encoding formats. Previously, only encoding algorithms were supported. Two new API functions,
ossxUTF16ToUTF8() and
ossxUTF8ToUTF16(), have been added to convert data from the UTF-16 to the UTF-8 format and vice versa.
OSS XSD Tools for C/C++ Version 2.3
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 © 2010 OSS Nokalva, Inc. All Rights Reserved.