xsl-list
[Top] [All Lists]

RE: Invalid character reference while parsing

2004-05-21 08:16:19
Yes, special characters such as & and < must be escaped if they appear in
text, so that they are not treated as markup. You are doing the right thing.

Michael Kay 

-----Original Message-----
From: shishir(_dot_)srivastava(_at_)sgcib(_dot_)com 
[mailto:shishir(_dot_)srivastava(_at_)sgcib(_dot_)com] 
Sent: 21 May 2004 11:43
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Invalid character reference while parsing

Hi All,
I create a text node in an xml document which might contain 
characters like
"&"  and <(angle brackets) to say atleast.
Now when this is parsed by xslt parser it throws an error saying

"could not parse input XML document
SAX Exception
Invalid character in reference"

what i did --
at the time of generation of node ,i look for "&" and "angle 
brackets" in
data and replace these characters.
then it works fine.

but i really want to know is this the best method to achieve this?
or we have any better practice?

I am using XML4J, as  XML processor, and LotusXSL as xslt parser.

Thanks & Regards
___________________________
Shishir Srivastava







*****************************************************************
The addressee's email address has changed to
firstname.lastname@ sgcib.com. You may want to update your
personal address book. Please see http://www.sgcib.com for more
information.

This message and any attachments (the "message") are confidential
and intended solely for the addressee(s). Any unauthorised use or
dissemination is prohibited.E-mails are susceptible to alteration.
Neither SOCIETE GENERALE nor any of its subsidiaries or affiliates
shall be liable for the message if altered, changed or falsified.
*****************************************************************


--+------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--+--





<Prev in Thread] Current Thread [Next in Thread>