modify to support multiple grammars, add fmpxmllayout grammar