[RFC] nALFS profile parsing changes

James Robertson jwrober at linuxfromscratch.org
Sun Feb 15 14:33:06 PST 2004

Kevin P. Fleming wrote:

> 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.

That sounds great.  Question: Does xmllint have an API we can take 
advantage of?  If so, how hard is it to go ahead and add the code to 
spit out what xmllint would in your example above?


James Robertson -- jwrober at linuxfromscratch dot org
Reg. Linux User -- #160424 -- http://counter.li.org
Reg. LFS User   -- #6981   -- http://www.linuxfromscratch.org
LFS Bugzilla Maintainer    -- http://{blfs-}bugs.linuxfromscratch.org

More information about the alfs-discuss mailing list