Skip to content

feat: enhance XmlSchemaCatalog to retain namespace prefixes in type definitions - #1884

Open
CaiJimmy wants to merge 2 commits into
masterfrom
jimmy/keep-prefix-schema-constructor
Open

CaiJimmy wants to merge 2 commits into
masterfrom
jimmy/keep-prefix-schema-constructor

Conversation

@CaiJimmy

@CaiJimmy CaiJimmy commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

Types from an imported XML Schema now keep the prefix the query binds to their namespace. With import schema namespace t = "urn:test" at "types.xsd", the type Code is named t:Code, not Code without a prefix. This applies to:

  • the in-scope schema types and the catalog's list of named types,
  • type annotations, and
  • the dynamic type of values produced by schema constructor functions, such as t:Code("hello").

So these types show up in type names and error messages with the prefix the user wrote.

The prefix is for display only: names still compare by namespace and local name, so t:Code and app:Code from two imports of the same schema are the same type. Built-in xs: types keep the xs prefix, and schemas imported as the default element namespace (with no prefix) are unchanged.

@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

QT3 Test Results - Parser: jsoniq

Regression baseline: run 37794943109

🎉 No regressions found for this build.

Summary of passed tests for jsoniq
Test Suite Passing Failing Errors Skipped Missing features Total
app 2037 27 88 5 5 2157
array 208 0 1 0 0 209
fn 10308 270 170 387 315 11135
map 220 0 0 0 0 220
math 149 0 0 0 0 149
misc 764 34 21 52 18 871
op 4339 4 23 0 0 4366
prod 11469 343 187 208 7 12207
ser 332 11 0 0 0 343
xs 155 0 0 9 0 164
Total 29981 689 490 661 345 31821

Full analysis report: see analysis-jsoniq in artifacts.

Download detailed test results

@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

QT3 Test Results - Parser: xquery

Regression baseline: run 37794943109

🎉 No regressions found for this build.

Summary of passed tests for xquery
Test Suite Passing Failing Errors Skipped Missing features Total
app 2044 26 82 5 5 2157
array 209 0 0 0 0 209
fn 10330 249 169 387 315 11135
map 220 0 0 0 0 220
math 149 0 0 0 0 149
misc 768 30 21 52 18 871
op 4339 4 23 0 0 4366
prod 11550 295 154 208 7 12207
ser 343 0 0 0 0 343
xs 155 0 0 9 0 164
Total 30107 604 449 661 345 31821

Full analysis report: see analysis-xquery in artifacts.

Download detailed test results

@CaiJimmy
CaiJimmy force-pushed the jimmy/better-json-error branch from 7f14c5f to f22f38e Compare October 6, 2026 21:22
@CaiJimmy
CaiJimmy force-pushed the jimmy/keep-prefix-schema-constructor branch from 29cd8ed to a0eb73c Compare October 6, 2026 21:23
@CaiJimmy
CaiJimmy force-pushed the jimmy/better-json-error branch from f22f38e to be0f0c3 Compare October 6, 2026 23:39
@CaiJimmy
CaiJimmy force-pushed the jimmy/keep-prefix-schema-constructor branch from a0eb73c to 5ff31d8 Compare October 6, 2026 23:39
@CaiJimmy
CaiJimmy force-pushed the jimmy/better-json-error branch from be0f0c3 to 9f134b9 Compare October 8, 2026 20:36
@CaiJimmy
CaiJimmy changed the base branch from jimmy/better-json-error to master October 8, 2026 20:56
@CaiJimmy
CaiJimmy force-pushed the jimmy/keep-prefix-schema-constructor branch from 5ff31d8 to 70ea5c0 Compare October 8, 2026 20:56
@CaiJimmy
CaiJimmy marked this pull request as ready for review October 8, 2026 21:01
Name the prefix lookup, including why types in no namespace are skipped, and
check only the in-scope type name and a constructed value's type, for two
import prefixes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant