Entities and XSLT

I

Iain

Hey folks,

I've got a problem with an XML to HTML transformation that is now
bugging the heck out of me. Basically, all of the entities used in my
transformation style sheet are being rendered in my browser as
double-byte weirdness (an accented 'A' followed by the desired character).

When I run the transformation on one server (stone-aged Solaris/SPARC
with an equally stone-aged version of the libxml2/libxslt suite) it's
perfect. When I run it on my Gentoo/SPARC box (with the very latest
stable libxml2/libxslt builds) the entities render oddly.

I'm using utf-8 throughout. I've included the following line in my HTML
source:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

My browser, Mozilla 1.5, is set up for utf-8.

My transformation is being driven by a Perl process using the
XML::LibXML and XML::LibXSLT APIs; when I parse my XSLT style sheet,
I've even tried calling the expand_entities() method. As I said, works
fine on one machine with old s/w, but not my new one. All other aspects
of the transformation work fine. I am stumped.

Anyone have any idea what is going on. Is there anything I can do to
force the entities to come out as the same entities, not expanded
character sequences?

Hope someone can help.

Thanks,
Iain.
 
J

Johannes Koch

Iain said:
Hey folks,

I've got a problem with an XML to HTML transformation that is now
bugging the heck out of me. Basically, all of the entities used in my
transformation style sheet are being rendered in my browser as
double-byte weirdness (an accented 'A' followed by the desired character).

When I run the transformation on one server (stone-aged Solaris/SPARC
with an equally stone-aged version of the libxml2/libxslt suite) it's
perfect. When I run it on my Gentoo/SPARC box (with the very latest
stable libxml2/libxslt builds) the entities render oddly.

This seems to be no XSLT problem but a web server configuration problem.
What is the content-type header set by the HTTP server?
 
I

Iain

Johannes said:
Iain said:
Hey folks,

I've got a problem with an XML to HTML transformation ...
[snipped]

This seems to be no XSLT problem but a web server configuration problem.
What is the content-type header set by the HTTP server?

Johannes,

If I was a girl; I'd have your children!!! ;-)

Thank you very much for this. With that info I managed to track-down to
offending php.ini directive and correct it.

Usenet rocks!

Best wishes,
Iain.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Staff online

Members online

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,052
Latest member
LucyCarper

Latest Threads

Top