mappView compound widget schema error without any details

I get a xml schema validation error without any details. How to find out what the problem is?

ScopeToggleButton.zip (1.5 KB)

<?xml version="1.0" encoding="utf-8"?> Style of the Indicator Line of the Toggle Button Text of the Toggle Button Value of the Toggle Button Value of the Numeric Output Unit of the Numeric Output

Hi Johannes,

With a generic error like that, I usually find the easiest thing to do is to comment out/remove parts of the file until the widget builds successfully, then slowly add parts in until you get an error.

I added your widget to a new widget library in a new project, and got this error:
image

It is referring to the nested Label widget, which requires the “text” attribute:
image

After I added the “text” attribute and built the library, I got the XmlSchema error I think you’re referring to:

I tried removing all of the Properties and the widget built successfully, then I added the Properties back in one-at-a-time. This is the code that caused the error:

        <Property xsi:type="BindableProperty" name="numericvalue" type="Number" defaultValue="true" readOnly="false" category="Data">
            <Description>Value of the Numeric Output</Description>
            <Mappings>
                <Mapping widget="Output" property="value" mode="oneWay"/>
            </Mappings>
        </Property>

The problem is that this property is a Number, but you have the default value set at “true” which is not a valid value for a Number type. I changed this to

defaultValue="1"

and added all of the other properties back in. The widget built successfully and could be added to a Content.

3 Likes

Thank you for your time to debug this problem!

1 Like