FLAM Issue Tracker - FL5
View Issue Details
0000634FL52.2 Subprogram FLUC (CONV)public2015-02-03 08:292016-01-25 12:04
Falk Reichbott 
Falk Reichbott 
normalfeatureN/A
resolvedfixed 
GeneralGeneralGeneral
5.1 
5.1.115.1.11 
0000634: Add format.element() to byte and record interface
To provide FLAM elements over our customer APIs, a format.element() clause is required. With this clause the byte and record interface provides a data set (length and data) with the structure below:

4 byte integer with the matrix type (for example XML)
4 byte integer with the element type (for example XML start tag)
4 byte integer with the length field for element data (length of the start tag)
4 byte integer with the length field for attribute data (mainly 0)
4 byte integer with the length field for hash data (mainly 0)
4 byte integer reserved 1
4 byte integer reserved 2
4 byte integer reserved 3
n byte element data
n byte attribute data
n byte hash data

This simple structure would be the first supported format, other formats could be implemented.

No tags attached.
Issue History
2015-02-03 08:29Falk ReichbottNew Issue
2015-02-03 08:29Falk ReichbottStatusnew => assigned
2015-02-03 08:29Falk ReichbottAssigned To => Falk Reichbott
2015-06-29 10:17Falk ReichbottTarget Version5.2 => 5.1
2015-07-09 18:46Falk ReichbottTarget Version5.1 => 5.1.09
2015-08-13 18:47Falk ReichbottTarget Version5.1.09 => 5.1.10
2015-12-03 14:22Falk ReichbottTarget Version5.1.10 => 5.1.11
2016-01-11 13:41Falk ReichbottNote Added: 0000942
2016-01-11 13:41Falk ReichbottStatusassigned => resolved
2016-01-11 13:41Falk ReichbottFixed in Version => 5.1.11
2016-01-11 13:41Falk ReichbottResolutionopen => fixed
2016-01-11 13:41Falk ReichbottNote Edited: 0000942bug_revision_view_page.php?bugnote_id=942#r275
2016-01-25 12:04Falk ReichbottNote Edited: 0000942bug_revision_view_page.php?bugnote_id=942#r276

Notes
(0000942)
Falk Reichbott   
2016-01-11 13:41   
(edited on: 2016-01-25 12:04)
The format string of the FLUC byte interface supports now format.element(). Over this object you can define which kind of element structure are read from or written like a record to the memory. There are currently 1 structure suported.

ElementStructure0
U32 Version
U32 MatrixType
U32 ElementType
U32 AttributeLength
U32 DataLength
U32 HashLength
U32 Reserved1
U32 Reserved2
U08 Buffer[]

The fomat.element() works like format.record() but it buts 8 integer (32 byte) infornt of the data. The version an matrix type are used for plausi checks. The attribute length is only provided on request. The hash length is alwasy 0 because original data formats don't support hash values for searching. This is a feature of FLAM5 archives and the element structure for original data and FLAM5 archives is the same. The reserved fields are for future use and must be zero.

To simplify the development of an XML Scanner based on the FLAM XML elements we have add a new function called fcbback()/FCRBAK() to the byte and record interface, which can be used to positioning one element or record back to read it again like ungetc() for bytewise scanners.

The new format.element() can for example be used to scan neutral XML elements in COBOL, PL1, assembler, und C from encoded, encrypted and or compressed or clear files, containing an XML data stream.

The format.element() specification supports character conversion. This makes it possible for example to evaluate or provide the XML data fields in EBCDIC instead of UTF-8.