[RFC] SRS Section 2

Matthew Burgess matthew at linuxfromscratch.org
Thu Feb 3 15:17:12 PST 2005


Richard Betel wrote:
>>I, see, this is where you *might* be misunderstanding.  When we say
>>"validate" we're talking *only* about the structure/syntax of the data,
>>not its content.  i.e. we can check that for each package we want to
>>build there is a <download> tag and that each "download" tag has a "url"
>>element.  However, once we've got that far, *XML validation* goes no
>>further.
> 
> 
> It seems like its high time everyone started using some good nomenclature here.

Thank you.

> For XML:
> - We already have a syntax definition
> - We already have a syntactic verifier
> - We already have a scanner
> - We already have a parser

Yes, and we can't underestimate the amount of effort it would take to 
re-implement that for a custom data format.

> Against XML:
> - XML libraries are big and cumbersome

Not necessarily, it depends on the exact XML facilities it supports 
(e.g. libxml2 can be compiled with an --with-minimum which drops a large 
amount of supporting XML technologies).  Here's the output of 
./configure --with-minumum:

Disabling multithreaded support
Disabling DOM like tree manipulation APIs
Disabling FTP support
Disabling HTTP support
Disabling deprecated APIs
Disabling the xmlReader parsing interface
Disabling the xmlWriter saving interface
Disabling the xmlPattern parsing interface
Disabling the older SAX1 interface
Disabling the PUSH parser interfaces
Disabling HTML support
Disabling DTD validation support
Disabling Catalog support
Disabling Docbook support
Disabling XPointer support
Disabling C14N support
Disabling XInclude support
Disabling XPATH support
Disabling serialization/saving support
Disabling ICONV support
Disabling ISO8859X support
Disabling Schemas/Relax-NG support
Disabling DEBUG support

That's a severly cut down library!  Now of course, if ALFS needs any of 
those we'd need to re-enable them.  Additionally, other XML libraries 
may or may not support variant subsets of the above features.

> - XML is over-wrought for our purposes

Like C++, you only pay for the features what you use.  If you only need 
the strict syntax it gives you, that's fine.  There's no need to use 
XIncludes, XPointers, XPath, etc. just because they're there.

> - some feel the big problem with profiles is going to be in the
> semantics, not the syntax, and therefore XML's advantages are of
> little value.

But that's a problem inherent with any data format.  Unless we build an 
AI engine into alfs, I don't think we'll ever be able to second guess 
what commands the user really wanted to execute as opposed to the one's 
they wrote in the profiles!  Just like 'bash' won't stop you from 
writing 'rm -rf /' as root I don't think it's alfs place to do that either.

Regards,

Matt.



More information about the alfs-discuss mailing list