Using a pure bash XML "parser" for jhlfs. A very humble suggestion awaiting for comments.

Jeremy Huntwork jhuntwork at
Fri Jan 27 07:09:55 PST 2006

George Makrydakis wrote:

> I really like the idea of using the XML sources of the book, and
> wondered if there was a way to get rid of a third party dependence,
> i.e. the XML parser binary (whatever that may be). After a search over
> the internet, I found out that even if there is a bash "script"
> parsing a XML document, that is always done using a third party
> application / utility.
> The following is an attempt to get rid of such a dependency, for only
> pure bash is used.

Very nice, George. I've done something similar in C (it only depends on
standard libs). I never got around to finishing it, though. :/ The
advantage of Bash, would be that hopefully, more would be able to help
out. To me, I've found that the hard part is iterating through all the
xi:include tags in the LFS book. Also, keeping track of and swapping out
the entities and their values can be difficult.

Anyway, thanks for this. If you get it to a point where it does what the
current XSL script does, we just might be able to drop it in. :) Fewer
dependencies are always nice.


More information about the alfs-discuss mailing list