Let's create a new element called "image", which will be added to the "os" element. By adding the new "image" element, we'll start supporting pre-installed images, at least in order to provide their link to Apps consuming osinfo-db. The xml entry will be similar to: <os> <image arch="x86_64" format="raw"> <variant id="cloud"/> <url>https://download/foo/bar.img</url> </image> </os> Mind that the "variant" is an optional element. https://gitlab.com/libosinfo/osinfo-db/issues/10 Signed-off-by: Fabiano Fidêncio <fidencio@xxxxxxxxxx> --- data/schema/osinfo.rng.in | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/data/schema/osinfo.rng.in b/data/schema/osinfo.rng.in index 22c39d6..0290eeb 100644 --- a/data/schema/osinfo.rng.in +++ b/data/schema/osinfo.rng.in @@ -488,6 +488,30 @@ </element> </define> + <define name='image'> + <element name='image'> + <attribute name='arch'> + <ref name='archnames'/> + </attribute> + <attribute name='format'> + <ref name='imageformats'/> + </attribute> + <interleave> + <optional> + <element name='variant'> + <attribute name='id'> + </attribute> + </element> + </optional> + <optional> + <element name='url'> + <ref name='url'/> + </element> + </optional> + </interleave> + </element> + </define> + <define name='installer'> <element name='installer'> <zeroOrMore> @@ -558,6 +582,9 @@ <zeroOrMore> <ref name='tree'/> </zeroOrMore> + <zeroOrMore> + <ref name='image'/> + </zeroOrMore> <zeroOrMore> <ref name='installer'/> </zeroOrMore> @@ -769,6 +796,15 @@ </choice> </define> + <define name='imageformats'> + <choice> + <value>qcow2</value> + <value>raw</value> + <value>vmdk</value> + <value>vhdx</value> + </choice> + </define> + <define name='date'> <data type="string"> <param name="pattern">[0-9]{4}-[0-9]{2}-[0-9]{2}</param> -- 2.19.1 _______________________________________________ Libosinfo mailing list Libosinfo@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libosinfo