XslCompiledTransform problem

  • Thread starter Thread starter Eric S
  • Start date Start date
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
 
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:output 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.
 
Thanks Martin.

Martin Honnen said:
If you use
<xsl:output 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.
 
Back
Top