Bug 213680 [2.2.2]Chart script can not be cleaned completely.
Description: Reset script or delete all script does not work. build version: v20071221-0630 steps to reproduce: 1. New a report. 2. New a chart. 3. Enter some script for the chart and save the report. 4. Click the reset scirpt button or delete all script. 5. Save the report and switch to layout,then switch back to script page. Expected result: Script are cleaned. Actual result: Script are not cleaned. Note: If you delete part of the script, it works.
model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/writer/ModuleWriter.java
/**
	 * Writes the structure list of the give property definition for given
	 * structure.
	 * 
	 * @param obj
	 *            the structure to write
	 * @param memberName
	 *            the name of the structure list property to write
	 */
	private void writeStructureList( IStructure obj, String memberName )
	{
		PropertyDefn prop = (PropertyDefn) obj.getDefn( )
				.getMember( memberName );
		assert prop != null;
		assert prop.getTypeCode( ) == IPropertyType.STRUCT_TYPE
				&& prop.isList( );
		assert obj instanceof Structure;
		List list = (List) ( (Structure) obj ).getLocalProperty( getModule( ),
				prop );
		if ( list == null || list.size( ) == 0 )
			return;
		writer.startElement( DesignSchemaConstants.LIST_PROPERTY_TAG );
		writer.attribute( DesignSchemaConstants.NAME_ATTRIB, memberName );
		Iterator iter = list.iterator( );
		while ( iter.hasNext( ) )
		{
			IStructure struct = (IStructure) iter.next( );
			writer.startElement( DesignSchemaConstants.STRUCTURE_TAG );
			Iterator memberIter = prop.getStructDefn( ).propertiesIterator( );
			while ( memberIter.hasNext( ) )