microsoft / microsoft/simplechat

Add XSD ingestion and schema-driven XML generation

Open
#1,212 1 comment 0 reactions 1 assignee View on GitHub

@paullizer is already working on this.

Since Aug 11, 2026.

enhancement
Dominant language
Python
Stars
153
Forks
116
Avg merge
7h 7m
Merged PRs (30d)
122

Description

Summary

Add first-class XSD (.xsd) support across document ingestion and schema-driven XML generation.

User Value

Users need to retain an XML Schema as an authoritative whole-file source and select it when generating XML. Chunking an XSD into disconnected text fragments loses the global element, type, namespace, and constraint relationships required to produce useful XML.

Proposed Behavior

  • Accept XSD uploads in personal, group, public, external, chat-attachment, and supported file-sync ingestion paths.
  • Require Enhanced Citations/source-blob storage for XSD so the exact original schema remains durably available.
  • Store the original XSD in the authorized workspace blob location and persist its blob reference on the document.
  • Index one bounded, searchable schema metadata/summary chunk rather than ordinary structural text chunks; use the source blob, not Search chunks, as the authoritative schema for generation.
  • Identify selected XSD documents distinctly from ordinary XML sources and tabular sources.
  • When XML output is explicitly requested and an XSD is selected, load the authorized full schema into the XML generation path so the model creates a new XML document from the schema rather than treating the XSD as data to summarize or populate.
  • Preserve ordinary XML template-population behavior when an XML source, rather than an XSD, is selected.
  • Validate and safely handle generated XML against the selected schema before publishing a downloadable artifact, with explicit errors for unusable schemas, oversized authoritative context, or invalid output.
  • Do not resolve remote XSD imports/includes over the network; define a secure policy for local schema dependencies.

Acceptance Criteria

  • .xsd is consistently allowlisted and presented in upload UX across supported workspace and chat flows.
  • XSD ingestion is rejected with a clear user-facing dependency message when Enhanced Citations storage is unavailable or disabled.
  • The exact source XSD is stored in Blob Storage with the same scope, revision, authorization, download, deletion, and migration behavior as other Enhanced Citation source files.
  • Ingestion creates exactly one bounded searchable schema-summary chunk with XSD-specific metadata and does not fragment the schema into ordinary chunks.
  • Personal, group, and public workspace authorization is revalidated before a selected XSD source blob is read.
  • Chat, Analyze/document actions, workflows, mixed-source orchestration, and other XML artifact paths consistently recognize a selected XSD as schema guidance.
  • Generated XML uses the selected XSD as the authoritative structure and does not silently fall back to partial Search content.
  • Invalid, unsafe, unsupported, or over-budget XSD/XML inputs fail explicitly; no invalid XML artifact is presented as successful.
  • Multiple-XSD and xs:include/xs:import behavior is deterministic and documented.
  • Functional, authorization/security, ingestion, XML export, and browser upload-selection regression tests cover the feature.
  • Feature documentation, release notes (if approved), and the application patch version are updated consistently.

Notes

Likely implementation surfaces include config.py, functions_documents.py, document upload routes, chat upload UX, selected-document/source orchestration, functions_document_analysis.py, functions_workflow_runner.py, route_backend_chats.py, functions_generated_file_exports.py, relevant functional/UI tests, and XSD feature documentation.

Open design decisions to resolve during planning include multiple selected schemas, local dependency resolution, output-validation retry/failure policy, and the maximum full-schema context budget.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.