Prevent XSL from processing entity references
Posted: Mon Jan 11, 2010 4:07 pm
I am trying to make an identical copy of an XML and addinging in some additional nodes using XSL.
My problem is that the XSL transformation process is converting all my entity references in the source XML into the strings that exist in my DTD.
The result is that the modified output XML no longer contains entity references and my application therefore displays incorrect data. (my app does the conversion from entity ref to output string).
How can i prevent the transformation from processing the entity refs and outputting the associated strings?
For example:
In my DTD i have a number of ENTITY definitions where &phon032 becomes *phon032.
When I run my XSL transformation it substitutes the above XML into:
How can i make sure that my <xsl:copy-of statement sends the identical text to the output so that i have &phon.. instead of *phon.. in my outputted XML??
My problem is that the XSL transformation process is converting all my entity references in the source XML into the strings that exist in my DTD.
The result is that the modified output XML no longer contains entity references and my application therefore displays incorrect data. (my app does the conversion from entity ref to output string).
How can i prevent the transformation from processing the entity refs and outputting the associated strings?
For example:
Code: Select all
<desc lang="EN">This pronunciation activity practises the vowel sounds
/&phon032;/, /&phon003;/ and /&phon020;/. You choose the correct vowel sound
for each word.</desc>
In my DTD i have a number of ENTITY definitions where &phon032 becomes *phon032.
When I run my XSL transformation it substitutes the above XML into:
Code: Select all
<desc lang="EN">This pronunciation activity practises the vowel sounds
/*phon032;/, /*phon003;/ and /*phon020;/. You choose the correct vowel sound
for each word.</desc>