English 中文(简体)
DSL Toolkit: How can I get correct elements written in this scenario?
原标题:

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

最佳回答

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.

问题回答

暂无回答




相关问题
Treetop: How to make combined rule?

I want to make a simple JSP parser by using Treetop. Now, I have the following problem: My basic grammar for starting is: grammar Jspgrammar rule jspToken <% end rule ...

Language neutral custom tool

I m working on a DSL tool, and for this tool, there exists a custom code generation tool that creates output files. Currently, this tool is registered with C# using a RegistrationAttribute on the ...

How should I construct a finance DSL?

I ve decided to build a database tracking the credit card offers I get in the mail, and one confounding factor has been how to represent the offers. With minimum finance charges and variable rates and ...

How do I build a domain-specific query language?

I have a biology database that I would like to query. There is also a given terminology bank I have access to that has formalizable predicates. I would like to build a query language for this DB using ...

Stop and continue while evaluation an expression tree

At the office, we ve applied simple Domain Specific Languages (DSLs) to several problem domains we encountered. Basically, we parse (lex/yacc) the custom script into an expression tree. Every node ...

Language to create flowcharts [closed]

This seems like something which must have been answered before, but I can t find anything appropriate in the question archives. Basically, I m looking for a little Domain Specific Language to create ...

热门标签