RelaxNG support on nALFS?

Matthew Burgess matthew at linuxfromscratch.org
Tue Nov 30 12:37:46 PST 2004


M.Canales.es wrote:
> Matthew Burgess escribió en alfs.discuss el Martes, 30 de Noviembre de 2004 19:26:
> 
> 
> 
>>As is evidenced by the fact that as a result of XIncluding all the
>>separate XML documents that form the actual profile, you end up with
>>multpile <alfs> tags.  An XML document should only ever have 1 root
>>element, so at the moment it'll only ever pass the well-formedness
>>checks.  Changing/enforcing this validity isn't possible without
>>overhauling the profiles, and probably nALFS itself.
> 
> 
> IMHO, that is due the fact that each profile should can be parsed by nALFS to be
> executed alone, without load the parent profile. You should be able to load and run
> chapter06/glibc.xml for example, without load lfs.xml. Then the top level tag in
> each profile must be {alfs}.
> 
> An easy solution to make a valid xincluded profile is to add xpointers at the
> xinclude elements, like this:
> 
> <xi:include href="chapter05/creatingtoolsdir.xml" 
> xpointer="xpointer(/alfs/stage[1])"/>

Well, depends on your definition of "easy" I suppose :)  Bear in mind 
that (I think) we'd like a syntax that those not proficient with the 
various XML-related specs/technologies can easily adapt for their own 
uses.  Sure, given enough example profiles, customising xpointer syntax 
may be entirely suitable.  I was thinking of something like a top-level 
<alfsCollection> tag or something, that would then allow one or more 
<alfs> children underneath it.  Like your change, it would only require 
a change to the top-level LFS.xml profile.

Regards,

Matt.



More information about the alfs-discuss mailing list