XslCompiledTransform problem

E

Eric S

Hi All,

How to handle the empty spaces or whitespaces using XslCompiledTransform?
When I use XslCompiledTransform , it takes the code <div id="div1"></div>
as <div id="div1" /> . When I use XslTransform instead, it takes the code
as it is ,that is <div id="div1"></div> . Is there any solution for me to
use XslCompiledTransform so that the output should be <div id="div1"></div>.

Thanks,

Eric
 
M

Martin Honnen

Eric said:
How to handle the empty spaces or whitespaces using
XslCompiledTransform? When I use XslCompiledTransform , it takes the
code <div id="div1"></div> as <div id="div1" /> . When I use
XslTransform instead, it takes the code as it is ,that is <div
id="div1"></div> . Is there any solution for me to use
XslCompiledTransform so that the output should be <div id="div1"></div>.

If you use
<xsl:blush:utput method="html"/>
in your stylesheet and create 'div' or other HTML elements in no
namespace then they are serialized according to HTML rules as
<div></div>

<div /> is an XML serialization that you could get for output
method="xml" respectively if you have 'div' elements in a certain namespace.
 
E

Eric S

Thanks Martin.

Martin Honnen said:
If you use
<xsl:blush:utput method="html"/>
in your stylesheet and create 'div' or other HTML elements in no namespace
then they are serialized according to HTML rules as
<div></div>

<div /> is an XML serialization that you could get for output method="xml"
respectively if you have 'div' elements in a certain namespace.
 

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

Top