[asterisk-users] Using XML for configuration management, single-source-of-truth, etc.

Martin Smith martins at bebr.ufl.edu
Sun Dec 9 13:31:30 CST 2007


Please understand that I was not making an argument for using XML
configuration files. I was only pointing out that includes are possible.
I'm just trying to keep the discussion to the facts we know :).

I'd argue that if you're editing XML by hand (in the console or a GUI),
you're doing something wrong. XML is to data, what Java is to program
code, for me. I'm sure you can find many XML editors (console and GUI)
that will never show you brackets or comments in the format you're
complaining about. I wouldn't write Java source in nano either... but
that doesn't mean JVM bytecode sucks.

Martin Smith, Systems Developer
martins at bebr.ufl.edu
Bureau of Economic and Business Research
University of Florida
(352) 392-0171 Ext. 221 

 

> -----Original Message-----
> From: asterisk-users-bounces at lists.digium.com 
> [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of 
> Tzafrir Cohen
> Sent: Sunday, December 09, 2007 2:21 PM
> To: asterisk-users at lists.digium.com
> Subject: Re: [asterisk-users] Using XML for configuration 
> management,single-source-of-truth, etc.
> 
> On Sun, Dec 09, 2007 at 01:48:58PM -0500, Martin Smith wrote:
> > > Try to implement '#include' and '#exec' in a sane way with XML.
> > > You can't just include one valid XML in another. You have 
> to make a
> > > partial XML. And apitting it out is usually way more complicated.
> > > 
> > > Furthermore, there is the issue of partial processing: do 
> you opt for
> > > one big XML file? Or continue with one XML file per .conf file?
> > > 
> > 
> > I'm pretty sure you can include one valid XML entity in 
> another. This
> > functionality exists in SGML as well. I've seen it done 
> both with parser
> > support and also simply defining your own &entity; (you can 
> define an
> > entity in place or in another file somewhere else), which 
> is relatively
> > easily, and then referring to that entity elsewhere in your 
> document. I
> > found a nice IBM reference to using entities at
> > http://www.ibm.com/developerworks/xml/library/x-tipgentity.html.
> > 
> 
> http://jabberd.jabberstudio.org/2/docs/jabberd_guide.html#4_4
> 
> How long does it take to spot the broken XML tagging there? 
> (for a human
> eye)?
> 
> How many editor steps does it take to add the extra parameter 
> "foobar"?
> What happens if you accidentally terminate it with </fooba>?
> 
> How many editing steps does it take to add a comment? What happens if
> you delete to the end of the line end kill the end of the comment?
> 
> That scary config file is one of the reasons why I dislike jabberd.
> 
> XML is just too easy to get wrong. When you're parsing it - it's cool.
> When you're writing it: it's not. XML is just overly verbose.
> 
> 
> > In fact, I'd argue XML includes are more like the dialplan's idea of
> > inclusion when compared to includes in something like GCC.
> 
> So? I don't need dialplan include (which has its own runitme 
> overhead). 
> I need a dumb and simple include. Not some over-smart thing that will 
> not let me include two sections at once etc. 
> 
> -- 
>                Tzafrir Cohen
> icq#16849755              jabber:tzafrir.cohen at xorcom.com
> +972-50-7952406           mailto:tzafrir.cohen at xorcom.com
> http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir
> 
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
> 



More information about the asterisk-users mailing list