Groups | Blog | Home
all groups > dotnet xml > june 2004 >

dotnet xml : xsd.exe errors with schemas importing other schemas


Mike
6/18/2004 11:19:10 AM
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





___
Dino Chiesa [Microsoft]
6/23/2004 1:23:44 AM
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


[quoted text, click to view]
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:
[quoted text, click to view]

AddThis Social Bookmark Button