On Mon, Oct 27, 2014 at 10:37:38AM -0400, Conrad Meyer wrote: > Sponsored by: EMC / Isilon storage division > > Signed-off-by: Conrad Meyer <conrad.meyer@xxxxxxxxxx> > --- > docs/schemas/domaincommon.rng | 41 ++++++++++++++++++++++++++++++----------- > 1 file changed, 30 insertions(+), 11 deletions(-) > > diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng > index 20d81ae..1c444e0 100644 > --- a/docs/schemas/domaincommon.rng > +++ b/docs/schemas/domaincommon.rng > @@ -213,7 +213,7 @@ > <choice> > <group> > <optional> > - <ref name="bootloader"/> > + <ref name="xenbootloader"/> > </optional> > <element name="os"> > <ref name="ostypexen"/> > @@ -221,7 +221,7 @@ > </element> > </group> > <group> > - <ref name="bootloader"/> > + <ref name="xenbootloader"/> > <optional> > <element name="os"> > <ref name="ostypexen"/> > @@ -234,6 +234,9 @@ > </choice> > </define> > <define name="oshvm"> > + <optional> > + <ref name="bhyvebootloader"/> > + </optional> > <element name="os"> > <ref name="ostypehvm"/> > <interleave> > @@ -1053,17 +1056,33 @@ > binary or script used to extract the data from the first disk device. > --> > <define name="bootloader"> > + <element name="bootloader"> > + <choice> > + <ref name="absFilePath"/> > + <empty/> > + </choice> > + </element> > + </define> > + <define name="bootloader_args"> > + <element name="bootloader_args"> > + <text/> > + </element> > + </define> > + <define name="xenbootloader"> > <interleave> > - <element name="bootloader"> > - <choice> > - <ref name="absFilePath"/> > - <empty/> > - </choice> > - </element> > + <ref name="bootloader"/> > <optional> > - <element name="bootloader_args"> > - <text/> > - </element> > + <ref name="bootloader_args"/> > + </optional> > + </interleave> > + </define> > + <define name="bhyvebootloader"> > + <interleave> > + <optional> > + <ref name="bootloader"/> > + </optional> > + <optional> > + <ref name="bootloader_args"/> > </optional> > </interleave> > </define> I understand you created separate bhyvebootloader vs xenbootloader schema rules, so that the Xen case can keep <bootloader> as compulsory for use when <bootloader_args> is set, while for bhyve you allow <bootloader_args> without any corresponding <bootloader>. The actual XML parser meanwhile, always allows <bootloader_args> even when <bootloader> is not set. So I think you don't really need to have the complexity of making the schema provide different rules for xen vs bhyve. Lets just stay simple and keep a single <define name="bootloader"/>element and make the <bootloader> optional to match what the parser actually does. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :| -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list