XSLT to convert from V-1.0 --> V-2.0

Paul Campbell paul at pauls.bsrg.dnsq.org
Thu Dec 6 04:01:01 PST 2001


I can now comfirm that it works, I have successfully managed to get it to biuld
an LFS base system from a converted profile.  I am currently running my BLFS
base profile "mother.xml" and it appears to be fine.

The only tripping points are sections like:

<make_install dir="&LFS;/&build_dir;/&bzip2-directory;">
	make PREFIX=&LFS;/usr install
</make_install>

The new syntax, according to Neven's handler code ( better than any DTD *g*), 
does not support the alternative command in the make element content. The XSLT 
style sheet currently converts this to:

<make>
	<base>&LFS;/&build_dir;/&bzip2-directory;</base>
	<pre/>
	<command>
		make PREFIX=&LFS;/usr install
	</command>
	<param>install</param>
</make>

Which is invalid, but, intentionally the command is passed through, so that you
the profiler can correct it easily.  NOTE:  the above will *not* work.  
You need to manual convert these to something like:

<make>
    <base>&LFS;/&build_dir;/&bzip2-directory;</base>
    <pre/>
    <param>PREFIX=&LFS;/usr</param>
    <param>install</param>
</make>

OR:

<execute>
    <base>&LFS;/&build_dir;/&bzip2-directory;</base>
    <command>
        make PREFIX=&LFS;/usr install
    </command>
</execute>

It would be possible to do this in the script, but the number of possible
outcomes makes it a little tricky to get right.  I spent a few hours on the
problem last night, and gave up, after adding about 50 lines of crap to the
style sheet and it still didn't work right.  Sorry.

-- 
Paul
An expert is a man who has made all the mistakes which can be made in a very narrow field. 
-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe alfs-discuss' in the subject header of the message



More information about the alfs-discuss mailing list