On Fri, Apr 21, 2017 at 11:20:05AM +0200, Fabiano Fidêncio wrote: > On Fri, Apr 21, 2017 at 11:16 AM, Daniel P. Berrange > <berrange@xxxxxxxxxx> wrote: > > On Fri, Apr 21, 2017 at 11:06:42AM +0200, Fabiano Fidêncio wrote: > >> On Fri, Apr 21, 2017 at 10:45 AM, Daniel P. Berrange > >> <berrange@xxxxxxxxxx> wrote: > >> > On Fri, Apr 21, 2017 at 10:37:37AM +0200, Fabiano Fidêncio wrote: > >> >> Without this change the output got from the command-line template will > >> >> look like "<?xml version=1> autoyast=device://sda/autoinst.xml" while > >> >> what we actually expect is just "autoyast=device://sda/autoinst.xml". > >> > > >> > This description looks a bit odd - if I run > >> > > >> > $ osinfo-install-script -p jeos opensuse42.2 > >> > > >> > it generates autoinst.xml, which contains > >> > > >> > <?xml version="1.0"?> > >> > <profile xmlns:config="http://www.suse.com/1.0/configns" xmlns="http://www.suse.com/1.0/yast2ns"> > >> > <bootloader> > >> > <device_map config:type="list"> > >> > ....snip.... > >> > > >> > where is this > >> > > >> > "<?xml version=1> autoyast=device://sda/autoinst.xm" > >> > > >> > data that you're referring to ? > >> > >> You'll get it once you call > >> osinfo_install_script_generate_command_line_for_media(). > >> The returned result depends on the output type set in for the XML file. > >> > >> So, instead of getting the expected > >> "autoyast=device://sda/autoinst.xml" you'll get "<?xml version=1> > >> autoyast=device://sda/autoinst.xml". > >> > >> We never been hit by this because all the other install-scripts we > >> have are not XML files, but pure text files, while the openSUSE/SLES > >> one is actually a XML. > > > > Urgh, this approach to generating multiple different documents from > > the single xsl template is broken by design :-( > > > > You're lucky that omit-xml-declaration works here - the XSL code is > > still generating what it thinks is XML here - it just happens you're > > ok since you've only needed to generate a single line. > > Yep, unfortunately I was aware of this. /o\ > > > > > This should have been done by having separate <template> elements, > > so we could then have <xsl:output method="xml"/> and > > <xsl:output method="text"/> for the respective documents. > > Do you want a libosinfo bug for this so we can work on this in the future? Yeah, we need to figure out how to fix this - the hard bit is backcompat support. > And are you okay with the "workaround" for now? Yeah. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :| _______________________________________________ Libosinfo mailing list Libosinfo@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libosinfo