Bug 148747 Design become invalid when I extend a masterpage from Library
The attachment contains a report file and a library file. Reproduce: 1. Deploy the library("lib"), and open the report. 2. Drag Masterpage("page1") from "lib" to report. 3. Reopen the report, it become invalid.
model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/writer/ModuleWriter.java
for ( int i = 0; i < list.size( ); i++ )
			{
				MapRule rule = (MapRule) list.get( i );
				writer.startElement( DesignSchemaConstants.STRUCTURE_TAG );
				property( rule, MapRule.TEST_EXPR_MEMBER );
				property( rule, MapRule.OPERATOR_MEMBER );
				property( rule, MapRule.VALUE1_MEMBER );
				property( rule, MapRule.VALUE2_MEMBER );
				resourceKey( rule, MapRule.DISPLAY_ID_MEMBER,
						MapRule.DISPLAY_MEMBER );
				writer.endElement( );
			}
			writer.endElement( );
		}
	}
	/**
	 * Writes the contents of a slot. The contents are enclosed in an optional
	 * list tag.
	 * 
	 * @param obj
	 *            the container element
	 * @param slot
	 *            the slot to write
	 * @param tag
	 *            the optional list tag that encloses the list of contents
	 */
	protected void writeContents( DesignElement obj, int slot, String tag )
	{
		List list = obj.getSlot( slot ).getContents( );
		if ( list.isEmpty( ) )