Hi Venkat,

You are right, there is no truncation - but it should, truncation is required as pointed out by Harald in the bugzilla ticket (https://issues.apache.org/bugzilla/show_bug.cgi?id=47941). The implementation of TagLogicalElement requires some rework anyway, as it is just hardwiring Triplets in there. Don't worry I'll take care of this.

Adrian.

Venkat Reddy wrote:
Hi Jeremias,

I have gone through the code you metioned in (org.apache.fop.afp.modca.TagLogicalElement, line 128), couldn't find any truncation happening there for more than 254 bytes, but the afp output file showing the TLE value upto 254 bytes..
I have a doubt here...

1. Is the FOP code truncating the TLE value (I couldn't find any truncation functionality in the above fop code)?
2. If FOP is not truncating, then the viewer is showing only 254 bytes...

I am viewing the document in AFP Explorer, where it is showing the length (300 for the first TLE value in attached fo file), but only showing few characters in text... Could you please help me here, I am little confused in understanding this....

Thanks,
Venkat.

Venkat Reddy wrote:
Hi Jeremias,

Thanks for the information. I will check the code and specs as you stated.

Cheers,
Venkat.

Jeremias Maerki wrote:
On 20.10.2009 16:30:49 Venkat Reddy wrote:
Hi,

Please help me in finding the code related to this TLE value truncation happening for more than 254 bytes. The corresponding bug is already raised...

https://issues.apache.org/bugzilla/show_bug.cgi?id=47941

The MODCA documentation clearly states that 254 bytes allowed for the TLE value. I would like to take your inputs before digging into the code...

1. Is the behaviour correct (truncating after 254 bytes)?

I think so. There seems to be an unarchitected mechanism [1] to extend
the field length but the spec says its use is discouraged.

[1] MO:DCA spec, Eighth Edition, "Structured Field Syntax", SFI
semantics, Bytes 6-7, page 21/22.

2. Do we need to warn the user in this case?

If the truncated part is not just whitespace, then yes, IMO.

Please point me to the code points and guide me to resolve this problem, if you can...

org.apache.fop.afp.modca.TagLogicalElement, line 128.
Simply check if the value is longer than allowed and then check if the
truncated part contains anything other than spaces.

Thanks,
Venkat.




Jeremias Maerki





------------------------------------------------------------------------

<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"; xmlns:svg="http://www.w3.org/2000/svg"; 
xmlns:th="http://www.thunderhead.com/XSL/Extensions"; xmlns:rx="http://www.renderx.com/XSL/Extensions"; 
xmlns:afp="http://xmlgraphics.apache.org/fop/extensions/afp";>
        <fo:layout-master-set>
                <fo:simple-page-master margin-left="20mm" margin-bottom="7mm" margin-right="13mm" 
master-name="PageFront" page-width="210mm" page-height="297mm">
                        <afp:include-page-overlay name="GEN2TEST"/>
                        <fo:region-body margin-top="20mm" margin-bottom="15mm" 
region-name="letterPageBody"/>
                </fo:simple-page-master>
                <fo:page-sequence-master master-name="FormsSequence">
                        <fo:repeatable-page-master-alternatives>
                                <fo:conditional-page-master-reference page-position="first" 
master-reference="PageFront"/>
                                <fo:conditional-page-master-reference 
master-reference="PageFront" page-position="rest"/>
                                <fo:conditional-page-master-reference 
master-reference="PageFront" page-position="last"/>
                        </fo:repeatable-page-master-alternatives>
                </fo:page-sequence-master>
        </fo:layout-master-set>
        <fo:page-sequence initial-page-number="auto" force-page-count="auto" 
master-reference="FormsSequence">
                <afp:tag-logical-element name="JES0" value="JES00927200       
90INITIATION     REGULAR        690-501   390- 127    27200021                                            
                                                                                                          
                                                                      "/>
                <afp:tag-logical-element name="ACC1" value="ACC1374316469000000    
690-501    EN                                                                                00           
     00                                                                                                   
                                                                                   "/>
                <afp:tag-logical-element name="ADR1" value="ADR1MICKEY MOUSE            
                                                                          "/>
                <afp:tag-logical-element name="ADR2" value="ADR21234 MAIN STREET        
                                                                          "/>
                <afp:tag-logical-element name="ADR3" value="ADR3ADDISON, TEXAS 
12345-1234                                                                         "/>
                <afp:tag-logical-element name="ADR4" value="ADR4                        
                                                                          "/>
                <afp:tag-logical-element name="ADR5" value="ADR5                        
                                                                          "/>
                <afp:tag-logical-element name="ADR6" value="ADR6                        
                                                                          "/>
                <fo:flow flow-name="letterPageBody">
                        <fo:block>
                                <fo:block/>
                        </fo:block>
                </fo:flow>
        </fo:page-sequence>
</fo:root>

Reply via email to