ERROR := ε WS := U+0009 | U+000A | U+000D | U+0020 pseudoattr_name := ( ANYTHING - ( '=' | WS | EOF ) )* pseudoattr_value_double_quoted := ( ANYTHING - ( '<' | '"' | EOF ) | '<' ERROR )* pseudoattr_value_single_quoted := ( ANYTHING - ( '<' | ''' | EOF ) | '<' ERROR )* psuedoattrs := ( WS* pseudoattr )* WS* ( '=' ERROR | EOF ) pseudoattr := psuedoattr_name ( EOF ERROR | ( '=' | WS ) WS* ( ( ANYTHING - '=' ) ERROR | '=' WS* ( '"' pseudoattr_value_double_quoted ( EOF ERROR | '"' ) | ''' pseudoattr_value_single_quoted ( EOF ERROR | ''' ) | ( ANYTHING - ( '"' | ''' ) ERROR ) ) ) ) Match the data attribute against the pseudoattrs production. It will always match unless this spec is buggy (which it almost certainly is). For each pseudoattr production that was matched: If no ERROR terminal was matched in this production: Let name be the pseudoattr_name production that was matched. (There will always be one, unless this spec is buggy.) Let value be the pseudoattr_value_double_quoted production that was matched or, if it wasn't, then pseudoattr_value_single_quoted. (There will always be one of these, unless this spec is buggy.) If name is not already in the psuedo-attributes array: Append (name, value) to the psuedo-attributes array