{
if ( controls != null )
{
for ( int i = 0; i < controls.size(); i++ )
{
Control control = controls.get( i );
Element controlElement = element.addElement( "control" );
if ( control.getControlType() != null )
{
controlElement.addAttribute( "type", control.getControlType() );
}
if ( control.getCriticality() )
{
controlElement.addAttribute( "criticality", "true" );
}
Object value = control.getControlValue();
if ( value != null )
{
if ( ParserUtils.needsBase64Encoding( value ) )
{
Namespace xsdNamespace = new Namespace( ParserUtils.XSD, ParserUtils.XML_SCHEMA_URI );