[Clfs-dev] Simplification of the XML

Joe Ciccone jciccone at gmail.com
Sat Apr 30 09:25:46 PDT 2011


On Sat, 2011-04-30 at 10:45 -0400, Andrew Bradford wrote: 
> On Sat, Apr 30, 2011 at 10:24 AM, Joe Ciccone <jciccone at gmail.com> wrote:
> > One additional feature I was thinking about implementing was a <if>
> > style element and a <select> <case> style element.
> >
> > They would be so we could put a group around multiple tags and call it a
> > day.
> >
> > <c:if c:arch="blah">
> >  <c:para />
> >  <c:command />
> > </c:if>
> >
> > <c:select>
> >  <c:case c:multilib="true" c:bits="32" />
> >  <c:case c:multilib="true" c:bits="n32" />
> >  <c:case c:multilib="true" c:bits="64" />
> >  <c:default />
> > </c:select>
> >
> > Something like the select above could be particularly useful when
> > dealing with the configure commands.
> 
> I think the if and select ideas are good but, being that I live in the
> much smaller (pun intended) world of the embedded book, I'm not sure
> they're really needed.  Maybe in the regular book they'd be a godsend,
> I don't know.
I'm thinking of leaving it out and if its a feature we want in the
future. It wont be that hard to add. 
> 
> Right now, for example, there'd be a block for each different type of
> configure to be used.  That's pretty easy to understand and read, in
> the extreme case each different arch (with and without multilib) gets
> its own block of configure.  That could mean a lot of different
> configure blocks but it would be easy to understand which configure
> block goes with which arch and comparing rendered output to bare XML
> is easy.  Brining the select in might make things require less text
> (only have one configure block) but I get the impression it would be
> less readable (cause there could be selects all over the place).

Yea, I can kinda agree with this. One thing that I was just thinking
would really help is having the ability to show a block on all but a
specific arch. So, lets say something like this.

<c:command c:multilib="true" c:arch="!x86_64" />
<c:command c:multilib="true" c:arch="x86_64" />

Right now the filter is a positive filter only, there's no way to negate
a condition. Having that ability would certainly simplify things a lot
for when there's a command only for a specific architecture. thoughts?

-- 
Joe Ciccone




More information about the Clfs-dev mailing list