XQST0036

When you import a module, any type names that are used in variable names or function signatures of the imported module must be in the in-scope schema definitions of the main module. For example, suppose strings.xq contains the variable declaration:

declare variable $strings:LetterA as strings:smallString := "A";

where smallString is a user-defined type defined in stringtypes.xsd. If a main module uses the LetterA variable, it must import the stringtypes.xsd schema in addition to the strings.xq module. If the main module does not make any references to the LetterA variable, it can import strings.xq without importing stringtypes.xsd.

Get XQuery now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.