The attribute gml:id supports provision of a handle for the XML element representing a GML Object. Its use is mandatory for all GML objects. It is of XML type ID, so is constrained to be unique in the XML document within which it occurs.
Source
<complexType name="SevereWeatherForecastType"><annotation><documentation>Main container for severe weather warning objects for one warningType, one warningContext, for specified target region and time span.</documentation></annotation><complexContent><extension base="womlcore:WeatherForecastType"><sequence><element name="warningType" type="gml:CodeType"/><element name="warningContext" type="gml:CodeType" minOccurs="0" maxOccurs="1"/><element name="audience" type="gml:CodeType" minOccurs="0" maxOccurs="unbounded"/></sequence></extension></complexContent></complexType>