Programming alfs parser

Paul Campbell paul at
Sat Jan 12 06:38:18 PST 2002

... in Java.

Just for an acedemic exercise.  So far i have the profiles loaded into DOM
trees, and I'm looking for advice on what comes next.

Java is a bit crap, apparently on purpose, with enviroment variables.  
This might cause a problem.  Do you think?  I can get them, and since this is
not likely to be a cross-platform program, I may as well use them.  Are they
really needed for much, read on though.

I intend to produce shell scripts using XSLT instead of exceuting the commnads 
individually, thusly. (physdo code)

get next element.
check for XSL handler in handlers dir
		Pass XML element and children for processing to Xalan
		Take returned script and write to /tmp
		if ELEMENT ACTIVE (marked as run)
			Excute /tmp/tem-script and capture output
			Display Output
			if LOG_ON
				echo output to file
			WARN: No handler for element
			Recurse Check children

I can see it working after a fashion, and avoids the shell intercommunication
problems well.  The problem is chroot.  Will this work.... (physdo bash)


cp /tmp/current-script $LFS/tmp/current-script
chroot $LFS /tmp/current-script


Where would the output go?  Maybe

chroot $LFS /tmp/current-script > /tmp/current-log
cp $LFS/tmp/current-log /tmp
cat /tmp/current-script


Anyway, any help would be gratefully recieved, even if it's only to tell me
that I should give up and learn more programming before trying this.  Or
possibly that you don't think Java has a chance.



*** Error 47: Element <rant> does no exist.
Unsubscribe: send email to listar at
and put 'unsubscribe alfs-discuss' in the subject header of the message

More information about the alfs-discuss mailing list