Skip to content
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

XSD schema clean up: addresses #1045

Open
ChristianMayer opened this issue Feb 8, 2021 · 2 comments
Open

XSD schema clean up: addresses #1045

ChristianMayer opened this issue Feb 8, 2021 · 2 comments
Labels

Comments

@ChristianMayer
Copy link
Member

The XSD schema uses a ORed regex to check for a valid address. This worked well for the KNX GA addresses, but starting with OpenHAB and becoming even worse with MQTT the valid strings for the addresses are not strict any more.

The best solution would be to make the allowed strings depending on the value of the <pages> backend attribute.
Possible ways to achieve that might be the XSD features xs:assert or xs:alternative

Also there are a few places that are using the addr type although it might be better to make those a derivation of <address>.

This clean up must make sure that it's still compatible with the visual and the text editor.

@peuter
Copy link
Member

peuter commented Feb 9, 2021

Another thing that complicates the address evaluation is that you could basically write something like this in a template:
<address transform="OH:switch">Sink_{{ sink }}_Prev</address>. I don't know if its possible, but for address-Elements in templates the address evaluation should be disabled.

@peuter
Copy link
Member

peuter commented Feb 14, 2021

The problem with àssert and alternative is that they require the editors to support XSD 1.1. The Text-Editor uses an emscripten compiled version of libxml2, which does not support XSD 1.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants