[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Invalid character reference while parsing

Subject: Re: Invalid character reference while parsing
From: Mukul Gandhi <mukul_gandhi@xxxxxxxxx>
Date: Fri, 21 May 2004 06:57:49 -0700 (PDT)
invalid character
Hi Shishir,

The XML spec says -

"The ampersand character (&) and the left angle
bracket (<) must not appear in their literal form,
except when used as markup delimiters, or within a
comment, a processing instruction, or a CDATA section.


If they are needed elsewhere, they MUST be escaped
using either numeric character references or the
strings "&amp;" and "&lt;" respectively."

So, you must specify them as &amp; and &lt; in your
XML.

Regards,
Mukul

 
--- shishir.srivastava@xxxxxxxxx wrote:
> 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.
>
*****************************************************************
> 



	
		
__________________________________
Do you Yahoo!?
Yahoo! Domains  Claim yours for only $14.70/year
http://smallbusiness.promotions.yahoo.com/offer 

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.