473,396 Members | 1,784 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,396 software developers and data experts.

Bizarre XSD File Format Changes with Web Developer?

I have a bizarre problem when I try to validate XML documents and their
schemas once they have been opened and transfered to a Visual Web Developer
2005 Express project. I receive validation errors for XML/XSDs that worked
fine when first created in another environment (XMLSpy trial).

I have a source XML document and an XSD file created wtih XMLSpy and stored
in a separate folder. When I run a very simple VBScript to validate the XML
with the XSD (in the process of a bulkload to SQL Server with
SQLXMLBulkload.4.0), there are no validation errors, and the load to the DB
works perfectly.

When I try to use the exact same VBScript to bulkload copies of the same
files from before, which were duplicated and added to a Visual Web Developer
project, I get validation errors like

"Schema: unable to load schema 'XXXX'. An error occurred (Text is not
allowed in the context of
element'{http://www.w3.org/2001/XMLSchema}sequence' according to DTD/Schema"

And then I get a validation error for a simple type like:

'DANNER' violates length constraint of ' 50'
The element 'LastName' with value 'DANNER' failed to parse.

with the source <LastName>Danner</LastNamefor the simple type below

<xs:simpleType name="VARCHAR_50">
<xs:restriction base="xs:string">
<xs:length value="50"/>
</xs:restriction>
</xs:simpleType>

So, it seems like the XSD file has been changed somehow and cannot be parsed
or is stricter???? Are there changes to the encoding or whitespace when an
XSD file is opened/transferred to Visual Web Developer 2005 Express?

Thanks for any help.


May 30 '07 #1
3 3567
"Don Miller" <no****@nospam.comwrote in message
news:u3**************@TK2MSFTNGP04.phx.gbl...
>I have a bizarre problem when I try to validate XML documents and their
schemas once they have been opened and transfered to a Visual Web Developer
2005 Express project. I receive validation errors for XML/XSDs that worked
fine when first created in another environment (XMLSpy trial).

I have a source XML document and an XSD file created wtih XMLSpy and
stored in a separate folder. When I run a very simple VBScript to validate
the XML with the XSD (in the process of a bulkload to SQL Server with
SQLXMLBulkload.4.0), there are no validation errors, and the load to the
DB works perfectly.

When I try to use the exact same VBScript to bulkload copies of the same
files from before, which were duplicated and added to a Visual Web
Developer project, I get validation errors like

"Schema: unable to load schema 'XXXX'. An error occurred (Text is not
allowed in the context of
element'{http://www.w3.org/2001/XMLSchema}sequence' according to
DTD/Schema"

And then I get a validation error for a simple type like:

'DANNER' violates length constraint of ' 50'
The element 'LastName' with value 'DANNER' failed to parse.

with the source <LastName>Danner</LastNamefor the simple type below

<xs:simpleType name="VARCHAR_50">
<xs:restriction base="xs:string">
<xs:length value="50"/>
</xs:restriction>
</xs:simpleType>

So, it seems like the XSD file has been changed somehow and cannot be
parsed or is stricter???? Are there changes to the encoding or whitespace
when an XSD file is opened/transferred to Visual Web Developer 2005
Express?
Have you tried to compare the original XSD vs. the one in Visual Web
Developer? In what way has it changed?
--
John Saunders [MVP]
May 30 '07 #2
Have you tried to compare the original XSD vs. the one in Visual Web
Developer? In what way has it changed?
They were identical. I opened the original in NotePad, selected and copied
the text, opened the copy in Visual Web Developer and pasted it in, saved
it, and now that part seems to work. I don't know why.

But when I try to validate my XML file before BulkLoading using a
ValidateFile function
(http://msdn2.microsoft.com/en-us/library/ms171806.aspx) from MS I still get
the

'DANNER' violates length constraint of ' 50'
The element 'LastName' with value 'DANNER' failed to parse.

for an element like this <LastName>DANNER</LastNamewhere the XSD uses a
derived type

<xs:simpleType name="VARCHAR_50">

<xs:restriction base="xs:string">

<xs:length value="50"/>

</xs:restriction>

</xs:simpleType>

<xs:element name="LastName" type="VARCHAR_50" sql:datatype="varchar"/>

This is probably an entirely separate problem, something to do with
MSXML2.XMLSchemaCache.6.0 and MSXML2.DOMDocument.6.0 objects and not because
of Web Developer. If I susbstitute type="xs:string" instead of VARCHAR_50 it
works but I lose my pre-load checking. But with this parse error, if I
ignore it and continue with the bulkload, the load still works! Any ideas???


"John Saunders [MVP]" <john.saunders at trizetto.comwrote in message
news:Op*************@TK2MSFTNGP06.phx.gbl...
"Don Miller" <no****@nospam.comwrote in message
news:u3**************@TK2MSFTNGP04.phx.gbl...
>>I have a bizarre problem when I try to validate XML documents and their
schemas once they have been opened and transfered to a Visual Web
Developer 2005 Express project. I receive validation errors for XML/XSDs
that worked fine when first created in another environment (XMLSpy trial).

I have a source XML document and an XSD file created wtih XMLSpy and
stored in a separate folder. When I run a very simple VBScript to
validate the XML with the XSD (in the process of a bulkload to SQL Server
with SQLXMLBulkload.4.0), there are no validation errors, and the load to
the DB works perfectly.

When I try to use the exact same VBScript to bulkload copies of the same
files from before, which were duplicated and added to a Visual Web
Developer project, I get validation errors like

"Schema: unable to load schema 'XXXX'. An error occurred (Text is not
allowed in the context of
element'{http://www.w3.org/2001/XMLSchema}sequence' according to
DTD/Schema"

And then I get a validation error for a simple type like:

'DANNER' violates length constraint of ' 50'
The element 'LastName' with value 'DANNER' failed to parse.

with the source <LastName>Danner</LastNamefor the simple type below

<xs:simpleType name="VARCHAR_50">
<xs:restriction base="xs:string">
<xs:length value="50"/>
</xs:restriction>
</xs:simpleType>

So, it seems like the XSD file has been changed somehow and cannot be
parsed or is stricter???? Are there changes to the encoding or whitespace
when an XSD file is opened/transferred to Visual Web Developer 2005
Express?

Have you tried to compare the original XSD vs. the one in Visual Web
Developer? In what way has it changed?
--
John Saunders [MVP]


May 30 '07 #3
Oops! Apparently <xs:length value="50"/means the element text MUST be 50
characters long. <xs:maxLength value="50"/does the trick.
"Don Miller" <no****@nospam.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
>Have you tried to compare the original XSD vs. the one in Visual Web
Developer? In what way has it changed?

They were identical. I opened the original in NotePad, selected and copied
the text, opened the copy in Visual Web Developer and pasted it in, saved
it, and now that part seems to work. I don't know why.

But when I try to validate my XML file before BulkLoading using a
ValidateFile function
(http://msdn2.microsoft.com/en-us/library/ms171806.aspx) from MS I still
get the

'DANNER' violates length constraint of ' 50'
The element 'LastName' with value 'DANNER' failed to parse.

for an element like this <LastName>DANNER</LastNamewhere the XSD uses a
derived type

<xs:simpleType name="VARCHAR_50">

<xs:restriction base="xs:string">

<xs:length value="50"/>

</xs:restriction>

</xs:simpleType>

<xs:element name="LastName" type="VARCHAR_50" sql:datatype="varchar"/>

This is probably an entirely separate problem, something to do with
MSXML2.XMLSchemaCache.6.0 and MSXML2.DOMDocument.6.0 objects and not
because of Web Developer. If I susbstitute type="xs:string" instead of
VARCHAR_50 it works but I lose my pre-load checking. But with this parse
error, if I ignore it and continue with the bulkload, the load still
works! Any ideas???


"John Saunders [MVP]" <john.saunders at trizetto.comwrote in message
news:Op*************@TK2MSFTNGP06.phx.gbl...
>"Don Miller" <no****@nospam.comwrote in message
news:u3**************@TK2MSFTNGP04.phx.gbl...
>>>I have a bizarre problem when I try to validate XML documents and their
schemas once they have been opened and transfered to a Visual Web
Developer 2005 Express project. I receive validation errors for XML/XSDs
that worked fine when first created in another environment (XMLSpy
trial).

I have a source XML document and an XSD file created wtih XMLSpy and
stored in a separate folder. When I run a very simple VBScript to
validate the XML with the XSD (in the process of a bulkload to SQL
Server with SQLXMLBulkload.4.0), there are no validation errors, and the
load to the DB works perfectly.

When I try to use the exact same VBScript to bulkload copies of the same
files from before, which were duplicated and added to a Visual Web
Developer project, I get validation errors like

"Schema: unable to load schema 'XXXX'. An error occurred (Text is not
allowed in the context of
element'{http://www.w3.org/2001/XMLSchema}sequence' according to
DTD/Schema"

And then I get a validation error for a simple type like:

'DANNER' violates length constraint of ' 50'
The element 'LastName' with value 'DANNER' failed to parse.

with the source <LastName>Danner</LastNamefor the simple type below

<xs:simpleType name="VARCHAR_50">
<xs:restriction base="xs:string">
<xs:length value="50"/>
</xs:restriction>
</xs:simpleType>

So, it seems like the XSD file has been changed somehow and cannot be
parsed or is stricter???? Are there changes to the encoding or
whitespace when an XSD file is opened/transferred to Visual Web
Developer 2005 Express?

Have you tried to compare the original XSD vs. the one in Visual Web
Developer? In what way has it changed?
--
John Saunders [MVP]



May 30 '07 #4

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

Similar topics

4
by: Alan Little | last post by:
This is very bizarre. Could someone else have a look at this? Maybe you can see something I'm overlooking. Go here: http://www.newsletters.forbes.com/enews/admin/deliver.php4 U: bugtest P:...
1
by: Ed Glunz | last post by:
I'm not quite sure where to post this, but I figured these two groups would be a good start. I had a very nasty surprise this morning (7/26/05). I had to do a system restore to a restore point...
3
by: tigrrgrr42 | last post by:
I am working(vb.net03and05) with word documents stored in a sql db and I am currently bringing them from a byte array into a temp file to pop into word and make word do its thing as a com object. ...
9
by: JimmyKoolPantz | last post by:
IDE: Visual Studio 2005 Language: VB.NET Fox Pro Driver Version: 9.0.0.3504 Problem: I currently have a problem altering a DBF file. I do not get any syntax errors when running the program. ...
3
by: forest demon | last post by:
for example, let's say I do something like, System.Diagnostics.Process.Start("notepad.exe","sample.txt"); if the user does a SaveAs (in notepad), how can i capture the path that the user...
3
by: Peter | last post by:
Hi! I am having some very strange behavior with my databound controls. It's taken a long time to isolate exactly what is provoking the problem, but I'm still leagues away from solving it. I...
8
by: =?Utf-8?B?TWFyaw==?= | last post by:
We've got a wierd failure happening on just one machine. One part of our product uses a 3rd party search implementation (dtSearch). DtSearch has a native core (dten600.dll), late-bound, and a...
0
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgRGVzYXJyb2xsbw==?= | last post by:
Hi misters, I have an app.config (UTF-8 format file). I create an application winforms for changes and save configuration programatically. When I save changes the format file changes to ANSI ...
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: 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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...

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.