Exclude XSD types from code generation
Procedure
-
To find and edit the XSD code generation configuration
file, in Studio, type
Ctrl+Shift+N, and then type:gwxmlmodule.xml -
For any XSDs that do not need code generation in any
context, create a pattern in the
<excludes>element:-
Add a
<pattern>element to the<excludes>element. -
As content for the element, type the
relative path to the XSD in the source directory including the package.
The source directory is your gsrc directory for production code or
gtestfor XSDs that you need only for GUnit tests. Use forward slashes (/) rather than periods to separate levels in the package hierarchy.For example, suppose your XSD is at:PolicyCenter/modules/configuration/gsrc/com/mycompany/schemas/integration/rare.xsdAdd the following
<pattern>element to the<excludes>element:<excludes> <pattern>com/mycompany/schemas/integration/rare.xsd</pattern> </excludes>
-
Add a
-
For any XSDs that need code generation but not repeated code
generation for XSD
<include>elements, create a pattern in the<included-only>element:-
Add a
<pattern>element to the<included-only>element. -
As content for the element, type the
relative path to the XSD in the source directory including the package. Use forward slashes
(
/) rather than periods to separate levels in the package hierarchy. For example, suppose your XSD is at:For example, suppose your XSD is at:PolicyCenter/modules/configuration/gsrc/com/mycompany/schemas/integration/common.xsdAdd the following
<pattern>element to the<included-only>element:<include-only> <pattern>com/mycompany/schemas/integration/common.xsd</pattern> </include-only>
-
Add a
- Make no other changes to the file.
- Save the file.
