>> >xsd.exe /?
>> Microsoft (R) Xml Schemas/DataTypes support utility
[quoted text clipped - 27 lines]
> missing element condition, along with the <include> XSD not being found
> period.
Thanks for the reply.
Here is the output in VisStudio 2005:
1>Error: There was an error processing
'..\..\..\WorkMIMB\WFS-T\schema\wfs\1.1.0\wfs.xsd'.
1> - Error generating code for DataSet ''.
1> - Unable to convert input xml file content to a DataSet. Type
'http://www.opengis.net/ows:ServiceType' is not declared, or is not a simple
type.
1> - Type 'http://www.opengis.net/ows:ServiceType' is not declared, or is
not a simple type.
wfs.xsd contains, before ows:ServiceType is referred to, this line:
<xsd:import namespace="http://www.opengis.net/ows"
schemaLocation="../../ows/1.0.0/owsAll.xsd"/>
owsAll.xsd contains
<include schemaLocation="owsGetCapabilities.xsd"/>
which contains
<simpleType name="ServiceType">
Here is a snippet of wfs.xsd:
<xsd:import namespace="http://www.opengis.net/ows"
schemaLocation="../../ows/1.0.0/owsAll.xsd"/>
<!-- ================================================================== -->
<!-- = BASE REQUEST TYPE = -->
<!-- ================================================================== -->
<xsd:complexType name="BaseRequestType" abstract="true">
It appears the error is occurring with BaseRequestType, yet ows:ServiceType
should be recognized at that point.
Thanks for any insight into what is going wrong...
(As I mentioned, XMLSpy says this is valid, as does LiquidXML.)
Mr. Arnold - 22 Dec 2007 00:51 GMT
> Thanks for any insight into what is going wrong...
I wish I could help you. I am in my own Hell with XSD(s) from a third party
vendor. I am kind of in the same boat you are in, for a week now. :) I
don't have problems with the XSD in making a dataset class or serialized
XML object class with the XSD.exe utility. My problem is deriving an ADO.Net
dataset with an .XSD., which is basically the same problem you're having.
Let's stay in touch here, because if I get a resolution from the 3rd party
vendor, I'll post it. I hope you will do the same.
Mr. Arnold - 25 Dec 2007 08:41 GMT
If you're out there, you might want to take a look at this. It got me around
my problem. I just build the XML myself, based on the XML files that were
provided to me and their XSD(s).
http://support.softartisans.com/kbview_675.aspx
The download code for *aaron1.xml* allowed me to just build the XML(s) on
the fly the way I needed them. My next task will be to use a MemoryStream
and not write out any files.
Schemer - 26 Dec 2007 14:05 GMT
> If you're out there, you might want to take a look at this. It got me
> around my problem. I just build the XML myself, based on the XML files
[quoted text clipped - 5 lines]
> the fly the way I needed them. My next task will be to use a MemoryStream
> and not write out any files.
Thanks for the information. I'll probably end up using XMLTextWriter.
I am still hoping to somehow generate classes to encapsulate the complexity
of the schema, and still don't have any more information on why xsd.exe
fails when other tools accept the schema as valid...
Mr. Arnold - 27 Dec 2007 00:29 GMT
>> If you're out there, you might want to take a look at this. It got me
>> around my problem. I just build the XML myself, based on the XML files
[quoted text clipped - 10 lines]
> complexity of the schema, and still don't have any more information on why
> xsd.exe fails when other tools accept the schema as valid...
If you are able to generate classes *not* a class based on a dataset, then
you'll find that is a nightmare in itself, because a class only represents a
single root element and all of its sub elements. You generate the XML
individually class by class, and then you have to come up with some way to
string it altogether into one XML. Even using a dataset too, you have to get
the XML into a acceptable format that can be used.
If this is some 3rd party vendor's schema, then you need to jump on
someone's a$$, like I have done and make them produce the classes which is
what I did today. The came back telling the XML's must be based of the
schemas or XML provided. So, I put it to them. If you want it that way, then
you come-up with the classes need and demonstrate it in a project and give
it to me, because I am tired of dealing with it and the deadline is coming
up fast.