Use declared schemas fix#3
Open
at88mph wants to merge 6 commits into
Open
Conversation
Integrate validate_one_voresource from main with declared-schema XSD validation and phase 3 XSLT wiring via shared _xsd_errors_for_element. Co-authored-by: Cursor <cursoragent@cursor.com>
Collaborator
Author
|
@msdemlei This should cover some missing elements. |
Contributor
|
On Mon, Jul 06, 2026 at 03:29:24PM -0700, Dustin wrote:
at88mph left a comment (ivoa/rofr#3)
@msdemlei This should cover some missing elements.
Thanks, that looks better for using checkVOResource.xsl.
However, I'm fairly unhappy that you pulled the checks back into the
loop in validate_voresource_documents. I'd still like to have a
(possibly internal) API so that I can validate single resources.
The extra effort of packing things into a records dictionary and then
unpacking results from stats is something I'd much rather save here.
Oh, and of course stylistically I always like it if loops are short.
Did you encounter major trouble with the refactoring from PR #1?
[for clarity: that's where you have a function
errs, warnings = phase3.validate_one_voresource(blob, True, settings)
] I could see that re-parsing the XSL every time might seem wasteful,
but right now you're doing that in the loop, too.
If there's nothing fundamentally wrong with this reasoning, could you
refactor back to that structure? That would help me and possibly
others quite a bit.
|
Collaborator
Author
|
I did have an issue merging, yes. I'm away starting today, but will look at getting this done next week. Thanks @msdemlei . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Support option to use declared schemas in the XML (uncheck built-in schemas in the UI).
Changes
BundledSchemaResolverto justSchemaResolveras it now handles both