Bug #9126
SAX-WRITER output is different in FWD compared to 4GL
100%
History
#1 Updated by Artur Școlnic almost 2 years ago
DEFINE VARIABLE h AS HANDLE NO-UNDO.
CREATE SAX-WRITER h.
define variable lc_var as longchar no-undo initial "".
h:fragment = true.
h:formatted = false.
h:strict = false.
h:set-output-destination ("longchar", lc_var).
h:FORMATTED = TRUE.
h:START-DOCUMENT().
h:START-ELEMENT("Element").
h:END-ELEMENT("Element").
h:END-DOCUMENT().
DELETE OBJECT h.
DEF VAR chunk_size AS INT64 INIT 30000.
DEF VAR tot_size AS INT INIT 0.
DEF VAR char_piece AS CHAR.
DO WHILE tot_size < LENGTH(lc_var):
char_piece = SUBSTR(lc_var,1,chunk_size,"character").
MESSAGE char_piece.
tot_size = tot_size + chunk_size.
END.
The output in 4GL is
<Element><Element>in FWD it is
<?xml version="1.0"?><Element><Element>
#3 Updated by Artur Școlnic almost 2 years ago
This task was derived from #8912-224.
#4 Updated by Artur Școlnic almost 2 years ago
- Status changed from New to WIP
- Assignee set to Artur Școlnic
#5 Updated by Artur Școlnic almost 2 years ago
- Status changed from WIP to Review
I committed 9126a/15417, it is ready for review. Basically, I just disabled writing of the xml declaration when the output is a longchar.
#6 Updated by Constantin Asofiei almost 2 years ago
- Status changed from Review to WIP
Artur Școlnic wrote:
I committed 9126a/15417, it is ready for review. Basically, I just disabled writing of the xml declaration when the output is a longchar.
That is not OK. The change is related to h:fragment = true. - when this flag is set, the XML declaration is not written. When is not set, the XML declaration is written.
#7 Updated by Artur Școlnic almost 2 years ago
You are correct, thank you. I made the necessary change and committed 9126a/15418. The test case from #9126-1 and the tests from #8912-224 passed.
#8 Updated by Artur Școlnic almost 2 years ago
- Status changed from WIP to Review
#9 Updated by Constantin Asofiei almost 2 years ago
- % Done changed from 0 to 100
- Status changed from Review to Internal Test
The change is OK. Anything else to test?
#10 Updated by Artur Școlnic almost 2 years ago
I tested the unit test module which was affected be this issue, it looks good, tomorrow I will do some functional regression testing, just to be sure.
#11 Updated by Constantin Asofiei almost 2 years ago
- Status changed from Internal Test to Merge Pending
Can you merge now and patch 7156b?
#12 Updated by Constantin Asofiei almost 2 years ago
- Status changed from Merge Pending to Internal Test
Constantin Asofiei wrote:
Can you merge now and patch 7156b?
Taking this back, didn't read your complete message, will merge tomorrow.
#13 Updated by Artur Școlnic almost 2 years ago
Artur Școlnic wrote:
I tested the unit test module which was affected be this issue, it looks good, tomorrow I will do some functional regression testing, just to be sure.
Testing was successful, 9126a is ready to be merged.
#14 Updated by Constantin Asofiei almost 2 years ago
Go ahead and merge/port to 7156b now.
#15 Updated by Artur Școlnic almost 2 years ago
9126a is merged to trunk and ported to 7156b.
#16 Updated by Artur Școlnic 5 months ago
- Status changed from Internal Test to Test