473,395 Members | 1,742 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

xsd.exe errors with schemas importing other schemas

Hi,

I am working with XSD.exe vs.net command line util. I have an XSD that I am trying to use to generate classes with. However, the XSD references another schema and the XSD.exe is having trouble finding the referenced schema. Does anyone have an example of what the command line params would be so that the tool is aware of all schemas? Does the tool have trouble with the XSD lines:

xmlns:r="somewhere.files.referencedxsd"

<xs:import schemaLocation=".\referencedxsd.xsd" namespace="somewhere.files.referencedxsd" />

<xs:element ref="r:ReferencedRootNode"/>

The above lines are used for the reference to the referenced XSD, and the tool gives me the following error:

"Error: Error generating classes . . . The element somewhere.files.referencedxsd:ReferencedRootNode is missing"

Any ideas or help? Much appreciated.

Mike

___
Newsgroups brought to you courtesy of www.dotnetjohn.com
Nov 12 '05 #1
2 4882
the schemaLocation is a hint, according to W3C.
xsd.exe does not use this hint.

You have to pass in the xsd file on the command line of xsd.

eg,

xsd.exe myschema.xsd referencedSchema.xsd

-Dino
"Mike" <ms****@ioniasolutions.com> wrote in message
news:ex**************@TK2MSFTNGP09.phx.gbl...
Hi,

I am working with XSD.exe vs.net command line util. I have an XSD that I am trying to use to generate classes with. However, the XSD references
another schema and the XSD.exe is having trouble finding the referenced
schema. Does anyone have an example of what the command line params would be
so that the tool is aware of all schemas? Does the tool have trouble with
the XSD lines:
xmlns:r="somewhere.files.referencedxsd"

<xs:import schemaLocation=".\referencedxsd.xsd" namespace="somewhere.files.referencedxsd" />
<xs:element ref="r:ReferencedRootNode"/>

The above lines are used for the reference to the referenced XSD, and the tool gives me the following error:
"Error: Error generating classes . . . The element somewhere.files.referencedxsd:ReferencedRootNode is missing"
Any ideas or help? Much appreciated.

Mike

___
Newsgroups brought to you courtesy of www.dotnetjohn.com

Nov 12 '05 #2
the schemaLocation is a hint, according to W3C.
xsd.exe does not use this hint.

You have to pass in the xsd file on the command line of xsd.

eg,

xsd.exe myschema.xsd referencedSchema.xsd

-Dino
"Mike" <ms****@ioniasolutions.com> wrote in message
news:ex**************@TK2MSFTNGP09.phx.gbl...
Hi,

I am working with XSD.exe vs.net command line util. I have an XSD that I am trying to use to generate classes with. However, the XSD references
another schema and the XSD.exe is having trouble finding the referenced
schema. Does anyone have an example of what the command line params would be
so that the tool is aware of all schemas? Does the tool have trouble with
the XSD lines:
xmlns:r="somewhere.files.referencedxsd"

<xs:import schemaLocation=".\referencedxsd.xsd" namespace="somewhere.files.referencedxsd" />
<xs:element ref="r:ReferencedRootNode"/>

The above lines are used for the reference to the referenced XSD, and the tool gives me the following error:
"Error: Error generating classes . . . The element somewhere.files.referencedxsd:ReferencedRootNode is missing"
Any ideas or help? Much appreciated.

Mike

___
Newsgroups brought to you courtesy of www.dotnetjohn.com

Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: kyancy | last post by:
Hello All. We have several XML schemas to describe common component document parts. We then create new XML schemas as necessary that use "xsd:import schemaLocation=whateverLocation.." to include...
1
by: Steve George | last post by:
Hi, I have a scenario where I have a master schema that defines a number of complex and simple types. I then have a number of other schemas (with different namespaces) where I would like to reuse...
0
by: Mike | last post by:
Hi, I am working with XSD.exe vs.net command line util. I have an XSD that I am trying to use to generate classes with. However, the XSD references another schema and the XSD.exe is having trouble...
3
by: rehveli | last post by:
Isn't it possible to generate .cs files from schemas, where one schema imports another, and both have the same namespace? If a.xsd and b.xsd have namespace "MyNameSpace", and in b.xsd I do...
2
by: Chris | last post by:
Hi, I seem to be having some problems connecting to webservices. I'm running a C# client connected to a Java webservice using GLUE. The difference between the two request and response pairs...
0
by: vihrao | last post by:
I am designing wsdl that uses multiple schemas. I can do this in two ways: 1) use multiple schema imports in one wsdl or 2) use multiple schema imports in to one common schema and then import a...
2
by: Darrell Plank | last post by:
I'm a real XML novice, but my ultimate goal here is to get a workable schema for the GEDCOM XML format as spec'ed out here: http://www.familysearch.org/GEDCOM/GedXML60.pdf It's a proposed XML...
1
by: John Dalberg | last post by:
I converted a working web site project to a web application project and I am getting a bunch of warnings and compile errors. All code using .NET's profile class is giving an error. example...
14
by: Doug | last post by:
Hi, I am trying to use a validation method against this xml and keep getting 'The 'name' attribute is not declared' and I can't figure out why. Here is my XML: <XmlCommand...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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...
0
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
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
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,...
0
Oralloy
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,...
0
jinu1996
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.