473,770 Members | 2,004 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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}seque nce' 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>Danne r</LastNamefor the simple type below

<xs:simpleTyp e name="VARCHAR_5 0">
<xs:restricti on 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 3586
"Don Miller" <no****@nospam. comwrote in message
news:u3******** ******@TK2MSFTN GP04.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}seque nce' 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>Danne r</LastNamefor the simple type below

<xs:simpleTyp e name="VARCHAR_5 0">
<xs:restricti on 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>DANNE R</LastNamewhere the XSD uses a
derived type

<xs:simpleTyp e name="VARCHAR_5 0">

<xs:restricti on base="xs:string ">

<xs:length value="50"/>

</xs:restriction>

</xs:simpleType>

<xs:element name="LastName" type="VARCHAR_5 0" sql:datatype="v archar"/>

This is probably an entirely separate problem, something to do with
MSXML2.XMLSchem aCache.6.0 and MSXML2.DOMDocum ent.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.saunder s at trizetto.comwro te in message
news:Op******** *****@TK2MSFTNG P06.phx.gbl...
"Don Miller" <no****@nospam. comwrote in message
news:u3******** ******@TK2MSFTN GP04.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'{htt p://www.w3.org/2001/XMLSchema}seque nce' 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>Danne r</LastNamefor the simple type below

<xs:simpleTy pe name="VARCHAR_5 0">
<xs:restricti on 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******** ********@TK2MSF TNGP02.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>DANNE R</LastNamewhere the XSD uses a
derived type

<xs:simpleTyp e name="VARCHAR_5 0">

<xs:restricti on base="xs:string ">

<xs:length value="50"/>

</xs:restriction>

</xs:simpleType>

<xs:element name="LastName" type="VARCHAR_5 0" sql:datatype="v archar"/>

This is probably an entirely separate problem, something to do with
MSXML2.XMLSchem aCache.6.0 and MSXML2.DOMDocum ent.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.saunder s at trizetto.comwro te in message
news:Op******** *****@TK2MSFTNG P06.phx.gbl...
>"Don Miller" <no****@nospam. comwrote in message
news:u3******* *******@TK2MSFT NGP04.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}seque nce' 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>Danne r</LastNamefor the simple type below

<xs:simpleTyp e name="VARCHAR_5 0">
<xs:restricti on 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
2170
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: test Enter 1 for "How many files in this delivery?" and select a file to upload, in one of the listed formats. Scroll down and click "Test Email".
1
1638
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 I made about a week ago. I had some VPN software that was screwing up my network, and even an uninstall didn't fix it. After doing the system restore, I noticed that every C# source file (*.cs)
3
4659
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. Is it possible to go straight from a byte array to document in word instead of a temp file? Also is there a way to change the save behaviour to notify my app to pickup a binary copy of the file or stream to save back to the sql db. Thanks in...
9
8392
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. However, after I alter the table and open microsoft excel to look at any changes; I get the following error: "This file is not in a recognizable format" If I do open the file in excel it looks like its not formatted.
3
4032
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 selects? thanks...
3
1886
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 have a DataView which filters a DataSet. Bound to this dataview is a ListBox, via its DataSource property. The DisplayMember is the name property of the row. Simple enough so far?
8
3137
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 managed wrapper (dtSearchNetApi2.dll). For reasons unknown our build and msi packaging process includes dtSearchNetApi2.dll but not dten600.dll in all packages, as well as a couple of assemblies that reference it, even though they are not used by...
0
1645
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 :( but I need format file UTF-8, and too when I open app.config and changed it, Visual Studio save it like UTF-8. Any suggestions or comments, please ? I need help about it
0
9454
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9906
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8933
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7456
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6710
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5354
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
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 we have to send another system
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.