# Importing compilation units

It is possible to import other QVTo compilation units for reuse. In the `import` statement, specify the fully qualified name of the unit to be imported, or its simple name if it resides in the same namespace. The fully qualified name is the path to the QVTo unit file (relative to the source container), separated by dots, and omitting the .qvto file extension.

There are two different reuse mechanisms: `access` and `extends`. If the reuse mechanism for an imported unit is not explicitly specified, the `extends` semantics are applied by default.

## Workspace imports

If the importing unit resides in a workspace QVTo project, fully qualified imports are resolved against the project's source container. You can set up the source container using the QVT Settings properties page of your project. If not specified explicitly, the project root is regarded as source container.

To import a unit from a different QVTo project, add that project to the list of referenced projects using the Project References properties page.

## Deployed imports

If the importing unit resides in a deployed plugin, fully qualified imports are resolved against the plugin's source container. Declare the source container using the org.eclipse.m2m.qvt.oml.runtime.qvtTransformationContainer extension point. If not specified explicitly, the plugin root is regarded as source container.

To import a unit from outside its deploying plugin, the unit must be registered using the org.eclipse.m2m.qvt.oml.runtime.qvtTransformation extension point.

## Standalone imports

In standalone mode, fully qualified imports are resolved against the Java classpath. To support standalone imports, make sure that the source container of your QVTo project is on the classpath.