views:

71

answers:

1

Info: C# , VS2010 Beta 2 , DSL ToolKit Beta 2

I am trying to create the following generated XML in my DSL Diagram when used

<Method>
...
    <FilterDescriptors>
         <FilterDescriptor Type="Comparison" Name="EmployeeKey" />
    </FilterDescriptors>
...
</Method>

This is how the Method and Filter Descriptor Domain Classes look

Domain Classes

I believe I have set the multiplicity correct:

Method should only have 1 Filter Descriptor

A Filter Descriptor can have many Filter Descriptors i.e

<FilterDescriptors>
     <FilterDescriptor Type="Comparison" Name="EmployeeKey"    />
     <FilterDescriptor Type="Wildcard" Name="EmployeeName"    />
</FilterDescriptors>

The issue is that the output XML is like this:

<FilterDescriptors>
    <FilterDescriptor>
      <FilterDescriptors>
        <FilterDescriptor Type="Comparison" Name="EmployeeKey" />
      </FilterDescriptors>
    </FilterDescriptor>
  </FilterDescriptors>

We have this same pattern is several locations in our DSL Diagram and was hoping there is a something simple to resolve this rather than overriding the ReadElements and WriteElements of each domain class

A: 

Have you posted this in the DSL Tools forum at http://social.msdn.microsoft.com/Forums/en-US/dslvsarchx/threads? I don't see a thread there for it.

Esther Fan - MSFT
Hi Ester, I posted the question here: http://social.msdn.microsoft.com/Forums/en-US/dslvsarchx/thread/2c8e636a-3d92-4ed0-81de-e9df83875e3a
Phill Duffy
Did Duncan answer your question, or do you need the post reactivated?
Esther Fan - MSFT
We are using the custom serializer, it does fix the issue. I would love to see a simpler solution but at the moment a custom serializer does fix.
Phill Duffy