Using Ant to Apply XSLT

I am applying an XSLT to an XHTML document using the ant task xslt i.e.

                <xslt basedir="${tempLoc}" destdir="${tempLoc}"

The problem I have is that the XHTML document contains some non breaking spaces (&nbsp), and once the stylesheet is applied I get some strange characters displayed on my XHTML page.  I am assuming that these strange characters (Â) are some encoded version of this non breaking space ? as it appears to generate "Â&nbsp;"

How do I get these encoded characters treated correctly ?  I am using Linux Redhat ES 3, with Java 1.5.6_06.

The pages are being served by Apache 2.0.55.

I have tried to replace the &nbsp in the source xhtml to &#160, but this has no effect.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

NeilShermanAuthor Commented:
I seem to have found the solution to my own problem!

The solution is to ensure that the attribute encoding="ISO-8859-1" is within the xsl:output element of your stylesheet!
Set the correct output property:

<outputproperty name="encoding" value="iso8859_1"/>

(See Ant docs for that task)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
NeilShermanAuthor Commented:
lol! Beat you too it, but thanks!

That's slightly different in fact, and means you don't need to depend on the encoding being specified in the stylesheet
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Languages and Standards

From novice to tech pro — start learning today.