Skip to content

Output Validation: S9: Additional schema file accessibility for validation #3611

Open

Description

@igarashitm

Description:
When a SAFE type override references a type from an additional schema file (uploaded via FieldOverrideService.addSchemaFilesForTypeOverride()), the validator needs access to that file to resolve xsi:type.

The additional file is in definitionFiles and filePath[], but the root schema may not have an xs:import directive for it.

Approach depends on S3i investigation and S8 outcome:

  • If JAXP resolves xsi:type types from classpath without explicit import → no wrapper needed
  • If not → generate a thin wrapper XSD that xs:imports all schema files from targetBody.filePath[] and use it as the validator's resourceUri
  • If S8 already implements schema flattening (because classpath resolution failed for xs:include/xs:import), then additional files that aren't explicitly imported would also need to be included in the flattening — build on S8's infrastructure
  • Optimization: only generate wrapper when additional files exist that aren't already imported by the root schema (compare XmlSchemaAnalysisService dependency graph against filePath[])

Key files:

  • packages/ui/src/services/document/xml-schema/xml-schema-analysis.service.ts
  • New service for wrapper schema generation (if needed)

Expected Outcome:

  • If S3i confirms classpath-only resolution works: This issue is a no-op. Document that classpath presence is sufficient for xsi:type resolution and close the issue.
  • If S3i reveals explicit import is required: A wrapper schema generator that produces a thin XSD containing xs:import directives for all schema files in targetBody.filePath[]. The wrapper is used as the validator's resourceUri instead of the root schema. Only generated when additional files exist that aren't already imported by the root schema (determined by comparing XmlSchemaAnalysisService dependency graph against filePath[]). Unit tests covering wrapper generation, conditional generation logic, and validation with the wrapper.

Dependencies: S1i, S3i, S4, S8

Activity

  1. added this to the 2.13 milestone on Aug 3, 2026
  2. moved this from New to Todo in Kanban Boardon Aug 3, 2026
  3. removed this from the 2.13 milestone on Sep 30, 2026
  4. self-assigned this
    on Oct 20, 2026
  5. moved this from Backlog to In Progress in Kanban Boardon Oct 20, 2026
  6. added this to the 2.14 milestone on Oct 23, 2026
  7. added 3 commits that reference this issue on Oct 23, 2026
    38ed76c
    cfb61f5
    d6cc72a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

DataMapperAll issues related to the DataMappersubtask

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions