| Index: tools/json_schema_compiler/compiler.py | 
| diff --git a/tools/json_schema_compiler/compiler.py b/tools/json_schema_compiler/compiler.py | 
| index 38235e07f9c9833705f99c341b718ad1db3fdb11..ee33c2c2e2f3c0f2366f4d486dff1c854ef4dd34 100755 | 
| --- a/tools/json_schema_compiler/compiler.py | 
| +++ b/tools/json_schema_compiler/compiler.py | 
| @@ -53,13 +53,16 @@ def handle_single_schema(filename, dest_dir, root, root_namespace): | 
| # Load type dependencies into the model. | 
| # TODO(miket): do we need this in IDL? | 
| for referenced_schema in referenced_schemas: | 
| -      referenced_schema_path = os.path.join( | 
| -          os.path.dirname(schema), referenced_schema + '.json') | 
| -      referenced_api_defs = json_schema.Load(referenced_schema_path) | 
| - | 
| -      for namespace in referenced_api_defs: | 
| -        api_model.AddNamespace(namespace, | 
| -            os.path.relpath(referenced_schema_path, opts.root)) | 
| +      parts = referenced_schema.split(':') | 
| +      api_name = parts[-1] | 
| +      if len(parts) == 1 or parts[0] == 'api': | 
| +        referenced_schema_path = os.path.join( | 
| +            os.path.dirname(schema), api_name + '.json') | 
| +        referenced_api_defs = json_schema.Load(referenced_schema_path) | 
| + | 
| +        for namespace in referenced_api_defs: | 
| +          api_model.AddNamespace(namespace, | 
| +              os.path.relpath(referenced_schema_path, opts.root)) | 
|  | 
| # Gets the relative path from opts.root to the schema to correctly determine | 
| # the include path. | 
|  |