Using Library Modules
How to Create an XQuery Main/Library Module discusses the process of creating a library module file. To use a library module, you can import the library module into the main module. This makes all the library module functions available in the main module.