Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^4: Config Files Redux

by chromatic (Archbishop)
on Nov 26, 2006 at 07:04 UTC ( #586078=note: print w/replies, xml ) Need Help??


in reply to Re^3: Config Files Redux
in thread Config Files Redux

Pity that's not XML, though.

Worse, it means that everyone who edits the configuration file either forgoes validation or has to use an XML-aware editor. There goes scriptability and so many of the lovely Unix administration tools we've grown to love over the past few decades.

Replies are listed 'Best First'.
Re^5: Config Files Redux
by traveler (Parson) on Nov 26, 2006 at 15:55 UTC
    Pity that's not XML, though.
    It was in XML1.0 and is still widely used. I agree that XML Schema is the current way, but it is very, although more flexible and powerful. It can be used for the same things, though.

    There goes scriptability and so many of the lovely Unix administration tools we've grown to love over the past few decades.
    I'm not sure why. If we want the validation of, say, a DTD, then we need a (possibly) new tool for that. What validates crontab, for example? When I build a major app, I often build validation tools for the config files. I find it easier to use XML and a DTD than going through the difficulty of writing my own parsing and validating code.

    Yes, I do understand and agree that the application needs to validate all input. I just like the idea of an external tool to do the first pass.

      Your "XML" examples weren't even well-formed! That ought to lend no little credence to my claim that XML is not easy for humans to write.

      What validates crontab, for example?

      That would be crontab. If you were writing that program, you'd have to create code to process the arguments somehow anyway.

      I agree that an XML processor can check the well-formedness of a document, but I have severe doubts that it can check the semantics of the entire document for anything but trivial configurations, where each option is completely independent and, likely, idempotent.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://586078]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2021-10-23 02:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (86 votes). Check out past polls.

    Notices?