|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
XSL and HTML Entities are disappearing
Hi,
I am working on one of my first attempts at XSLT to tranform supplied XML docs into HTML. My XSL stylesheet is working great except for any HTML entities in the text data of the XML (eg. † — ). After running through XSLT these have disappeared and are not in the source code of the new HTML page. Code:
<?xml version="1.0"?>
...
<fnoteref>
†
</fnoteref>
It seems not matter what I put in my XSL this is just ignored. Any help or directions would be greatly appreciated. Peer
__________________
Weiler's Law Nothing is impossible for the man who doesn't have to do it himself. |
|
#2
|
|||
|
|||
|
With XML a small set of characters are 'special' including
ampersand '&' and the left angle bracket '<'. Have a look at the following: www.dpawson.co.uk/xsl/characters.html - Finnbarr |
|
#3
|
|||
|
|||
|
This problem is still driving me nuts. I have been studying the supplied XML files a lot more and this is what I have found.
The DTD is in multiple files, but it does include all the required ENTITY declarations for &mdash and † (the ones I am having the trouble with). Everything I have tried so far has not worked and these symbols are not displayed. Other research recommended adding a DOCTYPE declaration in my XSL file and that didn't work either. The supplied XML files can't be modified, for legal reasons, so I am dependant on XSL to get these entities to display and it still looks like they are being ignored or parsed out. If this helps, I am using PHP with the built-in XSLT functions (sablotron + expat), but I have also tried it in a standalone parser using Sablotron and libxslt and none of them work. Peer |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > XSL and HTML Entities are disappearing |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|