[Clfs-dev] Simplification of the XML

Andrew Bradford bradfa at gmail.com
Sat Apr 30 07:45:02 PDT 2011


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.

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

-Andrew



More information about the Clfs-dev mailing list