View Single Post
  #2 (permalink)  
Old November 12th, 2009, 08:10 PM
mhkay's Avatar
mhkay mhkay is offline
Wrox Author
Points: 18,438, Level: 59
Points: 18,438, Level: 59 Points: 18,438, Level: 59 Points: 18,438, Level: 59
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,954
Thanks: 0
Thanked 290 Times in 285 Posts
Default

An ampersand in any XML document (including a stylesheet) must be escaped as
Code:
&
to make it valid XML.

The HTML serializer will also output
Code:
&
in the generated HTML. This is required by the HTML specification. It's common for people writing HTML by hand to ignore this rule, and HTML browsers are very forgiving, but the correct form is to escape it, and every browser will accept it in that form.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
Reply With Quote