473,473 Members | 1,583 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Space problem with .NET 2.0

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.
Oct 21 '08 #1
1 1380
Gaurav wrote:
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/
Oct 22 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: Christian Seberino | last post by:
Linux kernel style guide, Guido's C style guide and (I believe) old K&R style recommends 8 SPACES for indent. I finally got convinced of wisdom of 8 space indentation. Guido also likes 8 space...
2
by: Malcolm Dew-Jones | last post by:
Hello What is the correct way to associate the attributes with the tag if the tag has a name space associated with it and the attribute doesn't have a name space? i.e. <mytag
2
by: Malcolm Dew-Jones | last post by:
I am looking at xslt 1.0 and trying to understand if empty text nodes are supposed to be stripped or not as the default behaviour. 3.4 starts by listing rules for when white space is not stripped...
11
by: kenneth | last post by:
I just ran across this. #1 <DBColumn> 1 </DBColumn> #2 <DBColumn> </DBColumn> The data for #1 will be parsed and returned as " 1 ". I get a sequence of...
10
by: Bing Wu | last post by:
Hi Folks, I have a problem while creating a big table space. It reports error: SQL1139N The total size of the table space is too big Explanation: The size of the current table space is too...
5
by: Yasaswi Pulavarti | last post by:
does a command like, db2 drop table tabschema.tabname when run from the Aix prompt reclaim the disk space? Are there any other options? How can we make sure the disk space is reclaimed? Thanks,...
3
by: Zheng Da | last post by:
Program received signal SIGSEGV, Segmentation fault. 0x40093343 in _int_malloc () from /lib/tls/libc.so.6 (gdb) bt #0 0x40093343 in _int_malloc () from /lib/tls/libc.so.6 #1 0x40094c54 in malloc...
1
by: robert | last post by:
I have an xmldocument and need to set the preservewhitespace to true as after processing the document I want to write out the xml (using outerxml/innerxml) and have the identations preserved for...
8
by: Joe Cool | last post by:
I need to map several columns of data from one database to another where the data contains multiple spaces (once occurance of a variable number or spaces) that I need to replace with a single...
10
by: Phil Stanton | last post by:
I have a table of SpaceAreas eg Food Store, Garden Shed etc with the first and last bin for each Space Area defined. eg Food Store First Space 1, last space 26 and Gargen Shed First space 1, last...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.