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.SendValidationEven t(XmlSchemaException
e, XmlSeverityType severity)
at System.Xml.Schema.BaseProcessor.SendValidationEven t(String code,
String msg1, String msg2, XmlSchemaObject source)
at
System.Xml.Schema.SchemaCollectionCompiler.Compile ComplexContent(XmlSchemaComplexType
complexType)
at
System.Xml.Schema.SchemaCollectionCompiler.Compile ComplexType(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(XmlSchem aCollection
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. 3 4459
"JMD" <11*******@sneakemail.comwrote in message
news:11**********************@q75g2000hsh.googlegr oups.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.SendValidationEven t(XmlSchemaException
e, XmlSeverityType severity)
at System.Xml.Schema.BaseProcessor.SendValidationEven t(String code,
String msg1, String msg2, XmlSchemaObject source)
at
System.Xml.Schema.SchemaCollectionCompiler.Compile ComplexContent(XmlSchemaComplexType
complexType)
at
System.Xml.Schema.SchemaCollectionCompiler.Compile ComplexType(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(XmlSchem aCollection
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]
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.
"JMD" <11*******@sneakemail.comwrote in message
news:11**********************@n76g2000hsh.googlegr oups.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] This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Rob Mayo |
last post by:
I have a bunch of XSD files in my assembly as embedded content that are read out via reflection and streams. My app creates the XML on the fly, and I want to validate it using the schema files...
|
by: Rajesh Jain |
last post by:
I Have 2 separate schemas.
--------------Schema 1 is defined as below-----------
<xs:schema targetNamespace="http://Schemas/1" xmlns="http://Schemas/1" xmlns:xs="http://www.w3.org/2001/XMLSchema"...
|
by: Ceri Williams |
last post by:
I followed the excellent MSDN article "Code Generation in the .NET Framework
Using XML Schema" to build a substitute for the limited xsd.exe. My code
works fine under .NET framework 1.1, but after...
|
by: Mae |
last post by:
Dear All,
I have a problem here, I'm using C# Webform calling a webservices. The
webservices return me a XMLnode, using this XMLnode I want to convert it to
dataset so I can bind to the...
|
by: leslie_tighe |
last post by:
Hello,
I have webservice created with Axis 1.2.1 and that I am trying to
consuming in .NET (VB) using the Microsoft provided tools. While I am
able to consume methods on the service that return...
|
by: Stefan Christmann |
last post by:
I am validating XML-Documents with XML-schema-files and the
C#-standard-functions. I have one XSD-document which is syntactically 100%
correct after W3C-standard, but the schema compiler dies with...
|
by: louis_la_brocante |
last post by:
Dear all,
I am having trouble generating a client proxy for a webservice whose
methods return a "complex" type. The type is complex in that it is a
class whose members are a mix of primitive...
|
by: Angel \Java\ Lopez |
last post by:
Hi people!
I'm running a Visual Studio 2005, Professional, on Windows XP Professional.
I've found a little big problem, reading a DataSet. If I try:
ds.ReadXml("c:\data.xml")
it raises...
|
by: Ryan |
last post by:
Hello Xml Gurus,
I'm trying to build an XML schema in memory using the System.Xml.XmlSchema
namespace objects, validate it, and then write it to a file. The problem
I'm facing is that...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
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...
|
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
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
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...
|
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,...
|
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...
|
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,...
|
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...
| |