Quantcast
Channel: XML, System.Xml, MSXML and XmlLite forum
Viewing all articles
Browse latest Browse all 935

About XSD.EXE - resolving xs:import namespace="http://schemas.microsoft.com/ado/2006/04/codegeneration" schemaLocation="System.Data.Resources.CodeGenerationSchema.xsd" />

$
0
0

Hello Folks,

I was not able to find ready-to-use library for handling CSDL Schema v3.0 - need representation of collections, serialization and option to extend existing definition.

I new that one version, with some limitation and extentions, are present in EF6 (v6.2), but it's useless for me regards to the mix with EF6 specific. (By the way - why not implement clear CSDL v3.0 support? it just few ms longer to parse source)

Any way I do find a full schema definition for CSDL v3.0 - https://msdn.microsoft.com/en-us/library/hh879916.aspx - and try to use xsd.exe to generate classes. Version of csd.exe are  4.7.2046.30319

CSDL Schema v3.0 contain two imports: 

<xs:import namespace="http://schemas.microsoft.com/ado/2006/04/codegeneration" schemaLocation="System.Data.Resources.CodeGenerationSchema.xsd" /><xs:import namespace="http://schemas.microsoft.com/ado/2009/02/edm/annotation" schemaLocation="System.Data.Resources.AnnotationSchema.xsd" />

I do find referenced files and put them into same folder as main Schema file. Content look suitable for import.

It looks strange, but xsd.exe reports that elements from included files are missing. 

Again - it didn't report that files are missing, but report that are missing elements from the file.

I do take a look on the application code and find that all what xsd.exe doing for xs:import is clean up a SchemaLocation. 

Again - didn't do anything, just set SchemaLocation to null for each xs:import in the file.

This looks very strange for me.

But, Ok - there is an option to specify multiple xsd-files as source. I just didn't see how they will be sync with namespaces.

I try to specify all required files in the command line, but got an error regards to :

  - Group 'GExpression' from targetNamespace='http://schemas.microsoft.com/ado/2009/11/edm' has invalid definition: Circular group reference.

Main question is - is there an option to properly convert (any) xsd to set of the classes? 

Side question - Is it correct that xs:import are ignored in xsd.exe? 


Sincerely, Highly skilled coding monkey.


Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>