[XML][XSLT] Embeded HTML...

  • Thread starter =?ISO-8859-1?Q?St=E9phane_Toussaint?=
  • Start date
?

=?ISO-8859-1?Q?St=E9phane_Toussaint?=

Hi,

I'm always in trouble when trying to render this :

<doc>
<author>myself</author>
<subject>foo</subject>
<body><h1>Hello,</h1><p>bla <b>bar</b></p></body>
</doc>

I want to convert this XML doc in an HTML page by using XSLT.
The problem is about how to render the body node.

Because I want the body to be display as it is, i'm trying to do this by
this way :

<xsl:copy-of select="body"/>

But the problem is that spaces between nodes are not displayed. As a
result :

Hello,
bla*bar*

And not :
Hello,
bla *bar*

I'm trying to do all this in Java with the dom4j lib.

Thank you.

Steph
 
P

Peter Flynn

Stéphane Toussaint said:
Hi,

I'm always in trouble when trying to render this :

<doc>
<author>myself</author>
<subject>foo</subject>
<body><h1>Hello,</h1><p>bla <b>bar</b></p></body>
</doc>

I want to convert this XML doc in an HTML page by using XSLT.
The problem is about how to render the body node.

Because I want the body to be display as it is, i'm trying to do this by
this way :

<xsl:copy-of select="body"/>

But the problem is that spaces between nodes are not displayed. As a
result :

Hello,
bla*bar*

And not :
Hello,
bla *bar*

Saxon produces:

<body>
<h1>Hello,</h1>
<p>bla <b>bar</b></p>
I'm trying to do all this in Java with the dom4j lib.

I think your software is broken.

///Peter
 

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,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top