The move to custom XML

Gerard Beekmans gerard at linuxfromscratch.org
Thu May 22 14:50:59 PDT 2003


On May 22, 2003 02:50 pm, Matthias Benkmann wrote:
> I have written a script brace2xml that converts this to the standard
> notation. It even supports attributes by the way, e.g.

Download location?

> I have also developed a nice short-hand notation for XSLT, e.g.
>
> /* the following tags should appear in the output as tags */
> template{ match "br|h1|h2|h3|h4|h5|h6"  priority "-1"
>   copy{
>     for-each{ select "@*" copy }
>     apply-templates
>   }
> }
>
> template{ match "COPYRIGHT-NOTICE"
>   <p class="copyright">
>     apply-templates
>   </p>
> }
>
>
> This makes it look much more like a programming language (which it is
> after all).
> Again I've written a script (called pretty-xsl) that converts this to the
> standard notation.

Ok I'm totally unfamiliar with XSLT, so if that above is short-hand. What does 
"long-hand" look like?

I think your "brace" notation is a nice thing, but personally I think I'd 
better learn standard XSLT processing first before using that kind of stuff, 
just so I completely understand it.

I think we should start with developing the new XML structure first and deal 
with the processing of it afterwards. I'm not sure yet how to go about this 
yet, I'll need to sit down for a few hours and look into it real good. Right 
now I'm just gathering ideas from you guys so I have somewhere to start.

Btw the idea of not using attributes anywhere appeals to me. It's a bit of a 
pain with processing if you can't remember if you're dealing with attributed 
or tags, but if you are writing the XML similar problems exist. It'll be so 
much easier to use tags everywhere and stay away from attributes.

The idea of writing the book in one big file has some disadvantages such as 
finding the exact location of a section. Sure you can search for things like 
"Installing Bash" and you'll get there eventually but simply opening the file 
chapter05/bash.xml is more convenient. If we decide to stay with that way we 
shouldn't use entities anymore. Either using xincludes, or your own 
suggestion using that BUILD{sed} thing and that stylesheet rule. How would 
that look in normal XML though (the BUILD{sed} part) so I can get a clearer 
idea of what things can/will/should look like in XML.

-- 
Gerard Beekmans
http://linuxfromscratch.org

/* Linux Consultant --- OSDN / DevChannel *
 * Technical Writer --- CheapBytes        */

/* If Linux doesn't have the solution, you have the wrong problem */

-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-dev' in the subject header of the message



More information about the lfs-dev mailing list