Exclude XSD types from code generation

Procedure

  1. To find and edit the XSD code generation configuration file, in Studio, type Ctrl+Shift+N, and then type:
    gwxmlmodule.xml
  2. For any XSDs that do not need code generation in any context, create a pattern in the <excludes> element:
    1. Add a <pattern> element to the <excludes> element.
    2. 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 gtest for 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.xsd

      Add the following <pattern> element to the <excludes> element:

      <excludes>
        <pattern>com/mycompany/schemas/integration/rare.xsd</pattern>
      </excludes>
  3. For any XSDs that need code generation but not repeated code generation for XSD <include> elements, create a pattern in the <included-only> element:
    1. Add a <pattern> element to the <included-only> element.
    2. 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.xsd

      Add the following <pattern> element to the <included-only> element:

      <include-only>
        <pattern>com/mycompany/schemas/integration/common.xsd</pattern>
      </include-only>
  4. Make no other changes to the file.
  5. Save the file.