[asterisk-users] Using XML for configuration management, single-source-of-truth, etc.
Tzafrir Cohen
tzafrir.cohen at xorcom.com
Sun Dec 9 13:21:22 CST 2007
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
More information about the asterisk-users
mailing list