[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Entities Conversion
On Sat, May 26 2007 23:39:12 +0100, Abel Braaksma wrote: > J. S. Rawat wrote: ... >> DESIRED OUTPUT >> “ ” – — > > there's a way to get this in XSLT 2.0 using character-sets, but it is > usually not the way to go as you will invalidate your xml. ...unless your output includes (or is included as an external general parsed entity in a document that includes) the DOCTYPE declaration for a DTD that defines those entities. It's generally not necessary to turn the characters back into entity references since your XML parser will turn them back into characters again anyway when you come to parse your XML. About the only use that I can see for turning the characters back into entities is if you both need to eyeball the XML and it would make more sense to you if you saw named entity references rather than numeric references. If you want to, your stylesheet can import a set of XSLT 2.0 character maps for the ISO entity sets that can be downloaded from http://www.w3.org/2003/entities/iso8879doc/overview.html. While DTDs sometimes map multiple different ISO entities to the same numeric entity reference, these character maps can only convert a character back to a single entity reference. If you use these character maps, you might particularly look at the mappings to 'rsquor' and 'rdquor' in the ISOpub mapping since you may want 'rsquo' and 'rdquo' instead. Regards, Tony Graham. ====================================================================== Tony.Graham@xxxxxxxxxxxxxxxxxxxxxx http://www.menteithconsulting.com Menteith Consulting Ltd Registered in Ireland - No. 428599 Registered Office: 13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland ---------------------------------------------------------------------- Menteith Consulting -- Understanding markup ======================================================================
|
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
|