473,394 Members | 1,812 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Xml space and ms-data interpretation different in VS2005

I have a problem converting a program from Vb.net VS2003 to VS2005. I
process a xml-file with an inline schema. In 2003 no problem. In 2005 I
have 2 problems:

1) BIG space="preserve" problem.
Suddenly the spaces are a problem during processing (The following text
is not allowed in this context: ' '). Without the space="preserve" (or
default) it works okay, but what to do now since I can't influence the
dataformat.

2) SMALLER xml-msdata/IsDataSet problem.
As long as there is a reference to the xml-msdata namespace in the file
the VS2005 designers can't correctly display the data in the xml-file.
Saw that the designer tools have changed, but I expect a previously
correct file should produce te same output as in VS2003. Now I only get
an empty row with 5 columns that should have data about present
relationships (file has nog relations but is as simple as 123).

The lines in the file that produce the strange behaviour are right at
the start:
<?xml version = "1.0" encoding="UTF-8" standalone="yes"?>
<VFPData xml:space="preserve">
<xsd:schema id="VFPData" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="VFPData" msdata:IsDataSet="true">

Feb 27 '06 #1
3 1697
Could you share the code and XML/XSD data that you are using?

<ad*****@gmail.com> wrote in message
news:11**********************@z34g2000cwc.googlegr oups.com...
I have a problem converting a program from Vb.net VS2003 to VS2005. I
process a xml-file with an inline schema. In 2003 no problem. In 2005 I
have 2 problems:

1) BIG space="preserve" problem.
Suddenly the spaces are a problem during processing (The following text
is not allowed in this context: ' '). Without the space="preserve" (or
default) it works okay, but what to do now since I can't influence the
dataformat.

2) SMALLER xml-msdata/IsDataSet problem.
As long as there is a reference to the xml-msdata namespace in the file
the VS2005 designers can't correctly display the data in the xml-file.
Saw that the designer tools have changed, but I expect a previously
correct file should produce te same output as in VS2003. Now I only get
an empty row with 5 columns that should have data about present
relationships (file has nog relations but is as simple as 123).

The lines in the file that produce the strange behaviour are right at
the start:
<?xml version = "1.0" encoding="UTF-8" standalone="yes"?>
<VFPData xml:space="preserve">
<xsd:schema id="VFPData" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="VFPData" msdata:IsDataSet="true">

Mar 8 '06 #2
Simple version here. 'View datagrid' in VS2005 gives error that xmldoc
is wellformed but contains structure the dataview cannot display. The
text ' ' is not allowed. Change the word "preserve" in line 2 in
"default" and the problem is gone.

<?xml version="1.0" encoding="utf-8" ?>
<VFPData xml:space="preserve">
<xsd:schema id="VFPData" xmlns:xsd="http://www.w3.org/2001/XMLSchema" >
<xsd:element name="VFPData" >
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="exp_results">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="id1" type="xsd:int" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<exp_results>
<id1>1</id1>
</exp_results>
</VFPData>

Mar 9 '06 #3
That's because xml:space="preserve" makes all whitespaces in the document
tobe treated as significant.whitespaces. Since the content model you define
for type VFPData is ElementOnly, you can not be significant whitespaces in
there. If you want to validate whitespaces (and text) within the content of
your type, then you should put mixed="true" attribyte on the <complexType>
tag.

"adjo" <ad*****@gmail.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
Simple version here. 'View datagrid' in VS2005 gives error that xmldoc
is wellformed but contains structure the dataview cannot display. The
text ' ' is not allowed. Change the word "preserve" in line 2 in
"default" and the problem is gone.

<?xml version="1.0" encoding="utf-8" ?>
<VFPData xml:space="preserve">
<xsd:schema id="VFPData" xmlns:xsd="http://www.w3.org/2001/XMLSchema" >
<xsd:element name="VFPData" >
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="exp_results">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="id1" type="xsd:int" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<exp_results>
<id1>1</id1>
</exp_results>
</VFPData>

Mar 9 '06 #4

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...
7
by: Ansti | last post by:
I have a huge table in it own tablespace (250 GB). I just deleted more than half of the columns in that table, but I didn't see any change in allocated space. I did DBCC CLEANTABLE and DBCC...
28
by: Andreas Prilop | last post by:
Jukka reports on http://www.cs.tut.fi/~jkorpela/chars/spaces.html that Internet Explorer 6 fails on the "zero width space" U+200B ​ Is this observation still valid? For which versions of MS...
1
by: wolftor | last post by:
I am writing some strings to MS Word. When I use the str function to convert the street number to a text string, I believe it adds a space in front for +/-. I don't want a space at the start of...
11
by: PC Datasheet | last post by:
How do I get the Len function to count a space at the end of a string? For example, if I enter AB(space), how do I get Len to return 3 instead of 2? Thanks, Steve
1
by: John Richardson | last post by:
I'm trying to override the SHIFT-SPACE "negative feature" in the Winforms datagrid, to only be a space. The following link describes this:...
3
by: bradjensmith | last post by:
I am importing a pipe delimited text file into MS Access 2002. The text file contains | | aka |space| The resulting table when imported converts the space to a null value. Any suggestions on...
12
by: JA | last post by:
Is there a way to remove all the white space in the fields? I have been using Find-and-replace - looking for 2 or 3 or 4 or 10 spaces and replacing them with none. I don't want to replace single...
1
by: seahorse298 | last post by:
I am using MS Access 2000 on a Windows XP machine. I have a list form, listing the number of companies a business is dealing with. I have a filter field on the form which is used to filter the...
6
BeemerBiker
by: BeemerBiker | last post by:
Using VS2008 "Command and Parameter Editor" with MS SQL I have the fieldname "Complete By" and cannot handle it with that space stuck in it. The following "UPDATE" works fine but I took out the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...

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.