Thread: Entity Question
View Single Post
 
Old November 22nd, 2005, 05:06 AM
mhkay's Avatar
mhkay mhkay is offline
Wrox Author
Points: 18,487, Level: 59
Points: 18,487, Level: 59 Points: 18,487, Level: 59 Points: 18,487, Level: 59
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

XML entity references are expanded by the XML parser (that is, replaced by their replacement text) before the XSLT processor gets to see them. The data model defining what XSLT sees does not include entities. If you want to manipulate XML at this physical level you need a lower-level tool than XSLT.

One trick that's sometimes used is to modify the entity replacement text to include element tags, which are then visible to the XSLT processor.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference