-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
The number of enumeratedValue
elements in the enumeratedValues
element if the derivedFrom
attribute is present
#1647
Comments
This looks like a bug in the schema. The |
If I understand correctly, XSD does not allow us to specify the relationship between the presence of the |
No, not directly. What might work is grouping elements into exclusive groups. But that easily creates new issues/drawbacks. The schema describes the syntax of a language. The relationship between elements is about semantics. |
@JonatanAntoni |
It looks like the feature of reusing enumerated values has not really been used, as it would fail with the current schema. Sorry for the inconvenience.
For demonstration purposes I am adding a new register description:
In the above case it would have been smarter to derive the field As a consequence the schema check no longer detects the case where the element Note that most people are generating the SVD file from some other source and therefore do not make use of deriving field and enumeration descriptions. I would be interested to understand how your use case is different. |
I'm taking SVD from the project https://github.com/stm32-rs/stm32-rs (more specifically https://stm32-rs.github.io/stm32-rs/) in order to use it in https://marketplace.visualstudio.com/items?itemName=mcu-debug.peripheral-viewer. |
PROBLEMS (Validation with XSD grammar) when using the VS Code XML extension:
https://marketplace.visualstudio.com/items?itemName=redhat.vscode-xml
SVD File: https://stm32-rs.github.io/stm32-rs/stm32f103.svd.patched
The text was updated successfully, but these errors were encountered: