[xsd-users] File-per-type Code Generation
rakirtley at bellsouth.net
rakirtley at bellsouth.net
Thu Jul 17 08:49:25 EDT 2008
Boris,
First let me say that (IMHO as a new user) XSD is a terrific product, a great time-saver for anyone working with XML based apps and well positioned in the marketplace. In other words, I wish I'd thought of it.
I've encountered what appears to be a bad behavior with C++/Tree when using the file-per-type code generation option. I have a schema which includes a recursive relationship. When I do single file code generation, everything gets generated correctly. When I use the file-per-type option xsd consumes resources until it aborts. I did a work around where I change the recursive element to a simple type, generate code then modify the generated code manually to restore the correct relationship. Here is the schema snippet that causes the problem:
<xs:complexType name="FunctionType">
<xs:sequence>
<xs:choice>
<xs:element name="OperatorName" type="OperatorType" />
<xs:element name="ComputeName" type="NameType" />
</xs:choice>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="ValuePath" type="ValuePathType" />
<xs:element name="Function" type="FunctionType" />
</xs:choice>
</xs:sequence>
</xs:complexType>
Not a problem for me, but I figured I should at least report it.
Thanks,
Rance Kirtley
More information about the xsd-users
mailing list