[Clfs-dev] Simplification of the XML

Joe Ciccone jciccone at gmail.com
Sat Apr 30 07:24:51 PDT 2011


On Fri, 2011-04-29 at 07:02 -0400, Andrew Bradford wrote: 
> On Sun, Apr 24, 2011 at 2:29 PM, Joe Ciccone <jciccone at gmail.com> wrote:
> > We may have a problem
> > using an integrated editor with this format.
> 
> Not sure if this is what you're saying but I'm able to load the
> schema/clfs/0.1/rng/clfs.rnc file into emacs' nXML mode and get auto
> completion with C-enter.  It'll bring up a list of valid completions
> for the current spot that I'm at in the hierarchy.  For example, after
> the first c:para in the bash.xml example, typing "<c:" and hitting
> C-enter brings up choices of "c:command", "c:note", and "c:para" which
> should be the only valid things I can enter.
Good to know that there is an editor out there that can take advantage
of that. 
> 
> It'll also flag invalid syntax against the rnc schema in bold red.  It
> won't prevent you from saving an invalid file but it'll check the file
> against the schema in pretty much real time.
Good to know. 
> 
> > This I
> > want to move into a git sub-module so it can be shared with all of the
> > books.
> 
> That'd be awesome! :)
> 
> I looked through the clfs.rnc file quickly (I admit, I'm not well
> studied in schemas) but the meaning of the clfs.attrib.r attribute
> didn't jump right out at me.  You use it as c:r="p-bu" in the first
> part of <c:install> in both the c:para and c:command.  What's it
> doing?
r for reference. Before we used the os (operating system) profiling tag
in docbook to create a unique attribute that we would reference later on
and pull into a separate file with xi:include. I simply created an
attribute called r (reference).

see temp-system/common/bash.xml.

This would be me reading it aloud in my head.
c:r="p-bu" ~ clfs:reference = patch - branch update

> 
> I think this will be really handy.  A whole bunch of work I did
> recently on GCC for the embedded book will be much less complex with
> this new XML.  I like it!
That was my thinking when I came up with this.

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.

One thing that could change that would make the stylesheet infinitely
simpler would be to only allow the filtering attributes in a if or
select. but then the format wouldn't be as versatile either.

What do you think, worth spending the time on?

-- 
Joe Ciccone




More information about the Clfs-dev mailing list