Open ChristianMayer opened 3 years ago
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.
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.
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 featuresxs:assert
orxs: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.