We help IT Professionals succeed at work.

Character Reference problem

rema_n
rema_n asked
on
241 Views
Last Modified: 2008-07-03

Suppose I have an XML with an Entity reference declaration.

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE furniture [
     <!ENTITY copy "&#x00A9;" >
     <!ENTITY eacute "&#x00E9;">
]>


<furniture>
      <table>&eacute;Square Table&eacute;</name>
</furniture>

I open this XML in IE, &eacute; is converted to the value é and displayed to me.
But if I do view source in IE, I can see &eacute; instead of the value.

Does that mean that the browser does the conversion of converting from &eacute to é ? Please clarify.
The same thing hapens when I am using XSLT to display in HTML. In the browser I get to see é whereas in source I find &eacute;


Comment
Watch Question

Information Architect
CERTIFIED EXPERT
Top Expert 2006
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
In XSLT:
In XML the entity is defined as

<!DOCTYPE furniture [
     <!ENTITY eacute "&#x00E9;">
]>

In the XML what is written is &eacute;
The parser(XML parser?) replaces it to &#x00E9;
This &#x00E9; is converted by the XSLT processor back into &eacute;
Now this &eacute; is send to the browser which displays it as é

Please correct me where ever I am wrong.

Thank You
Gertone (Geert Bormans)Information Architect
CERTIFIED EXPERT
Top Expert 2006

Commented:
That is a correct understanding

cheers

Geert
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.