Skip to content

Suggestion: Pqvst include this attached XSD file in future releases. / Users download this XSD file. #189

@SteveWaring

Description

@SteveWaring

Editing a UR layout file in a good IDE is much quicker and easier with an XML schema. It will offer drop down lists of all options, highlight errors, and auto complete for you.

In this screen shot you can see that a weight of 0 has been flagged as has the typo in the word text, although with auto complete that typo would not have occurred. You can also see the IDE offering the next valid element:
Image
In this screen shot you can see that although the IDE offers the choice of colours that UR accepts, you can also enter a valid hex colour code:
Image
Some other examples:
Image
Image
I have uploaded the XSD file I created here https://drive.google.com/file/d/1itXPuf2tAk6O4hJJ07zEDdYjUvMqXCX6/view?usp=sharing so that anyone who wants it can download it.

I suggest it is placed in the folder containing your remotes, so that they can all refer to it easily like this:
<?xml version="1.0" encoding="UTF-8"?>
<layout orientation="portrait" onlaunch="launch" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../layout.xsd">

Please download this file and enjoy it's benefits.

I would be really nice if the install for UR included this file and all examples were updated to reference it.

There might just possibly be an error in my understanding of the format of layout files. If anyone uses this schema and finds a problem, please let me know and I'll fix things.

Note 1: The checking of the format of a theme given with light= or dark= adds these restrictions:
Any or all of the options can be given, but they must occur in this order: normal focus active color
An optional semicolon can be placed after the last entry.
Spaces are allowed either side of colons and semicolons, but spaces are not allowed before the first entry or after the last entry or the optional semicolon following it, although there can be spaces between the last entry and such a following semicolon.

Note 2: With slider, the schema uses XSD version 1.1 format to assert that the value for progress= is <= progressmax=. You might have to turn on XSD version 1.1 in your IDE for this to take effect. My IDE validates XSD files against version 1.1, but checks XML files using verion 1.0. This means the assert statement has not been tested. In the unlikely event that you encounter a problem, just remove the line in the XSD file that has the word assert in it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions