473,378 Members | 1,470 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Entities and XSLT

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.

Jul 20 '05 #1
2 1581
Iain wrote:
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?
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)
Jul 20 '05 #2
Johannes Koch wrote:
Iain wrote:
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.

Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Romeo Disca | last post by:
Hello, i just want to make an identity transformation of an xhml document and i don't want entities to be resolved. &nbsp; should result in &nbsp; and not ' '. Is there any chance to...
2
by: Andy Dingley | last post by:
I have some (somewhat ragged) HTML, and I wish to pre-process it with XSLT before putting it back onto the server. Throughout this HTML are many character entity references, such as "&ecaute;". ...
1
by: Bob | last post by:
I use saxon transformer as XSLT engine, but I have a problem: --- Error reported by XML parser: reference to entity "&{0};" not defined. ---- In the source document there are many entites...
3
by: Tjerk Wolterink | last post by:
Hello, i've a xsl document that should also allow xhtml entities like &nbsp; The top of the document looks like this; <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE xsl:stylesheet >
11
by: Tjerk Wolterink | last post by:
I've a problem in an xsl transformation. My xml input: --- input.xml --- <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE xc:content > <xc:xcontent...
3
by: annoyed tuna | last post by:
I was wondering if someone could help me out. I'm trying to perform an XSL transformation on an XML document that uses entities. While I can do XSLT on a file without entities, it all falls apart...
1
by: cawoodm | last post by:
I need an identity XSLT that does not change the incoming XML document. The trick is that I need the entities to be preserved. My current transform converts   to the copyright symbol in the output...
1
by: Neil | last post by:
I want to be able to provide entity data to my XmlDocument from the runtime environment. I have an XML based report which I load into an XmlDocument object and feed to a PDF generator. Within...
0
by: Dan | last post by:
I have built an XSLT extension C# class where a function receives as input a text and transforms some of its charcodes into entities, e.g. A with acute accent becomes &Aacute; and so forth. The...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.