Re: [xep-support] Need help rendering special characters

From: Alexander Peshkov <peshkov@renderx.com>
Date: Fri Jan 21 2005 - 04:46:02 PST

Hello Joyce,

SAXParseException is thrown by XML parser and means that something
went wrong on the XML parsing step.

In your case the XML document is invalid - you have incorrect CDATA
section. Instead of:
   <[!CDATA[12345678&<<>99]]>
you should have:
   <![CDATA[12345678&<<>99]]>
(note the position of exclamation sign)
I don't know how your colleague managed to run non-valid document
through FOP - on my machine FOP (or, to be more precise, Xerces parser
used by FOP) complains about broken document as it should.

Best regards,
Alexander Peshkov mailto:peshkov@renderx.com
RenderX

JH> Hello,
 
JH> My name is Joyce Huang from VNS in New York. I have trouble to escaping
JH> special characters in xml file, such as "&" "<" etc.. Our data source is a
JH> cobal program, which is vert restricted on record length. To escape when the
JH> xml is written is not possible, so I endup with a not well-formed xml with
JH> the task of fixing it before rendering. I am trying to use CDATA in xml
JH> like following. Please pay attention to the highlighted line which deal with
JH> special characters. One of my co-workers ran it through FOP and actually
JH> generated a pdf with the CDATA part "12345678&<<>99" intact, while when I
JH> passed it to renderx, I got a SAXParseException. Does renderX currently
JH> support CDATA? If not, can you recommend a solution?

         
JH> <?xml version="1.0" encoding="UTF-8"?>
JH> <print-job>
JH> <header>
JH> <copies>2</copies>
JH> <duplex>true</duplex>
JH> </header>
        
JH> <NETPRNT_485_DATA>
JH> <NETPRNT_485_AGENCY_DATA>
        
JH> <NETPRNT_485_HIC_NUMBER><[!CDATA[12345678&<<>99]]></NETPRNT_485_HIC_NUMBER>
        
JH> <NETPRNT_485_START_OF_CARE_DAT>02/05/03</NETPRNT_485_START_OF_CARE_DAT>
JH> </NETPRNT_485_AGENCY_DATA>
JH> </NETPRNT_485_DATA>
JH> </print-job>

JH> Thanks.
JH> Joyce Huang

JH> -------------------
JH> (*) To unsubscribe, send a message with words 'unsubscribe xep-support'
JH> in the body of the message to majordomo@renderx.com from the address
JH> you are subscribed from.
JH> (*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html

-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo@renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html
Received on Fri Jan 21 05:29:13 2005

This archive was generated by hypermail 2.1.8 : Fri Jan 21 2005 - 05:29:13 PST