Repository navigation
Conversation
6296f84 to
990f5a7
Compare
990f5a7 to
86de385
Compare
|
[This response was prompted by Joe, drafted by Claude Code, and reviewed by Joe.] @duncdrum I went through this against head Namespaced grammars still match on namespace aloneThe corroboration you added covers
Both are perfectly good documents someone might have open in the editor. The same trick you used for roots would do it — require a corroborating child ( MinorNo-grammar documents come back as VerificationBuilt the branch and ran its spec against I also ticked the open box in your test plan — the bundled fallback. Masking |
Prefer $EXIST_HOME/schema grammars (exist#6528) via jaxv XSD 1.1, with synced resources/schema fallbacks, until catalog-based jaxp works (exist#6686). Co-authored-by: Cursor <cursoragent@cursor.com>
- Re-sync resources/schema/conf.xsd (2.6.0 -> 2.7.0, omit-xml-declaration doc/attribute change) and controller-config.xsd (1.1.1 -> 1.1.2, new optional attribute) from exist-core's schema/ tree, which drifted since this branch was cut. - Update comments in editor.xqm, resources/schema/catalog.xml and resources/schema/README.md: exist#6686 (catalog-based jaxp resolution of native XSD 1.1 grammars by namespace) is fixed upstream as of exist-core#6687 / eXist 7.0.0-beta4, not still open. eXide keeps validation:jaxv-report + an explicit resolved URI rather than switching to validation:jaxp-report + catalog, since stable eXist releases still predate that fix and the WEB-INF system catalog doesn't cover every namespace in SCHEMA_BY_NS. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…ration editor:resolve-schema had two issues found by code review: - xsi:schemaLocation / xsi:noNamespaceSchemaLocation values matching file:|/db/ were used verbatim as the validation:jaxv-report schema URI. A client could point noNamespaceSchemaLocation at an arbitrary local path (e.g. file:///etc/passwd) and force the server to open it as a grammar. Only /db/ is honoured now, since eXist's own permission checks already gate access there; a raw file: hint is never trusted. - No-namespace documents were matched to an eXist config grammar by root local-name alone. Names like <auth> or <server> are generic enough that an unrelated document could collide and get force-validated (and marked invalid) against users.xsd/server.xsd. Now also requires the root's documented required first child (SCHEMA_BY_ROOT_CHILD) to be present before matching. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
… in status The controller-config grammar was matched on the general-purpose eXist namespace alone, so REST <query> envelopes and <dispatch> fragments were reported invalid. Require a <configuration> root for that namespace. Also show "Validated against X" vs "Well-formed only" in the editor status. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
c1c2459 to
33f3651
Compare
|
could you post some screen post, when possible? |
xml_wellformed_spec still asserted an empty #error-status after a successful fix, but compileError now writes the informational status Joe asked for. Co-authored-by: Cursor <cursoragent@cursor.com>
|
@dizzzz its not very exciting, its mainly about the plumbing, using exists schemas instead of its own copies
The UX is somewhat misleading, let me add one more commit |
Move "Well-formed only" / "Validated against …" to a calm #validation-status segment so successful validation no longer looks like an error. Co-authored-by: Cursor <cursoragent@cursor.com>
Distinguish success from the red error pill with a check badge, separator, and dedicated Cypress coverage for schema-ok / well-formed / schema-error. Co-authored-by: Cursor <cursoragent@cursor.com>
|
@dizzzz here you go |

Summary
POST /api/editor/validate, preferring$EXIST_HOME/schema/(exist#6528) and falling back to synced copies underresources/schema/(eXide#842).collection.xconf,controller-config,expath-pkg,security-manager) and no-namespace roots (conf.xml,descriptor,mime-types,users,server), plusxsi:schemaLocation/noNamespaceSchemaLocationwhen they point at a known grammar or an absolutefile://db/URI.validation:jaxv-report+ XSD 1.1 (interim until catalog-based jaxp works against native grammars — exist#6686). Response includesgrammar(native|bundled|instance|none) andschemafor observability.resources/schema/catalog.xmlfor tooling / a future catalog path; document deprecation of the bundled copies.Closes #842.
Test plan
xst package install local-files build/eXide-4.0.1.xar --force --config .existdb.jsongrammar: "native"onexistdb/existdb:latestnpx cypress run --spec cypress/e2e/xml_validate_spec.cy.js(7/7)existdb/existdb:latest$EXIST_HOME/schema/still validates via bundled XSDs (grammar: "bundled")