Connecting Tech Pros Worldwide Help | Site Map

Space problem with .NET 2.0

  #1  
Old October 21st, 2008, 08:15 PM
Gaurav
Guest
 
Posts: n/a
I am loading an XML file and applying the XSLT using .net 2003 (C#). XSLT
will add Space character in the xml. I am using the entity value for space
character &#32. it works fine in .net 1.1 whereas in .net 2.0 the space
character is not showing up in the xml at all. Any idea why this works in
..NET 1.1 and not the .NET 2.0 parser?

However, if I use the entity (&#160) then it works well for both .net 1.1
and .net 2.0. Is this a known issue? Any suggestions on why the space is not
showing up with .NET 2.0 would be appreciated.


  #2  
Old October 22nd, 2008, 12:15 PM
Martin Honnen
Guest
 
Posts: n/a

re: Space problem with .NET 2.0


Gaurav wrote:
Quote:
I am loading an XML file and applying the XSLT using .net 2003 (C#). XSLT
will add Space character in the xml. I am using the entity value for space
character &#32. it works fine in .net 1.1 whereas in .net 2.0 the space
character is not showing up in the xml at all. Any idea why this works in
.NET 1.1 and not the .NET 2.0 parser?
>
However, if I use the entity (&#160) then it works well for both .net 1.1
and .net 2.0. Is this a known issue? Any suggestions on why the space is not
showing up with .NET 2.0 would be appreciated.
Can you show us the code i.e. a minimal but complete XML document, XSLT
stylesheet and the C# code that runs the transformation? Otherwise it is
very hard to tell what goes wrong.
As a first suggestion you might want to use
<xsl:text</xsl:text>
to output your space. That is the recommended way to avoid white space
isssues when outputting text with XSLT.



--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Space in table name problem with .NET scripting Oggdorf answers 6 November 22nd, 2005 03:47 PM
Space in table name problem with .NET scripting Oggdorf answers 0 November 22nd, 2005 03:46 PM
Space in table name problem with .NET scripting Oggdorf answers 3 July 21st, 2005 07:50 PM
problem with getting out of disk space error when viewing asp.net pages Jas Shultz answers 3 July 19th, 2005 09:55 AM