xsl-list
[Top] [All Lists]

Re: xslt replace special characters

2002-11-10 20:20:11
thanks mike. so the user has to input & or &3038; if their url consisys of an '&' .

alice


From: Mike Brown <mike(_at_)skew(_dot_)org>
Reply-To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] xslt replace special characters
Date: Fri, 8 Nov 2002 17:31:23 -0700 (MST)

Alice Fan wrote:
> ok. one last question... the search and replace works now. but when i pass
> in a '&' character to the xsl it totally dies.  i'm using xalan as my
> processor.  is there a wy in xslt to catch this and convert it to &amp;
> before it tries to parse it?

No. The XSLT processor relies on an XML parser for its input, and the parser
will reject a malformed document because those are the rules of XML
processing. You must provide well-formed input to the parser if you want it to pass the important parts of the document to the next application in the chain.

   - Mike
____________________________________________________________________________
  mike j. brown                   |  xml/xslt: http://skew.org/xml/
  denver/boulder, colorado, usa   |  resume: http://skew.org/~mike/resume/

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


..........................................................
Email: arisuu(_at_)hotmail(_dot_)com
Cell: (650) 483-8164
Work: (212) 201-0881
..........................................................

_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail


XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list