Basically, if it was .NET, it would look like this:
ISomething { string A { get; } int B { get; } } var somethings = new List<ISomething>(); something.Add(new SomethingSomething()); something.Add(new AnotherSomething()); something.Add(new AnythingSomething());
Basically, I want the sequence of elements to be named as they want to be, as long as their complex type is an extension of the complex type that I define.
So it might look something like this:
<somethings> <something-something a="foo" b="0" /> <another-something a="bar" b="1" /> <example:anything-something a="baz" b="2" /> </somethings>
I am sure that this is possible, an alternative, I think, is a composition where I have a standard element that can contain one child, which at least is βsomethingβ.
Thanks in advance, xsd is not my forte.
Edit, ok, the closest thing I've found so far is basically:
<somethings> <something xsi:type="something-something" a="foo" b="0" /> <something xsi:type="another-something" a="bar" b="1" /> <something xsi:type="example:anything-something" a="baz" b="2" /> </somethings>
I think this is the only way to handle this? if so, then this is not so bad, and against intellisense, it seems to understand this well.
Thanks.
source share