Working on verbalization

jbriggs
2006-04-07
2013-05-28
  • jbriggs
    jbriggs
    2006-04-07

    Christian,
      You may only have the binary installer and that would be why you cannot see the VerbalizationGenerator.xml
      The source is also available for download. This is what Ken has. Once you have the VerbalizationGenerator.xml all that needs to be done is to add another language tag and include your own set of snippets. This is going to be abstracted later so all that you will need to do is make a snippet set in your own xml file and we can reference it to generate the desired output. Also we have not tested this beyond the current English implementation. Any feedback is great. PS - you must imbed the HTML in the CDATA sections for any of the output to work.

     
    • The ORMModel\ObjectModel\VerbalizationGenerator.xml file contains the default verbalization set, but the code generator simply picks one of those languages as the default. There is no support for multiple languages yet. We have done preliminary work in this area in the ORMModel\Verbalizer\ORMVerbalizationToolWindow.cs (search for the PassthroughVerbalizationSets class, it's conditionally compiled out).

      The long term goal is to write code to populate snippet sets from XML files that match the ORMModel\ObjectModel\VerbalizationGeneratorSnippets.xsd schema. This will enable any user to provide overrides for existing snippets and complete new snippet sets (in other languages, among other things). We're not far away on this, and may get it done before the next major release (look for a major release about every 4-6 weeks)

      The easiest approach for you to take now is to simply modify the existing en-US snippets in the VerbalizationGenerator.xml file. Alternately, you can copy this section and do your own, then change the en-US in VerbalizationGenerator.Sets.xslt to your language. You'll need to make sure you override all snippets or the rest of the generation will fail.

      The generated .cs code will rebuild automatically with the NUPlixLoader tool when you change the .xml file and deactivate the xml editor, save the file, or explicitly choose 'Run Custom Tool' (on the Solution Explorer context menu). However, changing the xslt does not regenerate.

      Any work you do here will not be lost, you'll simply be able to paste it into an external .xml file that we'll load through the options dialog.

      If you need instructions on getting the main project to build please post back (basically, you need to install the March VSSDK and everything will work fine on the main project. You need xmldiffpatch1.0 and nunit 2.2.7 to build the test solution, and a newer wix version to rebuild setup).

      Feel free to post back and ask other questions. Obviously, our approach on the verbalization is data driven, generated, and very flexible. We just haven't made the final step yet of dynamically loading external snippet sets. -Matt