Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: [xml-dev] Schema compile/validate problems in .NET 2.0

From: "Michael Kay" <mike@--------.--->
To: "'Marshall, Steven \(SKM\)'" <SMarshall@---.---.-->,<xml-dev@-----.---.--->
Date: 2/5/2008 12:05:00 PM
This set of schemas is almost certainly making assumptions 
about the behaviour of constructs that are deliberately or unintentionally 
underspecified in the Schema Rec, and where differences of behaviour between 
different processors are therefore legitimate.
 
Duplicate definitions: the spec explicitly says that it 
doesn't define how component identity is established, which means that whenever 
you include the same schema document into two other documents you run the risk 
that some processor is going to reject components as 
duplicates.
 
xs:redefine: this is a minefield for compatibility problems 
because the spec leaves so many cases undefined, for example circular redefines, 
two schema documents both redefining a third (in compatible or incompatible 
ways), and so on. If you want portability, xs:redefine is best 
avoided.
 
Hopefully we'll do something about this in XML Schema 1.1 - 
if you can identify more specifically the cause of the incompatibilities, this 
will help. In the meantime there's not much you can do other than testing under 
a variety of popular processors and tweaking the code until it 
works.
 
Michael Kay
http://www.saxonica.com/


  
  
  From: Marshall, Steven (SKM) 
  [mailto:SMarshall@s...] 
Sent: 05 February 2008 
  04:39
To: xml-dev@l...
Subject: [xml-dev] Schema 
  compile/validate problems in .NET 2.0


  
  Hello,
   
  We are developing 
  an application which is based on a complex set of XML schemas (several dozen 
  schemas in all).  The schemas themselves are based on the ISO19139 
  standard, with a few extensions and changes for our purposes.  Some of 
  the changes are done using xs:redefine.  The set of schemas validates 
  perfectly using oXygen version 8 and the Xerces engine.  The application 
  is developed using Visual Studio on the .NET 2.0 platform.  The problem 
  is, when I try to load the root schema into a .NET XMLSchemaSet object and 
  call the Compile method, it throws about 16 validation exceptions.  Some 
  describe duplicate definitions of elements or types, some complain about 
  invalid xs:redefine usage.  It has thrown us a bit that oXygen does not 
  report anything, but .NET will not accept these schemas.  Even if I try 
  to load the unmodified ISO19139 schema set, .NET reports 3 errors which again, 
  oXygen does not.
   
  Anybody know what 
  is going on here?  Is .NET more stringent in its validation than 
  oXygen?  Even if we ask oXygen to use the MSXML.NET engine to validate 
  them, we get different results.  It's difficult to post any of the schema 
  info, because there is a total of well over a megabyte of it.  
  Initially we'd just like to know if anyone has come up against this sort of 
  problem, and more important, has found a way through it.
   
  Thanks and 
  regards
  Steve 
  Marshall
   
SKM is committed to working with its 
  clients to deliver a sustainable future for all. Please consider the 
  environment before printing this e-mail.
Notice - This message contains 
  confidential information intended only for the exclusive use of the addressee 
  named above. No confidentiality is waived or lost by any mistaken transmission 
  to you. If you have received this message in error please delete the document 
  and notify us immediately. 
Any opinion, text, documentation or attachment 
  received is valid as at the date of issue only. The recipient is responsible 
  for reviewing the status of the transferred information and should advise us 
  immediately upon receipt of any discrepancy. 
All email sent to SKM will be 
  intercepted, screened and filtered by SKM or its approved Service 
  Providers.


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent