-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix XMLSCHEMA-64 #3
Merged
Merged
Conversation
This file contains 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
The `visitedElements` set prevents infinite recursion, but assumes all elements have unique names. But this is only true for top-level names. By stopping recursion only at toplevel elements/types, different subelements with identical names are supported.
`visitedElements` prevents infinite recursion, but assumes all elements have unique names. This assumption is wrong for non-toplevel elements, causing elements not to be walked when they should. But at any start of infinite recursion, the type instance has been previously visited: either because we've seen the element, or because a different element refers to the same type. And as type references resolve the target instance (not a copy, unlike elements!), we can use type instances to detect infinite recursion.
Add IntelliJ project directory to ignore list
The typeInfo.getType()==COMPLEX check can differ from the schemaType implementation (XmlSchemaSimpleType or XmlSchemaComplexType), and list a complex type as ATOMIC. This happens when referencing an element with complex content containing a simple type.
Hi, Also running into this problem due to the check on element name rather than type. Would be great if we could get this fixed. |
Hi,
Given that I'm not the only one to run into this problem, is there a
comitter that feels comfortable reviewing the PR?
The PR is here: #3
Kind regards,
Oscar
…On Mon, 13 Mar 2023 at 17:18, hannsl ***@***.***> wrote:
Hi, Also running into this problem due to the check on element name rather
than type. Would be great if this we could get this fixed.
—
Reply to this email directly, view it on GitHub
<#3 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGI5UAVP3OIIB5PIRR2A5TW35CFTANCNFSM6AAAAAATZWYZWI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
✉️ Oscar Westra van Holthe - Kind ***@***.***>
|
MaxGekk
pushed a commit
to apache/spark
that referenced
this pull request
Mar 1, 2024
### What changes were proposed in this pull request? The pr aims to upgrade `xmlschema-core` from `2.3.0` to `2.3.1`. The previous version was released 2 years ago: <img width="817" alt="image" src="https://github.com/apache/spark/assets/15246973/8d04f2d7-5a80-47e9-b92e-c1fc2ef3a94c"> ### Why are the changes needed? The new version brings some bug fixes, eg: https://issues.apache.org/jira/browse/XMLSCHEMA-64 apache/ws-xmlschema#3 ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Pass GA. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #45347 from panbingkun/upgrade_xmlschema. Authored-by: panbingkun <panbingkun@baidu.com> Signed-off-by: Max Gekk <max.gekk@gmail.com>
TakawaAkirayo
pushed a commit
to TakawaAkirayo/spark
that referenced
this pull request
Mar 4, 2024
### What changes were proposed in this pull request? The pr aims to upgrade `xmlschema-core` from `2.3.0` to `2.3.1`. The previous version was released 2 years ago: <img width="817" alt="image" src="https://github.com/apache/spark/assets/15246973/8d04f2d7-5a80-47e9-b92e-c1fc2ef3a94c"> ### Why are the changes needed? The new version brings some bug fixes, eg: https://issues.apache.org/jira/browse/XMLSCHEMA-64 apache/ws-xmlschema#3 ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Pass GA. ### Was this patch authored or co-authored using generative AI tooling? No. Closes apache#45347 from panbingkun/upgrade_xmlschema. Authored-by: panbingkun <panbingkun@baidu.com> Signed-off-by: Max Gekk <max.gekk@gmail.com>
ericm-db
pushed a commit
to ericm-db/spark
that referenced
this pull request
Mar 5, 2024
### What changes were proposed in this pull request? The pr aims to upgrade `xmlschema-core` from `2.3.0` to `2.3.1`. The previous version was released 2 years ago: <img width="817" alt="image" src="https://github.com/apache/spark/assets/15246973/8d04f2d7-5a80-47e9-b92e-c1fc2ef3a94c"> ### Why are the changes needed? The new version brings some bug fixes, eg: https://issues.apache.org/jira/browse/XMLSCHEMA-64 apache/ws-xmlschema#3 ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Pass GA. ### Was this patch authored or co-authored using generative AI tooling? No. Closes apache#45347 from panbingkun/upgrade_xmlschema. Authored-by: panbingkun <panbingkun@baidu.com> Signed-off-by: Max Gekk <max.gekk@gmail.com>
jpcorreia99
pushed a commit
to jpcorreia99/spark
that referenced
this pull request
Mar 12, 2024
### What changes were proposed in this pull request? The pr aims to upgrade `xmlschema-core` from `2.3.0` to `2.3.1`. The previous version was released 2 years ago: <img width="817" alt="image" src="https://github.com/apache/spark/assets/15246973/8d04f2d7-5a80-47e9-b92e-c1fc2ef3a94c"> ### Why are the changes needed? The new version brings some bug fixes, eg: https://issues.apache.org/jira/browse/XMLSCHEMA-64 apache/ws-xmlschema#3 ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Pass GA. ### Was this patch authored or co-authored using generative AI tooling? No. Closes apache#45347 from panbingkun/upgrade_xmlschema. Authored-by: panbingkun <panbingkun@baidu.com> Signed-off-by: Max Gekk <max.gekk@gmail.com>
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.
The
visitedElements
set prevents infinite recursion, but assumes all elements have unique names. But this is only true for top-level names, as demonstrated by the test aded by this PR.As types are unique (references are replaced by the instance they reference, unlike elements), stopping recursion should happen on element content, rather than element name.
This PR provides a fix, and a test case to prove it works.