Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old February 27th, 2006, 01:25 PM
adgnews@gmail.com
Guest
 
Posts: n/a
Default 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">

  #2  
Old March 8th, 2006, 04:35 PM
Zafar Abbas
Guest
 
Posts: n/a
Default Re: Xml space and ms-data interpretation different in VS2005

Could you share the code and XML/XSD data that you are using?

<adgnews@gmail.com> wrote in message
news:1141045866.369916.307070@z34g2000cwc.googlegr oups.com...[color=blue]
> 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">
>[/color]


  #3  
Old March 9th, 2006, 02:45 PM
adjo
Guest
 
Posts: n/a
Default Re: Xml space and ms-data interpretation different in VS2005

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>

  #4  
Old March 9th, 2006, 11:15 PM
Zafar Abbas
Guest
 
Posts: n/a
Default Re: Xml space and ms-data interpretation different in VS2005

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" <adgnews@gmail.com> wrote in message
news:1141915077.094305.123120@i40g2000cwc.googlegr oups.com...[color=blue]
> 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>
>[/color]


 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles