XSL and java.xml.transform - spaces vanish, not able to use entities

A

Angus Parvis

Hi,

I have a XSL Stylesheet. Using the java.xml.transform.Transformer I
transform XML to HTML. My XSL contains spaces and entities like
"©".

This code for example contains a space between text1 and text2:

<xsl:value-of select="$text1"/> <xsl:value-of select="$text2"/>

But after transformation the space is gone! If there was any space
character in text1 or text2, it's still there, but the space between
those two disappered. What am I doing wrong? I don't want my text to
stick together ..

The second this is a problem with entities. Whenever I use an entity
like "&copy" or "&nbsp;", java.xml.transform.Transformer tells me, that
this entity is unknown and refuses work until i remove the entity from
the HTML code. What's the problem here? How can I use HTML entities
without troubles?

Thanks for your help,

Angus
 

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

Members online

No members online now.

Forum statistics

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

Latest Threads

Top