An XCL expression grammar template is referenced within the code like a ResourceBundle: the code specifies the template as if it were a class name, and XCL searches in the CLASSPATH for the corresponding .ser or .xml file, looking for any localized variants that are present.

XCL looks for .ser files before .xml files, and it also performs a most-specific-locale-first search. For example, in the US English locale, if the code is looking for a template named atg.ui.expreditor.targeting.query-grammar, the following files will be searched for in this order:

Unlike for a ResourceBundle, here there is no attempt to combine files. The first file found by the above search logic will be used in its entirety, and any other matching files will be ignored.