Hi I was having a problem compiling openbios on the lastest debian release.
I thought it may have been a problem with the xsltproc version in
debian... however the debian maintainer Mike Hommey tells me that the
issue is in the openbios code. He has generated a patch which I am
forwarding (attached) which he tells me fixes the openbios XSLT.
---------- Forwarded message ----------
From: Mike Hommey <mh(a)glandium.org>
Date: 08-Apr-2007 17:02
Subject: Re: Bug#401337: test case for error "Unexpected XSLT element 'param'"
To: Alex Owen <r.alex.owen(a)gmail.com>, 401337-done(a)bugs.debian.org
Cc: Nicolas Haller <nicolas(a)boiteameuh.org>
On Fri, Feb 23, 2007 at 09:32:48PM +0000, Alex Owen
> Sorry missed a line:
> >mkdir /var/tmp/testcase
> >cd /var/tmp/testcase
> >svn co svn://openbios.org/openbios/openbios-devel -r 113
> >cd openbios-devel
> config/scripts/switch-arch x86
> >make xml
> >###output starts###
> >Cleaning up... ok
> >Initializing build tree...ok.
> >Creating target Makefile...warning: failed to load external entity
> >runtime error: file config/xml/dictionary.xsl line 13 element param
> >Unexpected XSLT element 'param'.
> >runtime error: file config/xml/dictionary.xsl line 22 element if
> >Variable 'conditions' has not been declared.
> >make: *** [xml] Error 10
> >###output ends###
Okay, I have been able to reproduce the bug... and it's not a bug.
The reason why it didn't fail before is that previous versions of
libxslt were lax on xsl:param. You are using xsl:param where
xsl:variable is to be used. xsl:param can only be top-level or a direct
child of an xsl:template.
Attached here is a diff to fix openbios-devel's xsl stylesheet. With
this patch applied, it works with xsltproc from etch.
> if (size > OBIO_CMDLINE_MAX) size = OBIO_CMDLINE_MAX;
> memcpy(obio_cmdline, nv_info.cmdline, size);
> - obio_cmdline[size-1] = '\0';
> + obio_cmdline[size] = '\0';
Looks like you need to change the declaration of
"obio_cmdline" or the maximum value "size" is
clamped to, as well?
Current version can't boot the test images from Qemu, because the command
line is truncated. Boot is fixed with the attached patch, please apply.
FREE pop-up blocking with the new MSN Toolbar - get it now!