xml syntax error in kiwi image

284 Views Asked by At

I am creating xml file and I am getting sysntax error.

Below is error:

 unknown-4e99680:0: Relax-NG validity error : Element preferences has extra content: oemconfig
Relax-NG validity error : Extra element preferences in interleave
unknown-4e99680:0: Relax-NG validity error : Element image failed to validate content

Xml file:

<preferences>
        <version>1.1.0</version>
        <hwclock>utc</hwclock>
        <type
            format="qcow2"
         </type>
    </preferences>
    <preferences>
        <oemconfig>
                <oem-reboot>true</oem-reboot>
        </oemconfig>

Can any one help me with sysntax or what i am doing wrong

1

There are 1 best solutions below

0
Michael Kay On

I know nothing about Kiwi but a quick google tells me it has a RelaxNG schema here:

https://suse.github.io/kiwi/development/schema.html

The definition of the "images" element here:

https://suse.github.io/kiwi/development/schema.html#id28

says that it can only contain one preferences element, but you have two.

Moreover, the schema suggests that an oemconfig element is allowed as a child of the type element, but not as a child of preferences.