Next in thread → Next in month →

Re: [docbook-apps] Question on CDATA in XML

From
DeanNelson <>
Date
2010-06-25T15:56:00+00:00
ID
Thread
Re: [docbook-apps] Question on CDATA in XML
Fabien,

 

FYI -  "&micro;"  is an XML ENTITY which is valid XML.

 

It sounds like you are close to working through your problem. In following this thread, I wondered if you could strip the RTF into a text file and then use XInclude. It may get messy since it sounds like you have a lot of bits of text which would equate to a lot of files but that could work.

 

Regards,

Dean Nelson

 

 

 

 

In a message dated 06/25/10 08:22:47 Pacific Daylight Time,  writes:

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 '&micro;'. 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, &micro; 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:] 
Envoyé : vendredi 25 juin 2010 16:54 
À :  
Objet : Re: [docbook-apps] Question on CDATA in XML 

On Fri, 25 Jun 2010 16:31:51 +0200 
"Fabien Tillier" <> wrote: 

> Ok, so I have changed my RTF to HTML conversion stuff so that it 
> strips all HTML tags (so I am lo
 osing 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 &alpha; 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:  
For additional commands, e-mail:  

--------------------------------------------------------------------- 
To unsubscribe, e-mail:  
For additional commands, e-mail: 
Next in thread → Next in month →