Urgent problem with System.Xml.Schema.XmlSchema

A set of xsd files has been working fine for us at this site, but now
it gives *intermittent* errors for someone at a different cite (who is
consuming the code we are producing).  Most of the time it works
fine.  Occasionally it gives an error in the schema compiler:


"System.Xml.Schema.XmlSchemaException: Wildcard '##other' allows
element 'Page', and causes the content model to become ambiguous. A
content model must be formed such that during validation of an element
information item sequence, the particle contained directly, indirectly
or implicitly therein with which to attempt to validate each item in
the sequence in turn can be uniquely determined without examining the
content or attributes of that item, and without any information about
the items in the remainder of the sequence.
   at
System.Xml.Schema.BaseProcessor.SendValidationEvent(XmlSchemaException
e, XmlSeverityType severity)
   at System.Xml.Schema.BaseProcessor.SendValidationEvent(String code,
String msg1, String msg2, XmlSchemaObject source)
   at
System.Xml.Schema.SchemaCollectionCompiler.CompileComplexContent(XmlSchemaComplexType
complexType)
   at
System.Xml.Schema.SchemaCollectionCompiler.CompileComplexType(XmlSchemaComplexType
complexType)
   at System.Xml.Schema.SchemaCollectionCompiler.Compile()
   at System.Xml.Schema.SchemaCollectionCompiler.Execute(XmlSchema
schema, SchemaInfo schemaInfo, Boolean compileContentModel)
   at System.Xml.Schema.XmlSchema.CompileSchema(XmlSchemaCollection
xsc, XmlResolver resolver, SchemaInfo schemaInfo, String ns,
ValidationEventHandler validationEventHandler, XmlNameTable nameTable,
Boolean CompileContentModel)
   at System.Xml.Schema.XmlSchemaCollection.Add(String ns, SchemaInfo
schemaInfo, XmlSchema schema, Boolean compile, XmlResolver resolver)
   at System.Xml.Schema.XmlSchemaCollection.Add(String ns, XmlRea""der
reader, XmlResolver resolver)
   at System.Xml.Schema.XmlSchemaCollection.Add(String ns, String uri)



A search on Google didn't find anything other than people debugging
actual errors in their schemas.  Please help ASAP.

0
11lrhap02 (5)
4/17/2007 8:28:18 PM
dotnet.xml 7266 articles. 0 followers. Follow

3 Replies
528 Views

Similar Articles

[PageSpeed] 47

"JMD" <11lrhap02@sneakemail.com> wrote in message 
news:1176841697.969978.177110@q75g2000hsh.googlegroups.com...
>A set of xsd files has been working fine for us at this site, but now
> it gives *intermittent* errors for someone at a different cite (who is
> consuming the code we are producing).  Most of the time it works
> fine.  Occasionally it gives an error in the schema compiler:
>
>
> "System.Xml.Schema.XmlSchemaException: Wildcard '##other' allows
> element 'Page', and causes the content model to become ambiguous. A
> content model must be formed such that during validation of an element
> information item sequence, the particle contained directly, indirectly
> or implicitly therein with which to attempt to validate each item in
> the sequence in turn can be uniquely determined without examining the
> content or attributes of that item, and without any information about
> the items in the remainder of the sequence.
>   at
> System.Xml.Schema.BaseProcessor.SendValidationEvent(XmlSchemaException
> e, XmlSeverityType severity)
>   at System.Xml.Schema.BaseProcessor.SendValidationEvent(String code,
> String msg1, String msg2, XmlSchemaObject source)
>   at
> System.Xml.Schema.SchemaCollectionCompiler.CompileComplexContent(XmlSchemaComplexType
> complexType)
>   at
> System.Xml.Schema.SchemaCollectionCompiler.CompileComplexType(XmlSchemaComplexType
> complexType)
>   at System.Xml.Schema.SchemaCollectionCompiler.Compile()
>   at System.Xml.Schema.SchemaCollectionCompiler.Execute(XmlSchema
> schema, SchemaInfo schemaInfo, Boolean compileContentModel)
>   at System.Xml.Schema.XmlSchema.CompileSchema(XmlSchemaCollection
> xsc, XmlResolver resolver, SchemaInfo schemaInfo, String ns,
> ValidationEventHandler validationEventHandler, XmlNameTable nameTable,
> Boolean CompileContentModel)
>   at System.Xml.Schema.XmlSchemaCollection.Add(String ns, SchemaInfo
> schemaInfo, XmlSchema schema, Boolean compile, XmlResolver resolver)
>   at System.Xml.Schema.XmlSchemaCollection.Add(String ns, XmlRea""der
> reader, XmlResolver resolver)
>   at System.Xml.Schema.XmlSchemaCollection.Add(String ns, String uri)
>
>
>
> A search on Google didn't find anything other than people debugging
> actual errors in their schemas.  Please help ASAP.


Actually, this sounds like an actual error in your schema, but perhaps one 
which is only occasionally detected by .NET.

I suggest you take a look at that portion of your schema and attempt to 
create ambiguous documents. If you succeed, then .NET is telling you the 
truth about your schema (though perhaps it should tell you all of the time, 
and not just sometimes).

Also, if it's dependent on the XML being validated, then perhaps you should 
try capturing the XML that .NET is complaining about.
-- 

John Saunders [MVP]


0
John
4/17/2007 9:09:40 PM
John Saunders [MVP] wrote:

> Actually, this sounds like an actual error in your schema, but perhaps one
> which is only occasionally detected by .NET.

I've also tried getting a second opinion on the schema validation.
There are no problems reported with xsdvalid, nor with Altova,
validating the same XML file against the schema.

> I suggest you take a look at that portion of your schema and attempt to
> create ambiguous documents. If you succeed, then .NET is telling you the
> truth about your schema (though perhaps it should tell you all of the time,
> and not just sometimes).

The error message does not make sense.  'Page' is a local element, one
of several children.  The ##other will only accept additional elements
that are in a different namespace, and there is no default namespace
specified in the document.  So an unqualified name is unambiguously
the defined child element.

> Also, if it's dependent on the XML being validated, then perhaps you should
> try capturing the XML that .NET is complaining about.

The same XML file will work most of the time and not work on
occasion.  The error trace indicates that the exception takes place
when adding the schema to the schemalist, which is done before the
actual XML file of interest is read.

0
11lrhap02 (5)
4/18/2007 2:27:01 PM
"JMD" <11lrhap02@sneakemail.com> wrote in message 
news:1176906421.773156.248410@n76g2000hsh.googlegroups.com...
>
> John Saunders [MVP] wrote:
>
>> Actually, this sounds like an actual error in your schema, but perhaps 
>> one
>> which is only occasionally detected by .NET.
>
> I've also tried getting a second opinion on the schema validation.
> There are no problems reported with xsdvalid, nor with Altova,
> validating the same XML file against the schema.
>
>> I suggest you take a look at that portion of your schema and attempt to
>> create ambiguous documents. If you succeed, then .NET is telling you the
>> truth about your schema (though perhaps it should tell you all of the 
>> time,
>> and not just sometimes).
>
> The error message does not make sense.  'Page' is a local element, one
> of several children.  The ##other will only accept additional elements
> that are in a different namespace, and there is no default namespace
> specified in the document.  So an unqualified name is unambiguously
> the defined child element.
>
>> Also, if it's dependent on the XML being validated, then perhaps you 
>> should
>> try capturing the XML that .NET is complaining about.
>
> The same XML file will work most of the time and not work on
> occasion.  The error trace indicates that the exception takes place
> when adding the schema to the schemalist, which is done before the
> actual XML file of interest is read.


Ok, sorry, I misread your post. I thought this was a validation problem. In 
fact, if you can reproduce it simply by adding the schema to the list, then 
this has nothing to do with validation.

Can you post details of a reproducer that just causes the error on loading 
the schema? I know it doesn't happen all the time, but could you create an 
example and run it repeatedly or something like that? Also, please post the 
code and the schema and include specifics of which Visual Studio version 
you're using, OS version, service packs, etc?
-- 
John Saunders [MVP]


0
John
4/18/2007 5:20:07 PM
Reply:

Similar Artilces:

Laptop problem
I encountered few times of a problem when I closed the lid but could not get the screen turn on. When I was travelling on a train working with my laptop, I need to close the lid when someone to get off the train. Then I opened the lid but the screen was turn off, the powere was still on. No matter I pressed the space bar, enter key, power button...etc, the screen was still dard. Any idea how do I get the screen back in this situation? Alan T wrote: > I encountered few times of a problem when I closed the lid but > could not get the screen turn on. > > Whe...

Problem using CPropertySheet over CFormView
Hi! I have three views in an MFC SDI application, split using CSplitterWnd. And in one of the views we have some edit controls and gird controls. In the same view, on selection of a menuitem, I create a modeless CPropertySheet with two pages and place it over the edit controls. Now on clicking the property sheet, I am getting the overlapped display of editcontrols in the view. How can I avoid this. Please help. Thanking you in anticipation. Best Regards! Babu PSM Babu wrote: > Hi! > > I have three views in an MFC SDI application, split using > CSplitterWnd. > And in one ...

Project 2007 after entering actual work saveas xml takes hours
We are using project 2007. I have written some vba code that reads a file and enters actual work data. After the process is complete, I want to save the project as an xml file. It took 4 hours to do the saveas. Obviously there is something wrong. If we do the saveas before the actual work is updated, it only takes about 6 minutes. What can I do to correct the slow xml conversion process? j_dixon was thinking very hard : > We are using project 2007. I have written some vba code that reads a file and > enters actual work data. After the process is complete, I want to save the > pr...

Urgent Urgent Urgent Urgent
I am posting this query in continuation to the query posted by Anna (we are colleagues). Our software license is as follows: RMS – Headquarter : a. HQs 5 Store Base Pack RMS Stores Operations : a. 5 Single Store b. 1-3 stations Could you please explain what this 1-3 stations license means? We have a merchandise shop where it is difficult to manage with one POS during the Formula One Race days. We need to have two POS in this shop but the inventory cannot be split into two as this will create a lot of confusion. Is it possible to connect the two POS to a single database so that ...

Address book problems #5
Hello; If I goto the address book, and click the drop down box to goto contacts, I have 2 "Contacts" listed there. If I click the first one, I recieve the following error: "The address list could not be displayed. The Contacts folder associated with this address could not be opened..." Does anyone know how to resolve this? I am running Windows XP SP1, and Office 2003 SP1. Thank You; Rob First thing I'd do, in Outlook, right click on the contacts icon (on the left) go to the addressbook tab, make sure, "use for default email address, or something li...

System Policy on Message Store
Hello, We have implemented a system policy to limit mailbox size to 250MB for users. This policy was originally applied to all message stores. However, it has become necessary to remove this policy from 1 of the stores. The policy was removed but any user who has a mailbox on this store (or any user's mailbox moved to this store) still behaves as if the policy were being applied. We have restarted the Information Store service but that did not resolve the issue. Any ideas/suggestions? Thanks in advance, TCF TCF <TCF@discussions.microsoft.com> wrote: >The policy was remo...

urgent: snap to connectionpoint does not work anymore
Hi, I'm using visio 2000 to draw an UML diagram. After adding several shapes suddenly when trying to add a dependency, binary association, or anything between two classes, the connector does not snap to the connectionpoints of the shapes to connect. I can not add an interface shape to a class neither. When opening another UML diagram (in a different file) it works fine. Thanks for the response. Serge Desmedt. ...

Font Problem
Why does my font change unexpectedly when the email is sent in Outlook 2002? I also have all recent service packs through SP3. I use HTML. I've tried the Mail Format tab options to change the fonts to always use my fonts and set everything to 10pt arial. It still arbitrarily changes its font size for no reason somtimes. Thanks ...

Problem with image links
Hi! I have some leaflets that I'm making with Publisher 2003. My main computer where my work folder is: C:\Documents and Settings\El Bimbo\My Documents\Leaflets This folder is also shared to network. I made my last leaflet with my notebook via network, so path to my leaflet-folder was: Z:\Leaflets I have almost 500 images in my leaflet and I have linked all the images to my work file - simply because it's much faster to work that way. All the images are same folder as my Publisher work file. Now when I open my work file with main computer from C:\Documents and Settings\El Bi...

URGENT
Hi everyone, I have to subtract a custom duration field from the start field to get an important information from my project. When I try do to that like: "[Start]-[Duration4]" the result is a totally confused date. How do I get this date? Best regards, Marco Ferreira Hello Marco, Try the expression ProjDateSub([Start],[Duration4]). Best Regards, Ismet Kocaman MCTS, PMP "Marco" wrote: > Hi everyone, > > I have to subtract a custom duration field from the start field to get > an important information from my project. > When I ...

Copy And Paste problem ?
Hello, Using Excel 2007. Sure it's something I am doing wrong, but can't seem to figure out what. I do a Copy on two selected columns. The dashed outline shows up fine. But when I try to do a Paste to two other blank columns, as soon as I click on them, the dashed outline disappears, and there is (therefore) no Paste option. The column is about 500 rows long. What is really funny is that if I do a Copy of only 5 rows, e.g., it sometimes (but not all the time) will do the Paste. I have everything formatgted as "General" I have Protection in everything un-checked. Any ...

Calculating age problem
Greeting, I am trying to calculate the date different between two date with format ddmmyy to show the age and I am using the following function in unbounded textbox: =DateDiff("yyyy", [Birthdate], Now())+ Int( Format(now(), "mmdd") < Format( [Birthdate], "mmdd") ) When I put the above code in the sources control of the text box , there is a syntax error Can any body help me please? Since we're not there, it might help to know what the error message says ... "there is a syntax error" can cover a lot of issues... (By the way, your expres...

C# DateTime -> XML DateTime
Is there a method available to convert a C# DateTime format to XML DateTime format? Thanks, Guy Have you looked at the XmlConvert class? --Dare -- This posting is provided "AS IS" with no warranties, and confers no rights. "Guy Dillen" <guy_dillen@hotmail.com> wrote in message news:3f5f632e$0$13863$ba620e4c@reader0.news.skynet.be... > Is there a method available to convert a C# DateTime format to XML DateTime > format? > > Thanks, > Guy > > yes i have looked at this lass, but does this also work in the direction C#->XML? "SQ...

Click on link problems #2
When I click on a url link in email---a box opens saying "Open Link Browser". And also a browser window. How do I get rid of the smaller link browser? Read your reply on your post of the 17th? -- Robert Sparnaaij [MVP-Outlook] www.howto-outlook.com Tips of the month: -What do the Outlook Icons Mean? -Create an Office 2003 CD slipstreamed with Service Pack 1 ----- "Robin" <robinhood2@juno.com> wrote in message news:atmnk0pgs4m272iunkegt0rvq4ssjqisig@4ax.com... > When I click on a url link in email---a box opens saying "Open Link > Browser". A...

need urgent help!!!!!!!!!!!!!!!!!
hi i wanted to be able to add or upload images from the form? i have a field called image which is a data type OLE Object, i right click on the field click on the insert object option on the menu an a bitmap image is linked having browsed for it and clicked on the link check box. i want to be able to add images from the form not go to the datasheet view? can you help me please!!!!!!!! also i wanted to have a button assigned to a text box in the form in which you input the image path( where the image is located) and a click of a button the image is displayed in the datatype OLE object f...

Resource Scheduling has problem???
We are trying to change user's Calendar Resource Scheduling settings in Outlook 2003 and we keep getting this error message: ' This folder cannot be opened because there is a configuration problem on the server. Contact your Microsoft Exchange Server administrator for assistance. ' I am trying to have Calendar automatically process meeting requirements, and see the free/busy information. We have Exchange 2003, Office 2003 and Windows XP. I have rebooted the server. Thanks in advance. ...

URGENT: How to pass callback func as parameter?
Hi, I have some generic (non MFC) class. CSomeClass { SayHello() { return "Hello"; } } I however wish to be able to OVERRIDE this function with a custom function in some other class like CMyMFCApp. This CMyMFCApp class is NOT subclassed from CSomeClass, so overriding that function can not be done the same way as overriding base class functions (simply redeclaring). I am assuming I must set a call back function: CMyMFCApp::Init() { CSomeClass sc; sc.SetCallback(CMyMFCApp::MyCallback); sc.SayHello(); } CMyMFCApp::MyCallBack { return "Wazzup?"; } Now, I unders...

Recalculating problem.
I created a spreadsheet in Excel 2003 to track fat, carb, and protein calories from various foods, then add them up. For a while, it would change the total at the bottom of each column automatically. Then it stopped. Each column now has to be recalculateds manually (by re-entering the formula) every time I enter new data. Also, when I copy the formula, the cell window shows the revised formula, but the total at the bottom is the absolute value of the cell I was copying from--in other words, suppose the formula for n36 is =sum(n1:n35) and the total is 235. If I copy it to column p, the f...

Deadlock problem on the 2005 Server
Hello, I have this transaction what I want to execute on the MSSQL Server 2005 database: DELETE ... FROM MyTable WHERE ... INSERT INTO MyTable (SELECT ...) If I send this command to the server as one request, I risk getting deadlock problems. For someone experiencing the same problem as I am, the errors I am getting are - Transaction (Process ID 87) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. - Transaction (Process ID 87) was deadlocked on lock | communication buffer resources with another proce...

... has encountered a problem and needs to close...
Whenever I try to close Outlook I get the message 'Microsoft Outlook has encontered a problem and needs to close'. I use Outlook 2002 - AppVer: 10.0.6626.0 What is logged to the Event Viewer regarding this crash? -- Roady [MVP] www.howto-outlook.com Tips of the month: -Setting Permissions on a Mailbox -Create an Office XP CD slipstreamed with Service Pack 3 ----- <anonymous@discussions.microsoft.com> wrote in message news:d06201c4399c$4329f0c0$a601280a@phx.gbl... > Whenever I try to close Outlook I get the > message 'Microsoft Outlook has encontered a problem an...

URGENT!!! Problem with row data being truncated in a copy worksheet sub #2
Dave, Thanks for responding. I tried this but I could not get it t work in conjunction with the entire module. It dies right afte copying and PasteSpecial Values It does not kill the temp file or loa the newly created sheet into an e-mail. Any Ideas -- Doctor ----------------------------------------------------------------------- DoctorV's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=514 View this thread: http://www.excelforum.com/showthread.php?threadid=26863 You may want to post your current procedure. DoctorV wrote: > > Dave, Thanks for respon...

Read Receipt Storage Location?
Hello, I have office XP Microsoft Outlook via Exchange Server. I was working offline in the offline personal folder and I clicked on a message and it asked "sending has asked for read receipt" I clicked Yes. However since I was working offline, obviously read receipt is not yet sent. however as soon as I go online it will go out ? I went to out box to see if the read receipt is stored there, but this is not the case?? I cannot find. Can someone please confirm me the location where the read receipt are stored temporarly until these goes out, next time someone goes online...

Outlook Auto Rule (URGENT)
I want setup rule in mailboxx. - When sending message , all the message will forward to another mailbox - After permently delete it this message. - This message only send to special mailbox. I am not sure setup in exchange sever or outlook itself. It need make sure all rule run on server without user open outlook. Thanks J you would be best to go to the Exchange Newsgroups as you have said you need a server side rule. -- Judy Gleeson Microsoft Most Valuable Professional Outlook www.acorntraining.com.au <111@it.com> wrote in message news:uDDkJA5uGHA.2148@TK2MSFTNGP02.phx.gbl.....

formatting xml
I have an xml document object with xml in it, how can I convert the xml to a string and format it so that it is is indented correctly. I've looked at XMLTextWriter and the Format property, but am confused as to how to get the data to a string and not to an output stream.. Also, if I have to write it to a file first, it seems to either convert all the < to their html quoted formats or encodes it using UTF7/8 etc. Only way I can get it out containing the <> etc is by using writeraw.. what am i missing ? Thanks Adrian Adrian Parker wrote: > I have an xml document ...

Contacts Problem #2
We have a user who's outlook crashes when he tries to reference contacts. What would cause this? When he attempts to scroll down the contacts list the program locks up and closes outlook. Our company is networked using Citrix servers, Server 2000, and Exchange 2000 on our exchange server. Any help would be appreciated. Thanks! ...