[RFC] Call for new team leader
zhouhui at wam.umd.edu
Wed Nov 10 06:54:50 PST 2004
On Wed, Nov 10, 2004 at 09:53:43AM -0000, Jamie Bennett wrote:
>Jeremy Utley wrote on 10 November 2004 09:51
>>> Jamie Bennett wrote:
>>> Lastly (honest!), I'd like to see auto-generation of the ALFS profiles
>>> the book ala lfscmd. This could be done with XSLT or some other tool.
>> Then, all I can say is, do it! If you can find a method of turning the
>> book's XML into an ALFS profile automatically, without user interaction,
>> I'm all ears. Personally, I don't think that can be done right now
>> without more massive changes to the XML structure of LFS itself.
>Vasilli did a nALFS profile -> bash script (yaalfs) so I see no reason why
>can't be done the other way.
There are two stages from lfs docbook to nALFS profile:
1. Extract building script into command list
2. Recognise the pattern and break up each command and fit into
For the first stage, XSLT seems to be able to offer an solution on the
condition that all current building scripts in LFS Docbook can be
described with certain xpath such as <xsl:template match="sect2">
followed by <xsl:apply-templates select="screen/userinput"/>. Since
Docbook by nature is a document preparation system, it won't garantee
a clean xpath to select all and only buliding commands that will run
by nALFS. For example, there may be test scripts that ask a user to
check certain condition or confirm results, and in the future there
may be optional building scripts or branches which only a default
branch should be selected, and there may be userinput that offered in
the book just serve as example (possibly a disaster example). With
careful designing the lfsbook, it might be possible include all
possibilities while still achieve a distinct xpath to describe each
category of user input, but definitely it won't be straight forward.
The second stage is beyond XSLT. It needs to recognize the pattern
which require a formal programing language. With perl or python, it
doesn't seem to be hard though. Unless there is some restriction on
the input commands, there is no garantee to a 100% recognition.
99% of things in the world are easy in one way but difficult or
impossible the other way around.
More information about the alfs-discuss