Basic Encoding Rules

XML code of the themes created and edited via Lycia Theme Designer follow basic rules working for any XML coding.

Below correct examples are given in a standard .qxtheme color scheme and bear ; wrong examples are given in brown and bear .

XML files must have a root element.

A root element is simply a set of tags that contains your XML content.

 

 

 

<StyleSheet xmlns="http://querix.com">

  <DoStyleAction>

    <SetProperty>

      <PropertyPath>

        <PropertyName>Cursor</PropertyName>

      </PropertyPath>

      <PropertyValue>Cross</PropertyValue>

    </SetProperty>

  </DoStyleAction>

</StyleSheet>

 

 

<DoStyleAction>

    <SetProperty>

      <PropertyPath>

        <PropertyName>Cursor</PropertyName>

      </PropertyPath>

      <PropertyValue>Cross</PropertyValue>

    </SetProperty>

</DoStyleAction>

XML elements must be properly nested.

When you insert one tag within another, remember the order in which you open each tag, and then close the tags in the reverse order. If you open element A in the element B, you have to close B before closing A.

 

<DoStyleAction>

  <SetProperty>

    <PropertyPath>

      <PropertyName>Cursor</PropertyName>

    </PropertyPath>

  </SetProperty>

</DoStyleAction>

 

<DoStyleAction>

  <SetProperty>

    <PropertyPath>

      <PropertyName>Cursor</PropertyName>

</DoStyleAction>

  </SetProperty>

    </PropertyPath>

 

Every XML element must have a closing tag:

<> ... </>

When a tag is opened, it must also be closed. Any unclosed tags will break the code.

 

  <DoStyleAction>

    <SetProperty>

      <PropertyPath>

        <PropertyName>Cursor</PropertyName>

      </PropertyPath>

      <PropertyValue>Cross</PropertyValue>

    </SetProperty>

  </DoStyleAction>

 

<DoStyleAction>

  <SetProperty>

    <PropertyPath>

      <PropertyName>Cursor</PropertyName>

    </PropertyPath>

</DoStyleAction>

<SetProperty>

  <PropertyPath>

    <PropertyName>Cursor</PropertyName>

  </PropertyPath>

  <PropertyValue>Cross</PropertyValue>

</SetProperty>

 

<SetProperty>

  <PropertyPath>

    <PropertyName>Cursor</PropertyName>

</SetProperty>

<PropertyValue>Cross</PropertyValue>

 

<PropertyValue>Cross

This is an XML prolog:

<?xml version="1.0" encoding="utf-8"?>

XML prolog doesn't need a closing tag because it is not a part of an XML document.

 

XML tags are case-sensitive.

Opening and closing tags must be written with the same case.

 

<DoStyleAction>

 

<doStyleAction>

<SetProperty>

 

<setproperty>

<PropertyPath>

 

<pROPERTYpATH>

XML attributes come in quotation marks.

Attribute values modify a tag or help identifying the type of the tagged data.

<StyleSheet xmlns="http://querix.com">

 

<StyleSheet xmlns=http://querix.com>

<WithClassFilter ClassName="green">

...

</WithClassFilter>

 

<WithClassFilter ClassName=green>

...

</WithClassFilter>

<Thickness Left="2" Top="2" Right="2" Bottom="2" />

 

<Thickness Left=2 Top=2 Right=2 Bottom=2 />

 

 Spaces cannot be used in XML tag names.

 

<SetProperty>

 

<Set Property>

<WithClassFilter ClassName="green">

 

<With Class Filter Class Name="green">

XML does not truncate multiple white spaces:

 

 

 

<PropertyName>               FillColor</PropertyName>

 

 

 

 

<WithClassFilter                  ClassName="yellow">

 

 

 

Be careful then commenting in XML.

Two dashes in the middle of a comment are allowed only when they are separated by a white space.

<!-- This is a comment -->

 

<!-- This is not a -- comment -->

<!-- This is a - - comment -->

 

 

 

Here you can learn how to work with a graphical Lycia theme designer.

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.