[RFC] nALFS profile parsing changes

Kevin P. Fleming kpfleming at linuxfromscratch.org
Fri Feb 13 17:00:10 PST 2004


I am reworking the profile parsing code in nALFS. The general idea is 
that now the handlers will be responsible for much of their own parsing 
(well, not directly but at a high level), which will remove all the 
handler-specific knowledge from the front end, which is a good thing :-)

One of the side-effects of this change is that nALFS can now report 
_semantic_ errors in profiles, in addition to the _syntax_ errors it 
always reported. The syntax errors are actually reported by the libxml2 
parser, and nALFS dumps the XML text out to the status window so the 
user can see the problem area(s).

However, for semantic errors (for example, two <stageinfo>s in a single 
<stage>), the new code can tell the user about this problem, and can 
tell them what file the problem occurred in, but that's really all. 
Personally I think that's fine, if the user can't find the error on 
their own they can use xmllint and the appropriate DTD and it will point 
out the same error, only with line numbers and more detailed description 
of what's wrong.

Anyone have a problem with nALFS working this way? Note that this is not 
a reduction in functionality; previously nALFS did not really check for 
semantic errors in profiles at all.

This code will be going into version 1.3, which means there will need to 
be an extensive beta/rc cycle to make sure nothing got borked. In 
addition, I will be checking in some significant parts of this code into 
CVS tonight (some of it is already there), so testers who can test CVS 
snapshots over the next week or two as the code evolves would be very 
welcome.




More information about the alfs-discuss mailing list