Custom PDF/RTF reports with Cocoon (problem with special characters)

Hi all,
I've setup application (APEX 3.0.1) with some custom PDF reports (using Cocoon 2.1.10),
I'm generating my own hierarchical xml structure, using query with xmlelement() and xmlagg() functions,
I cannot use built-in xml generator, because I need to get master-detail report with sub-grouping.
Everything works fine if data in report doesn't contains special characters like "&",
but Cocoon stops processing XML data when it found special character, following error is written to cocoon log:
INFO (2007-10-02) 12:34.16:828 [sitemap.transformer.log] (/cocoon/fop_post/) http-8888-1/LogTransformer: [startElement] uri=,local=PRZEDMIOT,raw=PRZEDMIOT
INFO (2007-10-02) 12:34.16:828 [sitemap.transformer.log] (/cocoon/fop_post/) http-8888-1/LogTransformer: [startCDATA]
INFO (2007-10-02) 12:34.16:828 [sitemap.transformer.log] (/cocoon/fop_post/) http-8888-1/LogTransformer: [characters] PPHU "T
ERROR (2007-10-02) 12:34.16:828 [sitemap.generator.stream] (/cocoon/fop_post/) http-8888-1/StreamGenerator: StreamGenerator.generate()
org.xml.sax.SAXParseException: XML document structures must start and end within the same entity.
ERROR (2007-10-02) 12:34.16:828 [sitemap.handled-errors] (/cocoon/fop_post/) http-8888-1/ErrorHandlerHelper: Failed to process pipeline
     at <map:serialize type="xml"> - file:/D:/oraclexe/apache-tomcat-6.0.13/webapps/cocoon/fop_post/sitemap.xmap:22:32
     at <map:generate type="stream"> - file:/D:/oraclexe/apache-tomcat-6.0.13/webapps/cocoon/fop_post/sitemap.xmap:18:33
     at <map:serialize type="fo2pdf"> - file:/D:/oraclexe/apache-tomcat-6.0.13/webapps/cocoon/fop_post/sitemap.xmap:58:37
     at <map:transform> - file:/D:/oraclexe/apache-tomcat-6.0.13/webapps/cocoon/fop_post/sitemap.xmap:51:39
     at <map:transform type="log"> - file:/D:/oraclexe/apache-tomcat-6.0.13/webapps/cocoon/fop_post/sitemap.xmap:45:35
     at <map:generate> - file:/D:/oraclexe/apache-tomcat-6.0.13/webapps/cocoon/fop_post/sitemap.xmap:42:38
     at <map:mount> - file:/D:/oraclexe/apache-tomcat-6.0.13/webapps/cocoon/sitemap.xmap:1034:92
org.xml.sax.SAXParseException: XML document structures must start and end within the same entity.
This error occur when Cocoon process folowing XML entity:
<PRZEDMIOT><![CDATA[PPHU "T&M" Ltd.]]></PRZEDMIOT>
I tried to escape "&" character with CDATA section, but it didn't work.
I tested following alternatives:
<pre>
<PRZEDMIOT>PPHU "T&M" Ltd</PRZEDMIOT>
<PRZEDMIOT><PPHU &quot;T&amp;M&quot; Ltd.></PRZEDMIOT> --remove '<' and '>' characters
<PRZEDMIOT><![CDATA[PPHU "T&M" Ltd.]]></PRZEDMIOT>
</pre>
but I still get the same error.
Can anyone help me with this ?
Thanks
Tomasz K.

Ok, I found that only '&' and '%' characters breaks Cocoon processing.
The workaround is to use replace() function and change:
'&' to '%26' and '%' to '%25', but I think that is a dirty way...
Other characters like " - 'double citation' are succesfully escaped with xmlcdata() function.
Perhaps someone know the simpler way to get Master/Detail PDF reports from APEX without using BI Publisher ???
Actually I have page process invoked by button, which generates XML data, post it to Cocoon with UTL_HTTP and save generated PDF to database table (for future use).
The same button invokes branch to URL with download procedure.
Standard APEX reporting is not very usefull for me, because I don't know how to generate "complex" documents, with several grouping sections.
I will be gratefull for any aid.

Similar Messages

  • HT1349 Hi all,I have just purchased new iphone but have difficulty in completing the itunes download with message : problem with Windows installer package. A program run as part of the setup did not finish as expected.

    Hi all,I have just purchased new iphone but have difficulty in completing the itunes download with message : problem with Windows installer package. A program run as part of the setup did not finish as expected.
    Would appreciate help...its driving me up the wall!!

    Perhaps let's first try updating your Apple Software Update.
    Launch Apple Software Update ("Start > All Programs > Apple Software Update"). Does it launch and offer you a newer version of Apple Software Update? If so, choose to install just that update to Apple Software Update. (Deselect any other software offered at the same time.)
    If the ASU update goes through okay, try another iTunes install. Does it go through without the errors this time?

  • I have created a book in ibooks author with a custom font when previewing on the ipad the special characters within the font do not appear?

    I have created a book in ibooks author with a custom font when previewing on the ipad the special characters within the font do not appear?

    'custom' font sounds like you may be working with a font that is unsupported on iOS/iPad.
    Supported fonts are found in the pull-down font menu in the toolbar. Authors are obligated (mostly) to stick to that list.

  • Why can't I receive help with my problems with Match? A service I pay for??

    Why can't I receive help with my problems with Match? A service I pay for??

    Hi,
    THis is a user help forum. If you tell us what your issues are, maybe someone can offer advice. Otherwise, read this https://www.apple.com/uk/support/itunes/itunes-match/
    JIm

  • Unable to call report from jsp - password contains special characters

    Hi
    I used the following url to call my oracle report from my JSP webpage but got the error mentioned below. It seems that this error occurs when i use the login id with password that contains special characters only. How can I overcome this problem?
    Any help appreciated. Thx.
    Regards,
    Siti
    URL used: -
    "http://pc-325:8889/reports/rwservlet?server=pc-325&report=prodeff80120i&P_JDBCPDS="+vlogin1+"&destype=cache&desformat=pdf&paramform=no&p_type="+p_type;
    Error encountered: -
    REP-163: Invalid value for keyword DESTYPE.
    Valid options are FILE, PRINTER, MAIL, INTEROFFICE, or CACHE.

    Hi Stefan,
    Many of the customers are located in hungary and they have created the userid using their keyboard. Hence for now I already have a userid with that hungarian characters, in the SAP system.
    Only I would request for the help on how to interface these characters in SAP Business connector to call RFC.
    Thanks,

  • Report generation toolkit problem with office 2000 and office XP

    Hello, I am having a problem with running my vi after it is compiled with application builder. The dev machine is an XP box and the targer is windows 2000. I included _Excel Dynamic VIs.vi and _Word Dynamic VIs.vi from the office 2000 section of the install cd (for the report toolkit) in the compile but did not include those files for XP. When I run the application on the target machine (2000), the reporting functions call Excel just fine and the program does not come up with any errors. The program however, is not loading the approprate template and inserting the approprate data. Did I leave some neccessary files out of the compile? Thanks in advance!
    Greg
    Gregory Osenbach, CLA
    Fluke

    Hi Acer,
    The recommended procedure in your case is to install Microsoft Office 2000 on the development machine and then reinstall the LabVIEW Report Generation Toolkit. When the toolkit is installed, it will check for the current version of Office and install the corresponding VIs to support it. The VIs include different ActiveX calls according to the version of Office. Therefore it is not enough to change the support manually without having the correct version of Office installed first.
    However, I would recommend that you just try to run your executable on a machine that has Office 2000 installed. The difference in the ActiveX API for Office XP and 2000 is not that significant, so your application might work perfectly on an Office 2000 machine. If you try to run the executable on a machine with Office 97 installed I'm willing to bet my right arm that you will experience errors.
    Good luck Acer!
    - Philip Courtois, Thinkbot Solutions

  • Interactive PDF Form in Landscaped Page; Problems with Additional Pages

    Please see the attached screenshot.
    I created a form (in Word) which has 10 pages of the exact same fields except for the side number (the 10 pages number from 1 to 200) which numbers each line to be filled out by the end user.
    I have created each field for page 1 (no easy feat as Acrobat 11 did not recognize most of the necessary fields) and all of the checkboxes must be grouped so that only one checkbox is able to be picked.  When I try to distribute each of the fields to the other 9 pages, or even if I copy and paste the fields to page 2, then the fields turn portrait rather than landscaped and I am unable to rotate them.
    I have tried extracting page 1, rename it to page 2, update the numbering scheme (which throws everything out of alignment), and then reinsert it behind page 1, and again, it rotates the landscaped fields to portrait.
    Is there any way possible for me to EASILY recreate this page nine more times (I have already spent approximately 10 hours working on this one page getting everything created and lined up correctly)? 
    In doing some research yesterday, I saw that this was a software limitation issue and that Acrobat does not allow fields in landscaped pages to be recreated as landscaped fields (I do not have this problem with the same type of form created in portrait pages and can distribute fields all day long through pages and pages of PDFs.
    Does anyone have any suggestions or guidance that I can draw upon other than having to create each page separately (I just do not have the time as the one page took me about 10 hours)? 
    Thank you so much!

    That's very disappointing ...
    Thanks Bernd, for your answer!

  • Reports with output to excel - special characters not displayed correctly.

    Hi,
    I have a portal with data from 5 continents. In many places special or national characters are used in names. My portal can show most of these characters correctly and so can my version of Microsoft Office Excel. When text with these characters are copy/pasted from the screen to an excel sheet, they are also shown correctly in excel. The problem arises in portal reports, where output is set to Excel, then special characters are often displayed as strange double characters, for example á is shown as á . Does anybody have a solution to that?
    Thanks
    Arne

    No answers have been posted yet and now I have found a solution myself. The portal report is run and output set to Excel. The resulting file is opened, and a new row is inserted in the top of the sheet. In the first field in this row is written the characters *\xEF\xBB\xBF*. It is called a UTF-8 BOM, and when written in the start of a text file, it will tell the program that opens it, that UTF-8 encoding is used.<br><br>
    The file is saved with the file type CSV (semicolon separated) (*.csv) and excel is closed. When you click on the CSV-file, it is opened by excel, and now all characters with accents, circumflexes and umlauts are shown correctly.<br><br>
    The solution was found here: http://www.roosmaa.net/importing-utf-8-csvs-in-excel/

  • IE shuts down with message problem with flash10e.ocx

    I have a dell Dimension E310. I keep it in top shape. But recently my IE(7) either freezes up and eventually kicks back to desktop or sometimes it comes with a message that IE has encounted a problem with flash10e.ocx and must shut down. I have been on the phone for the last 3 days with Dell Tech Support and they are no help. Can someone on here please help me. This is driving me insane!!

    Hi,
    It seems that you are having issue with Crystal reports Java SDK's.
    Post your question in [Crystal Reports Java SDK forum|SAP Crystal Reports, version for Eclipse;.
    That forum is monitored by qualified technicians and you will get a faster response there. Also, all Java SDK queries remain in one place and thus can be easily searched in one place.
    Thank you for your understanding,
    Amit

  • Help with certficates - problems with CSSMERR_TP_NOT_TRUSTED & validating

    I'm having problems with my machine, and it appears to be a certificate problem. The problems first started showing up with codesigning and when trying to re-install XCode. I've been trying to understand things through keychain, but I don't know if what I'm seeing is normal or not.
    I've got two copies of Apple Root CA and Apple Root Certificate Authority in my keychains (one of each in "System", one of each in "System Roots"). I have no idea if that is normal or if that part of the problem. These all show up with "This root certificate is not trusted". I'm assuming that's OK, maybe that's part of the problem? (They are all have trust set to "use system defaults").
    The Apple Worldwide Developer Relations intermediate certificate that I download from Apple doesn't appear to find or trust the Apple Root CA (in keychain, the AWWDR shows "This certificate was signed by an unknown authority, and keychain "evaluate" doesn't find a root certificate, even though Apple Root CA is in the keychain).
    Note that the AWWDR certificate says that it's issuer was Apple Root CA, serial number 25, version 3, but the Apple Root CA certificate says that it's serial number 2, version 3. I'm not sure if that makes any difference.
    The big problem is that because of what I believe to be certificate problems, I'm getting the CSSMERRTP_NOTTRUSTED error reported when I try to codesign or even when I try to install the iPhone SDK.
    I did have my motherboard replaced a couple of months back, but things were working just fine (including codesigning) after that, and suddenly stopped working (I don't know when, I just know that I noticed the problem around Oct 12).
    For what it's worth, the error when trying to install XCode (with iPhone SDK) is:
    10/16/10 12:20:02 PM Installer[1582] Failed install preflight: Error Domain=PKInstallErrorDomain Code=102 UserInfo=0x19dd99d0 "The package “iPhoneSDKTools.pkg” is untrusted." Underlying Error=(Error Domain=NSOSStatusErrorDomain Code=-2147409622 UserInfo=0x1aa22360 "The operation couldn’t be completed. CSSMERRTP_NOTTRUSTED")

    Reinstalling Snow Leopard from the original DVD seems to have cleared up the problem. My Apple Root CA certificate now shows "valid".

  • Can some one help me with this problem with my frame???

    i have gt a veri strange problem with my program,that is teh graphic changes only when i resize the the frame,if i dun resize,it will remain the same.However what i intended is that when i click on the radio button,it will change immediately to the respective pages.A simple version of my code is below,can someone helpl me solve it??(there is 3 different class)
    import java.awt.event.*;
    import javax.swing.*;
    public class MainPg extends JFrame implements ActionListener{
         private javax.swing.JPanel jContentPane = null;
         private javax.swing.JPanel buttons = null;
         private javax.swing.JRadioButton one = null;
         private javax.swing.JRadioButton two = null;
         private javax.swing.JPanel change = null;
         public MainPg() {
              super();
              initialize();
         private void initialize() {
              this.setSize(300, 200);
              this.setContentPane(getJContentPane());
              this.setName("mainClass");
              this.setVisible(true);
         private javax.swing.JPanel getJContentPane() {
              if (jContentPane == null) {
                   jContentPane = new javax.swing.JPanel();
                   jContentPane.setLayout(new java.awt.BorderLayout());
                   jContentPane.add(getButtons(), java.awt.BorderLayout.WEST);
                   jContentPane.add(getChange(), java.awt.BorderLayout.CENTER);
              return jContentPane;
         private javax.swing.JPanel getButtons() {
              if(buttons == null) {
                   buttons = new javax.swing.JPanel();
                   java.awt.GridLayout layGridLayout1 = new java.awt.GridLayout();
                   layGridLayout1.setRows(2);
                   layGridLayout1.setColumns(1);
                   ButtonGroup group=new ButtonGroup();
                   group.add(getOne());
                   group.add(getTwo());
                   buttons.setLayout(layGridLayout1);
                   buttons.add(getOne(), null);
                   buttons.add(getTwo(), null);
              return buttons;
         private javax.swing.JRadioButton getOne() {
              if(one == null) {
                   one = new javax.swing.JRadioButton();
                   one.setText("One");
                   one.setSelected(true);
                   one.addActionListener(this);
                   one.setActionCommand("one");
              return one;
         private javax.swing.JRadioButton getTwo() {
              if(two == null) {
                   two = new javax.swing.JRadioButton();
                   two.setText("Two");
                   two.addActionListener(this);
                   two.setActionCommand("two");
              return two;
         private javax.swing.JPanel getChange() {
              if(change == null) {
                   change = new javax.swing.JPanel();
              change.add(new One());
              return change;
         public static void main(String[] args){
              new MainPg();
         public void actionPerformed(ActionEvent e) {
              change.removeAll();
              if("one".equals(e.getActionCommand())){
                   change.add(new One());
              else{
                   change.add(new Two());
              change.repaint();
    import javax.swing.*;
    public class One extends JPanel {
         private javax.swing.JPanel jPanel = null;
         private javax.swing.JLabel jLabel = null;
         private javax.swing.JPanel jPanel1 = null;
         private javax.swing.JLabel jLabel1 = null;
         private javax.swing.JLabel jLabel2 = null;
         public One() {
              super();
              initialize();
         * This method initializes this
         * @return void
         private void initialize() {
              this.setLayout(new java.awt.BorderLayout());
              this.add(getJPanel(), java.awt.BorderLayout.NORTH);
              this.add(getJPanel1(), java.awt.BorderLayout.WEST);
              this.setSize(300, 200);
         * This method initializes jPanel
         * @return javax.swing.JPanel
         private javax.swing.JPanel getJPanel() {
              if(jPanel == null) {
                   jPanel = new javax.swing.JPanel();
                   jPanel.add(getJLabel(), null);
              return jPanel;
         * This method initializes jLabel
         * @return javax.swing.JLabel
         private javax.swing.JLabel getJLabel() {
              if(jLabel == null) {
                   jLabel = new javax.swing.JLabel();
                   jLabel.setText("one");
              return jLabel;
         * This method initializes jPanel1
         * @return javax.swing.JPanel
         private javax.swing.JPanel getJPanel1() {
              if(jPanel1 == null) {
                   jPanel1 = new javax.swing.JPanel();
                   java.awt.GridLayout layGridLayout2 = new java.awt.GridLayout();
                   layGridLayout2.setRows(2);
                   layGridLayout2.setColumns(1);
                   jPanel1.setLayout(layGridLayout2);
                   jPanel1.add(getJLabel2(), null);
                   jPanel1.add(getJLabel1(), null);
              return jPanel1;
         * This method initializes jLabel1
         * @return javax.swing.JLabel
         private javax.swing.JLabel getJLabel1() {
              if(jLabel1 == null) {
                   jLabel1 = new javax.swing.JLabel();
                   jLabel1.setText("one");
              return jLabel1;
         * This method initializes jLabel2
         * @return javax.swing.JLabel
         private javax.swing.JLabel getJLabel2() {
              if(jLabel2 == null) {
                   jLabel2 = new javax.swing.JLabel();
                   jLabel2.setText("one");
              return jLabel2;
    import javax.swing.*;
    public class Two extends JPanel {
         private javax.swing.JLabel jLabel = null;
         public Two() {
              super();
              initialize();
         * This method initializes this
         * @return void
         private void initialize() {
              this.setLayout(new java.awt.FlowLayout());
              this.add(getJLabel(), null);
              this.setSize(300, 200);
         * This method initializes jLabel
         * @return javax.swing.JLabel
         private javax.swing.JLabel getJLabel() {
              if(jLabel == null) {
                   jLabel = new javax.swing.JLabel();
                   jLabel.setText("two");
              return jLabel;
    }

    //change.repaint();
    change.revalidate();

  • Why did my calendar view suddenly change? Using iOS 7.1 and I've been using this version for a few weeks with no problem with my calendar. Now the view has changed and I can't view a list mode without seeing the month too

    Why did my calendar view suddenly change in iCal? I've been using ios7 fôr a few weeks now with no problems. Suddenly, without any updates or anything, the calendar view changed and I can no longer view it as a list without having the entire month seen as well.

    Hey Gattypyle,
    Thanks for the question. You simply need to go back to Day/Week view, then tap the list-view icon once more.
    Calendar at a glance - iPhone
    http://help.apple.com/iphone/7/#/iph3d110f84
    View a list of events. In month view, tap to see a day’s events. In day view, Tap the to view a list of events.
    Thanks,
    Matt M.

  • Problem with flat file loading/Special characters

    Hi, All,
    We just migrated from Version 3.0B to BI7.0, and I've a problem which I can't handle for the moment. We are in Unicode, current codepage of the server is 4103 and codepage of frontend is 4110 (from SNL1 Transaction).
    I'm loading czech texts in my material, via CSV files. The CSV file is correct on my PC, I see the special characters.
    The problem is on my loading, whatever Character set I choose in the Infopackage (I choose Standard or Character Set Setting User-dependant), I cannot see the good characters.
    Does any one of you already encounter this kind of problem, and, if yes, how did you solve it ?
    Thanks

    hi,
    check out with your flat file letter's type, if it's in lower case letter's change them in
    upper case letter's. or otherwise change the infobject's type as-- select check box
    corresponding to lower case letter's in infoobject.
    if helpful provide points
    regards
    harikrishna.N

  • Can anyone help me with a problem with Photoshop 7.0?

    I have the old Adobee Photoshop 7.0.1 and I recently ran into a problem with my Type tool that I can't figure out.
    Suddenly the type tool won't type. When I hit the type tool a LARGE cursor appears that's almost the full length of the picture I'm typing on, and it can't be scaled down, and it won't type words. After a few days of frustration I totally removed Photoshop from my system and reloaded it, but the huge cursor still exist.
    Can anyone give me an idea as to how to fix this? Please?
    DM

    Reset the type tool.
    Click on the Type tool, then click on down arrow of tool icon in upper left corner of screen.  The click on the right arrow to reveal dropdown box to reset tool.
    Earlier discussion on this: Photoshop 7.0 type tool malfunctioning

  • Can you help with technical problems with the stereo imagry option

    can you help with a technical problem with the stereo imagery option ? it won't take out lead vocal in a stereo mp3'

    Because this forum software is so absolutely USELESS now, you don't get to see the whole of the question in this view. In the other (non-list) view it says:
    "can you help with a technical problem with the stereo imagery option ? it won't take out lead vocal in a stereo mp3"
    And the answer is that if you can't isolate the vocal in the stereo field, or it is one of these odd ones where it's used inverted polarity in different parts of the stereo signal for the same vocal, then you won't be able to. But without a sample, it's impossible to tell. If you can post a link to one, that might help. It has to be external to this site though - Adobe in their infinite wisdom don't allow the posting of audio files on their audio U2U forum. Helpful, that, isn't it?

Maybe you are looking for