-
I replaced:
if (ct.IsArrayItem())
{
...
}
with
if (false)
{
}
at line 405 of ConversionUtil to switch of the generation of arrays, this worked for me.
I am not too worried to much about array vs. collections (it's a personal preference). I'll see if I can ping over the schema later.
Cheers,
S.
2009-02-26 18:05:14 UTC in dingo
-
Hi Peter,
This is actually causing me more problems than purely cosmetic. When I through an XML file and the object model for de-serialization it doesn't load the data properly when the enclosing type is defined as an array. I really suprised others have not seen this, must be my unique schema!
S.
2009-02-26 17:16:52 UTC in dingo
-
I tried using XSD but concluded that I would need to do lots of work to get the object model looking how I wanted it, i.e. use collections instead of arrays (possible), automatic properties (CodeDom does not support this) etc. I am really interested in the extensibility points in Dingo hence my evaluation.
Stepping through the debugger it seems to be that the implementation of...
2009-02-25 23:00:01 UTC in dingo
-
Both xs:all and xs:sequence. Personally I think that:
<xs:element name="root" type="RootType"/>
<xs:complexType name="RootType">
--<xs:sequence>
----<xs:element name="children" type="ChildrenType" maxOccurs="unbounded"/>
--</xs:sequence>
</xs:complexType>
should generate
class root {...
2009-02-25 20:46:11 UTC in dingo
-
I can't really comment on the specification because I haven't spent much time examining it.
From the Dingo perspective would it be unquestionable to think about generating code that has a single object reference instead of an array if maxOccurs = 1? IMO, this provides a much cleaner object model that represents the intent of the schema design.
I am sure I am over simplyfying things here.
2009-02-25 20:11:07 UTC in dingo
-
Thanks for the heads up on xs:all, I seem to remember I used it so order of the elements was not enforced - I can change that. I assume you would suggest to use xs:sequence instead?
What seems a little strange is that ChildrenType is either a single object or array based on the multiplicity of ChildType elements contained within its definition. If ChildrenType is defined like this (note the...
2009-02-25 18:46:41 UTC in dingo
-
I thought that the default value for maxOccurs (and minOccurs) was 1. So in the schema there can only be 0 or 1 occurances of ChildrenType elements.
I assumed this is how XSD to optimizing? away the ChildrenType element completely.
2009-02-25 17:41:33 UTC in dingo
-
Hi Peter,
Thanks for your prompt responce. I understand that Dingo and XSD could potentially generate different output (and I am fine with that). I am trying to understand why the root class has an array of ChildrenType objects.
As far as I understand from the schema definition there can only be 0 or 1 ChildrenType objects therefore I would of expected a single ChildrenType object (that...
2009-02-25 17:17:50 UTC in dingo
-
Hi,
I am currently evaluating Dingo so please accept my apologies for the increase of traffic on this mailing list at the moment.
I am trying to understand a particular difference between the output from Dingo and XSD. I have a very simple test schema (pasted at the bottom). Using XSD I basically get a root class that contains an array of ChildType's object, i.e.
class root {...
2009-02-25 15:35:11 UTC in dingo
-
Many thanks, keep up the good work.
2009-02-24 15:12:13 UTC in dingo