Allow for conditional template output based on conditions specified in 
cartridge.xml
------------------------------------------------------------------------------------

         Key: CORE-100
         URL: http://jira.andromda.org/browse/CORE-100
     Project: AndroMDA Core
        Type: Improvement
    Versions: 3.2 RC2    
    Reporter: Joel Kozikowski
 Assigned to: Chad Brandon 
    Priority: Minor


Currently, a template's output can be suppressed by wrapping an #if statement 
around the entire template contents, and setting the <template> attribute 
outputOnEmptyElements to false. This requires a developer to examine the 
contents of the template file for conditions of output (if any). Specifying 
this in the <template> definiiton instead allows for easier enhancements to the 
cartridge (only the cartridge.xml needs to be modified, not the template), as 
well as offers a single place for a developer to look at when trying to 
determine when a template will or will not be output.  A <modelElement> can 
contain a <property> that must match a metafacade's property before output will 
take place. That handles the specific case of a basing output on the property 
of a metafacade, but does not handle the more general case of basing the output 
on a generic property (such as a namespace property). Ideally, there would be a 
new <outputConditions> element that could contain conditions that must be met 
before the template would be output (e.g. only output template if namespace 
property X equals value "Y").




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click

Reply via email to