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="UserType"><annotation><documentation>This type is deprecated. woml:AuthorityType should be used instead for identifying forecast approval authorities</documentation></annotation><complexContent><extension base="gml:AbstractGMLType"><sequence><element name="userId" minOccurs="1" maxOccurs="1"><complexType><simpleContent><extension base="womlcore:shortStringType"><attribute name="scheme" type="anyURI" use="required"/></extension></simpleContent></complexType></element><element name="role" minOccurs="0" maxOccurs="1"><complexType><simpleContent><extension base="womlcore:shortStringType"><attribute name="scheme" type="anyURI" use="required"/></extension></simpleContent></complexType></element><element name="firstName" type="womlcore:shortStringType" minOccurs="0" maxOccurs="1"/><element name="middleName" type="womlcore:shortStringType" minOccurs="0" maxOccurs="1"/><element name="lastName" type="womlcore:shortStringType" minOccurs="0" maxOccurs="1"/></sequence></extension></complexContent></complexType>