Coco Encoder Escaping Problematic Character Like Greater Sign

Hi there
We use CocoEncoder to transform fixed length Cobol Copybook formatted files to XML. So far this solution works like a charm. However, latest input data contains a "<" (less than) sign, which makes the generated XML invalid. So my question is: Is there a way to let CocoEncoder on the fly escape special characters? The problems I cannot do that before or after the transformation are: (a) Before is not possible because the fixed length records do not allow for proper escape of single characters, as the length would normally be changed, and (b) After that we have an invalid XML which is not handable any more with usual XML parsers. So it would be most appropriate to have these escapes completed during the generation of the XML itself. Is there a way to do that in CocoEncoder?
Thanks
Daniel Frey

Similar Messages

  • IR Report "Link" Attibute Custom URL Escape : (colon) Character

    <h2>I am running Apex 4.0.2 and have an interactive report page 242 with a result set.</h2>
    Scenario
    In the "Report Attributes" "Link" settings I want to link the report to a 'Custom URL' target to take the user from this IR Report Page 242 to page 243 to a 'Single Record Data Entry Form'
    I am setting the value of the custom url target as:
    f?p=&APP_ID.:243:&SESSION.::&DEBUG.:243:P243_NAME,P243_DESCRIPTION,P243_LOCATION:#SOURCE_NAME#,#DESCRIPTION#,#LOCATION#:The P243_LOCATION column, however, has a ':' colon and a '.' values in the database column itself with a value of *'jdbc:Host123.abcd'*
    When the user clicks on the link the FULL location column is truncated before the ':' - OBVIOUSLY due to ':' being the paremeter separator column in apex
    So, the #LOCATION# value on Page 242 IR Report containing a value of *'jdbc:Host123.abcd'* is trunced on the called page 243 as 'jdbc' only and truncated prior to the ':' value contained in the field.
    Question:
    HOW Can I build the above URL so that the ':' can be visible on the Page 243 form field? with the full value passed into the called page with a value of: *'jdbc:Host123.abcd'* ?
    I tried the SYS.htf_esc(#LOCATION#) around the calling URL above, but doesn't work as expected.
    Any advice is greatly appreciated.
    VSK

    Hi,
    You can not escape colons but you can pass commas in the url. Enclose the item value in \item_value\ to escape the "," in the item value . For colons, I would suggest creating a hidden field in the source report with SQL REPLACE function and replace all the colons with any other character like ||. Then you can use the same replace function on the target page to match with the new item value.
    Hope it helps. Thanks.
    Regards,
    Manish

  • Coco Encoder Multiline Processing

    Hi Jun Xu
    I first want to make clear that I appreciate the work you have done for the Coco Encoder Framework a lot! It seems to be a good base to start with copybook and Cobold data files. We are currently trying to integrate that in our new system on a direct non-OpenESB basis before we possibly migrate to OpenESB.
    It seems that I have not understood some crucial part of the Encoder Framework:
    1. The transformation of simple copybook files to XSD works like a charm. Although there is a limitation of having only one "01 item" per copybook: "CCCB4104: Copybook COBOL Copybook XSD Builder does not support processing of copybooks with multiple 01 items ". OK, we can get around this limitation by splitting the copybook file into N files containing each one "01 item", splitting the data files accordingly and remerging the final XML back into one at the end. Although this seems a bit clumpsy, it's a way. Or is there a simplier way to achive transformation of multi 01-item containing copybooks into a corresponding XSD and transform the data into XML?
    2. Trying to achive that, I studied the "TestRuntime" file you deliver for testing the transformation to XML. In the test only one row is transformed. However, our data files contain more than one row, and we would like to translate the whole Cobold data file into an XML structure. For this, I don't see a concept in the Coco Encoder Framework and it appears to be a crucial limitation to it - at least as long as I don't know how it is intended to be done. Is there a simple way to achive the multi row transformation?
    3. Trying to get around this limitation I extended the code you provide for TestRuntime by introducing a loop which peeks on a BufferedReader to process line after line. The extention is looking more-less like that:
    final FileOutputStream fileOutputStream = new FileOutputStream(outputFileName, true);
    final StreamResult streamResult = new StreamResult(fileOutputStream);
    do {
        int readResult;
        do {
            input.mark(1);
            readResult = input.read(buffer);
        } while (buffer[0] == '\r' || buffer[0] == '\n');
        if (readResult == -1) {
            break;
        input.reset();
        final Source source = coder.decodeFromReader(input);
        printToFile(source, streamResult);
    } while (true);
    fileOutputStream.close();The problem I meet here is that the BufferedReader is not advancing properly to the end of the line after decodeFromReader has been executed. Instead it hangs around somewhere in the line. Certainly I could advance the Reader myself, but something is going wrong here.
    I would appreciate some pointers, hints, help and roadmaps in order to be able to decide whether the framework is already mature to be integrated into a productive system.
    Again, thanks for the work you have done. I appreciate it a lot!
    Cheers
    Daniel

    And another one from Jun Xu from 10. Mai 2008
    Hi Daniel,
    I looked at the COCo Encoder source code and noticed that the decoding process is always based on byte stream. With this said, when you call decodeFromReader, the character stream will be converted to a byte stream on the fly. The mechanism of doing so is that an OutputStreamWriter is kept internally and whenever some bytes are requested, some characters will be read from the Reader and in turn be written to the OutputStreamWriter and the bytes resulted from this writing process will be collected and eventually returned to whoever is requesting the bytes when there are enough of them. You can take a look the implementation of ReaderInputStream in the encoder framework code, which is under encodersl/encoder-fw.
    In the above process, the COCo encoder might over read from the Reader while it tries to get enough bytes to parse. For example, if the total content in your Reader is 201 characters and it represents two lines. The first line ends at 101st character. When first 100 characters get converted to bytes, it becomes 150 bytes. COCo encoder converts characters to bytes in a buffered fashion and on demand. Assuming the buffer size is 60 (in real implementation , it might be 1024 or something else), when the parsing process moves along, to provide 150 bytes, the Reader might have been read for 120 (2 times the buffer size) characters.
    All I want to say is that there is nothing wrong here and what you have seen is the expected behavior. But it does make controlling Reader's current position harder and may cause a little bit confusion.
    Thanks.
    Jun

  • Why the SAX parser cannot support the special character like "¡"

    I do not understand why the SAX parser cannot support the special character like &iexcl; but it can replace the &quot; &amp; &lt; &gt;   to ", &, <, >, ,, but other characters will be replaced to empty charater.
    can somebody give me any suggestions or solutions. THX.
    Edited by: 844086 on 2011-3-14 上午2:27
    Edited by: 844086 on 2011-3-14 上午2:27

    I quote:
    Alternatively implement an EntityResolver that resolves the desired escapes.You are again an example that people only read/register the first thing written in a post.

  • How to escape newline character(nl) in file content conversion parameter?

    Hi Experts,
    How to escape newline character(nl) in file content conversion parameter?
    For example:
    field1field2field3
    field4field5field6
    Means Item is splitted in two lines.
    I want to SKIP new line character
    and to collect all SIX fields.
    What will be the file content conversion parameter?
    Thanks in Advance..........

    Hi,
    as far as i know there is nothing in the standard. But the question is why dont you combine at mapping the fields into only structure?
    Regards,
    Udo

  • Graph control right-hand Y-axis tick marks look like negative signs

    Hi,
    The graph control right-hand Y-axis tick marks just to the left of the numeric values that make up the scale look like negative signs.  It gets confusing for the user of the software.
    The left Y-axis is OK because the little tick marks are to the right of the number.
    Any ideas on how to improve this situation?
    Thanks,
    Kirk Mitchell
    Project Engineer
    Kollmorgen

    Perry,
    First of all thanks for looking at this.
    The tick-marks controlled by the "Mark Origin" option are not the tick marks that are causing the problem.
    The Mark Origin ticks are in the body of the graph along the x=0 and y=0 lines.  They only show up if those lines are visible such as if you have a graph with an x axis range of -100 to +100 and a y axis range of the same.
    The ticks I'm referring to are just to the left of the numeric values that label the right axis.
    Below is a screenshot to illustrate:
    Any other ideas?
    Thanks,
    Kirk

  • Unable to read UTF-8 Character like  �

    Hi,
    I am using BufferedReader to read a file with a character like �
    yy_reader=new BufferedReader(new InputStreamReader( new FileInputStream( inputFile ), UTF8),10240)
    But when i read this reader
    yy_reader.read(yy_buffer, 0, yy_buffer.length)
    yy_buffer[] - --- is an array
    It throws Malformed Input Exception .... kindly do let me know how can i avoid this ! I think this character is a valid UTF8 character set.

    It throws Malformed Input Exception .... kindly do
    let me know how can i avoid this ! I think this
    character is a valid UTF8 character set.Well, your assumption is wrong. I've never had Java throw that Exception at me, unless it was indeed Malformed Input (= not UTF-8). Which bytes does your file contain (use the smallest file that still has that problem)? '�' would be the two bytes 0xC3 0x87 in UTF-8. Is that what you file contains?

  • Junk Character like "#" comes in the Project & WBS desc.....

    Dear all,
    When we transfer and release the project from C-projects module to PS,
    then sometime, a junk character like "#" gets appended to the Project &
    WBS description, when we retrive the Project in CJ20N. This junk
    character creates a lot of problems in the reports, specially, when it
    is exported to excel. due to this, all columns gets shifted in the
    excel. After a lot of simulation, we found that if we unintentionally
    give some spaces in the c-project description, then the junk character
    gets appended to the PS description. What is the remedy ?? what should
    be done to avoid this ???
    Can any of you advise on this?
    Thanks,
    Kumar

    Can you let us know exactly what is stored in the database?
    What is the data type? Will you be able to paste the content of the cell that you are referring to?
    What front end you are using?
    Pradeep
    www.lokahitam.com

  • I terminated synchronization of iphone4 with itune on my hp laptom before it got completed. After this, i got unique trouble in some of my phone book entries. It shows character like E 11 in phone book numbrers.

    I terminated synchronization of iphone4 with itune on my hp laptom before it got completed. After this, i got unique trouble in some of my phone book entries. It shows character like E 11 in phone book numbrers.

    So re-sync them.

  • I would like to sign my photos in Aperture 3.2.4 before sharing my pics with other people online. Any idea how this is done if possible, thanks

    I would like to sign my photos before posting it online. Any idea how this done in Aperture 3.2.4, if possible? Thanks

    As Léonie wrote Aperture can add a watermark file to an image on export but I find its ability to do so limited.
    Another option is the free  plugin BorderFX . It has a lot of capabilities that are very useful when using Aperture. Even if you decide not to use it for this you should check it out.
    regards

  • RichTextEditor greater sign conversion literally

    Hello,
    using the richTextEditor I enter within the text the tag <post>. This tag will be used by the application. The text is written immediately to the database but not exactly as I entered it.
    Instead of writing literally '<post>' to the database the following will be stored: & l t ; post & g t ; ... without blanks in between
    What do I have to do avoiding the conversion of the greater sign and less sign and I guess other characters also.
    Any help will be greatly appreciated.
    Thanks in advance, Martin
    Edited by: user463656 on 19.06.2011 22:41
    Edited by: user463656 on 19.06.2011 22:42
    Edited by: user463656 on 19.06.2011 22:43
    Edited by: user463656 on 19.06.2011 23:11

    Only html 4 tags are supported, with the exception of those listed below script, noscript frame, frameset, noframes "form" related elements - input, select, optgroup, option, textarea, form, button, label, >isindex "document" related elements - html, head, body, meta, title, base, link
    Also not supported embed (not supported in html 4) unknown tags, for example <foo>
    We do support tags that pull in content such as applet, iframe, object, img, and a. For iframe in particular the browsers only allow interactions with content from the same domain, so the content in these >should not be able to interact with the rest of the page. However be aware that this portion of the page is not under the control of the application. For example the content of an iframe may have content >asking for a password.<post> is not supported..

  • I would like to sign up for the HP online classes. But it does not allow me to.

    I would like to sign up for the HP online classes.  But it does not allow me to. Each time I click on the button I get an error message from internet explorer.

    Hi Kathleen: Can you tell me what version Internet Explorer you are using? In the mean time you can sign up for classes by visting web-site. http://h30187.www3.hp.com/?tab=atHome&jumpid=hpr_R1002_USEN  Ounce you signed in the rest of the stuff is done through e-mail. I can only give direction on how to set setting in Internet Explorer 8. Internet Explorer 9 I would have to go to MSN.com Read all the website pages and watch all the demo videos. Buy the way is this a new computer? If so in your Internet Explorer  favorites all HP links are listed in HP file. They are preprogram in the computer. Just click on link that has a line on the bottom. Web page will open to sign up for classes.

  • How to Insert special character like 'Б б В в Г Д  ж Ğ ğ € ₧ š Ž ž'

    Hi All,
    My database NLS_CHARACTERSET is ABLAUT and my sql client setting is AMERICAN_AMERICA.AL32UTF8.
    when i try to insert the special character like 'Б б В в Г Д ж Ğ ğ € ₧ š Ž ž' in oracle it shows question mark or square box
    can any one help me how to insert the above character and view the same in database while retrieving.
    Thanks in advance.
    By
    Chells

    I'm not sure.
    Perhaps UNISTR() or TO_NCHAR() will be helpful.
    select level, unistr(concat('\', TO_CHAR(Level, 'FM000X'))) from dual connect by level < 300;

  • I want to set context path to 1 character like "/a"

              I use WLS6.1.
              I'd like to access
              http://localhost:7001/a/servletname
              to web application "a" or "a.war".
              but it doesn't seems work.
              (Returned "Http Error 404")
              Can't I set context path to 1 character,
              like "/a","/b",..."/z",etc?
              thanks for your answer.
              Kurose
              

    In this case you probably should submit this to [email protected] - it
              definitely looks like a bug. BTW, did you try 6.1sp1? This bug looks
              so obvious, so it's possible it was fixed in sp1.
              Kurose <[email protected]> wrote:
              > Thanks your reply.
              >>Maybe the problem you have is similar - does it work if you deploy
              >>aaa.war instead of a.war (and try http://localhost:7001/aaa/servletname)
              >>?
              > It works when WAR-File name is aa.war(Only 2 characters).
              > <http://localhost:7001/aa/servletname>
              > And on WLS6.02,a.war works.
              > <http://localhost:7001/a/servletname>
              > On on WLS6.1 it doesn't work.
              >>Did you application deploy successfully?
              > No exception when application was deployed.
              > But done "undeploy => deploy" on AdminConsole,
              > exception is occurring.
              > Dimitri Rakitine <[email protected]> wrote:
              >>Did you application deploy successfully? There is(was?) a bug
              >>in 6.1 using File.createTempFile which was preventing war's with
              >>archives in WEB-INF/lib with names less than 3 characters from
              >>working.
              >>
              >>Maybe the problem you have is similar - does it work if you deploy
              >>aaa.war instead of a.war (and try http://localhost:7001/aaa/servletname)
              >>?
              >>
              >>Kurose <[email protected]> wrote:
              >>
              >>> I use WLS6.1.
              >>
              >>> I'd like to access
              >>> http://localhost:7001/a/servletname
              >>> to web application "a" or "a.war".
              >>> but it doesn't seems work.
              >>> (Returned "Http Error 404")
              >>
              >>> Can't I set context path to 1 character,
              >>> like "/a","/b",..."/z",etc?
              >>
              >>> thanks for your answer.
              >>
              >>> Kurose
              >>
              >>
              >>--
              >>Dimitri
              Dimitri
              

  • My browser and email setup is missing and i cant access my balances with any character like"#*"

    can anyone help me plz my browser and email setup is missing and i cant access my balances with any character like"#*" thanks in advance.

    Hi and Welcome to the Community!!
    For the Browser and Email setup, I suggest the following steps, in order, even if they seem redundant to what you have already tried (steps 1 and 2 each should result in a message coming to your BB...please wait for that before proceeding to the next step):
    1) Register HRT
    KB00510 How to register a BlackBerry smartphone with the wireless network
    Please wait for one "registration" message to arrive to your Messages app
    2) Resend Service Books
    KB05000Delete the service book for the BlackBerry Internet Service email account from the BlackBerry smartphone
    If you have no CMIME entry, then skip the deletion
    KB02830 Send the service books for the BlackBerry Internet Service
    Please wait for "Activation" Messages, one per already configured email account, to arrive in your Messages. If you have no already configured email accounts, please wait 1 hour.
    3) Batt Pull Reboot
    Anytime random strange behavior or sluggishness creeps in, the first thing to do is a battery pop reboot. With power ON, remove the back cover and pull out the battery. Wait about a minute then replace the battery and cover. Power up and wait patiently through the long reboot -- ~5 minutes. See if things have returned to good operation. Like all computing devices, BB's suffer from memory leaks and such...with a hard reboot being the best cure.
    For the # character, are you saying you cannot type that character at any time? Or that you cannot access whatever dialing strings your carrier provides for balances and such?
    In any event, if the above does not work for the Browser and Email, then you must contact your mobile service provider to ensure you are subscribed to, from them, an adequate data plan to enable the services you desire. When you do, you can ask them also about the # key problem.
    Good luck!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

Maybe you are looking for