[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: [docbook-apps] Question on CDATA in XML
Stupid me! (in case others are too :) ) I have to use StringEscapeUtils.escapeXml, not StringEscapeUtils.escapeHTML.... -----Message d'origine----- De : Fabien Tillier [mailto:f.tillier@cerep.fr] Envoyé : vendredi 25 juin 2010 17:23 À : docbook-apps@lists.oasis-open.org Objet : RE: [docbook-apps] Question on CDATA in XML Well... I am using the apache commons lang package to encode the special characters (the one remaining after the rtf conversion, like µ). It encodes 'µ' as 'µ'. If I want to have an Unicode hex encoding, I have to stop using it and write my own... Unless there is another package I can use ? For my understanding, µ is valid HTML, not XML, that why it is further encoded by the XSLt to '&micro;' right ? Thanks a lot for your help, Dave. Regards, Fabien -----Message d'origine----- De : Dave Pawson [mailto:davep@dpawson.co.uk] Envoyé : vendredi 25 juin 2010 16:54 À : docbook-apps@lists.oasis-open.org Objet : Re: [docbook-apps] Question on CDATA in XML On Fri, 25 Jun 2010 16:31:51 +0200 "Fabien Tillier" <f.tillier@cerep.fr> wrote: > Ok, so I have changed my RTF to HTML conversion stuff so that it > strips all HTML tags (so I am loosing some formatting), and it works > better (I don't have thoses CDATA things anymore), except that I have > encoded characters (like &alpha;) You need to check your character level encoding throughout, end to end. Once it's in XML, & => & etc. If you want alpha, then use unicode character level encoding, e.g. & # x 0 3 b 1 ; (spaced in case it is messed up) that are showing up (which is > perfectly normal) but are not displayed by the browser as their > entity counterpart (here an alpha symbol). I assume I am missing > something like a transformation from &alpha; to α Is it > something that has to be implemented specifically (and how) in a > customization template or is there a magical option that can be > used ? Thanks a lot in advance Best regards, Fabien Once in XML that alpha as a character entity is just as valid as any other character. Prior to that, it's up to you. HTH -- regards -- Dave Pawson XSLT XSL-FO FAQ. http://www.dpawson.co.uk --------------------------------------------------------------------- To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org --------------------------------------------------------------------- To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]