[Mono-dev] Mono XSD tool bug?

David Jung jungdl at ornl.gov
Tue Nov 1 11:10:41 EST 2005


Hello.
I appologise if this isn't the appropriate place, but I couldn't find 
and web-site, email list or bug
category specifically for the Mono XSD tool.

Perhaps I misunderstand how to use it, but I can't seem to get it to 
output anything
when passed a set of XSDs that depend on one another.
Specifically, I have a set of XSDs I'd like to generate class bindings 
for.  If I invoke xsd like this:

xsd *.xsd /c

I get this exception:
System.InvalidOperationException: Definition of type  not found
in <0x00187> System.Xml.Serialization.XmlSchemaImporter:FindBuiltInType 
(System.Xml.XmlQualifiedName qname)
in <0x000d2> System.Xml.Serialization.XmlSchemaImporter:FindBuiltInType 
(System.Xml.XmlQualifiedName qname, 
System.Xml.Schema.XmlSchemaSimpleType st)
in <0x004b1> 
System.Xml.Serialization.XmlSchemaImporter:ImportClassSimpleType 
(System.Xml.XmlQualifiedName typeQName, 
System.Xml.Schema.XmlSchemaSimpleType stype, System.Xml.XmlQualifiedName 
root)
in <0x0015a> System.Xml.Serialization.XmlSchemaImporter:ImportType 
(System.Xml.XmlQualifiedName name, System.Xml.Schema.XmlSchemaType 
stype, System.Xml.XmlQualifiedName root)
in <0x00134> System.Xml.Serialization.XmlSchemaImporter:ImportType 
(System.Xml.XmlQualifiedName name, System.Xml.XmlQualifiedName root, 
Boolean throwOnError)
in <0x000d7> System.Xml.Serialization.XmlSchemaImporter:GetTypeData 
(System.Xml.XmlQualifiedName typeQName, System.Xml.XmlQualifiedName root)
in <0x000bc> 
System.Xml.Serialization.XmlSchemaImporter:GetElementTypeData 
(System.Xml.XmlQualifiedName typeQName, 
System.Xml.Schema.XmlSchemaElement elem, System.Xml.XmlQualifiedName 
root, System.Xml.Serialization.XmlTypeMapping map)
in <0x000e5> 
System.Xml.Serialization.XmlSchemaImporter:ImportSequenceContent 
(System.Xml.XmlQualifiedName typeQName, 
System.Xml.Serialization.ClassMap cmap, 
System.Xml.Schema.XmlSchemaObjectCollection items, 
System.Xml.Serialization.CodeIdentifiers classIds, Boolean multiValue, 
System.Boolean isMixed)
in <0x00158> 
System.Xml.Serialization.XmlSchemaImporter:ImportParticleContent 
(System.Xml.XmlQualifiedName typeQName, 
System.Xml.Serialization.ClassMap cmap, 
System.Xml.Schema.XmlSchemaParticle particle, 
System.Xml.Serialization.CodeIdentifiers classIds, Boolean multiValue, 
System.Boolean isMixed)
in <0x0001f> 
System.Xml.Serialization.XmlSchemaImporter:ImportParticleComplexContent 
(System.Xml.XmlQualifiedName typeQName, 
System.Xml.Serialization.ClassMap cmap, 
System.Xml.Schema.XmlSchemaParticle particle, 
System.Xml.Serialization.CodeIdentifiers classIds, Boolean isMixed)
in <0x002ff> 
System.Xml.Serialization.XmlSchemaImporter:ImportComplexContent 
(System.Xml.XmlQualifiedName typeQName, 
System.Xml.Serialization.XmlTypeMapping map, 
System.Xml.Schema.XmlSchemaComplexContent content, 
System.Xml.Serialization.CodeIdentifiers classIds, Boolean isMixed)
in <0x0020c> System.Xml.Serialization.XmlSchemaImporter:BuildClassMap 
(System.Xml.Serialization.XmlTypeMapping map, 
System.Xml.XmlQualifiedName typeQName, 
System.Xml.Schema.XmlSchemaComplexType stype)
in <0x00062> System.Xml.Serialization.XmlSchemaImporter:BuildPendingMaps ()
in <0x00125> 
System.Xml.Serialization.XmlSchemaImporter:ImportTypeMapping 
(System.Xml.XmlQualifiedName name)
in <0x008e0> Mono.Util.Driver:GenerateClasses ()
in <0x00b04> Mono.Util.Driver:Run (System.String[] args)
in <0x00055> Mono.Util.Driver:Main (System.String[] args)


Unfortunately, there is no indication which type is thinks isn't there.  
The same XSDs have been bound using
Java tools sucessfully.
If I limit the invocation to a single top-level XSD, such as:
xsd SNSIf.xsd /c

I get the same result, even though all dependend XSDs are in the directory.
(Unfortunately, I can't provide the XSDs due to the nature of the project).

While it may be possible that there is something in the XSDs that the 
xsd tool can't handle, it would
be useful if it could report which type it things it can't find.
I'm not a mono developer, just a developer user.  However, if someone 
can point me to the CVS
directory where I might checkout, build and play with the XSD tool, I 
might have a crack at
further debugging, time permitting.

Thanks,
-David.




More information about the Mono-devel-list mailing list