[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Entity Problems...
If you cannot know beforehand what entities will be passed on, it is
generally best to find online some big DTD that contains all allowed
HTML entities (you mentioned , but perhaps your favorite editor
throws in ü, ¢, ì etc). You can get quite a definite
list from the W3C of course, here's a starting point:
http://www.w3.org/TR/REC-html40/sgml/entities.html#h-24.2.1
Alternatively (but *not* recommended!): if you use Saxon 8.9 you can read the document with unparsed-text(), do a replace on the entities manually (replacing them by their numeric equivalents) and reparse using saxon:parse. But, I'd vote against this as it goes against the idea of using the XML input the way you should. Using a catalog as David suggested is probably easier. Finally: you ask for alternatives for an editor. I've done Tiny MCE but I did not like it (lack of standards support). I now use FCKEditor and it rocks (biased opinion!). A perfect (yet recent) addition to the configuration is that you can force it to output real XHTML 1.1 and you can have it replace all named entities for numeric ones. A definite partner when you need additional processing. The editor works with all major browsers (including safari, opera, konqeror) and is open source. Cheers, -- Abel Braaksma Nick Shepherd wrote: I use XSL in a homegrown content management system I wrote in php for the templating system. One of the problems I have encountered before was the use of entities like " " and the such. When not wrapped in CDATA tags it would always give an error unless it was replaced with the numeric equivalent. This data not being wrapped in CDATA is imperative because it is being used to output html that has been inputed from a textarea to the screen using xsl:copy-of...
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|