By sandoz on May 05, 2006
When combining XML binding with Fast Infoset it is possible to better utilize more advanced features of Fast Infoset.
For example, Fast Infoset supports the encoding of information in binary form using encoding algorithms, such as integers and real numbers, which would otherwise be represented in lexical form, and encoded in say UTF-8. So an array of Java float can be encoded in IEEE (big endian) binary representation using the "float" encoding algorithgm. To avail of such functionality does not require a schema as the encoding algoreithms are not tightly coupled to the XSD datatypes (an informal mapping is between the two can be specified). So an attribute value described as a xsd:list of xsd:floats and represented as float in Java can utilize the "float" encoding algorithm. The important thing to note is that a processor of fast infoset documents, containing such information, does not require the schema to decode the documents.
It is also possible to combine XML binding with Fast Infoset, especially in the case of serialization, for increased performance. Since the binding tool has knowledge of the schema and element/attribute declarations it is possible to perform the mapping of an element/attribute qualified name or a local name to an index in O(n) time and thus for such information no hash map lookup is required (a simple little trick is used to assign indexes in the order of occurrence). Such a technique will also reduce dynamic memory allocation.