[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: On the promotion and demotion of information items (was Re
On Thursday 06 March 2003 12:23, Dare Obasanjo wrote: > I'm curious. Have you ever seen a machine.config file? If so I'd like to > know why you think config file comments should be placed in an attribute > simply because you seem to have some aversion to using certain aspects of > XML. I take it you've not read the thread then - the original post had a sample of one. I didn't say comments should be placed in attributes, either. I said that metadata should be in attributes. And in the given example, the XML comment syntax was being used to contain something that wasn't a comment; it didn't seem to explain anything. It just looked like extra metadata. > I can't imagine anything uglier than putting a multiline comment into an > attribute simply to satisfy some perverse need to not use XML comments. Ah, but there's a facility in XML to put character data inbetween elements as well as in attributes. You may be surprised to find that various XML vocabularies use *this* facility rather than comments to store lengthy metadata. The XML comment syntax is called that because it's meant for comments. This is a comment: "Added by ABS to fix bug 239" or: "This section needs rewriting" or: "Here we provide the configuration information for component X" But the posted machine.config XML was using comments, generated by a piece of software that weren't even readable English. They contained machine-parseable data, and because of this, somebody was already contemplating writing software that processed them. The useful information stored in those comments, therefore, shouldn't have been in comments. If you want them in auto-generated comments at all, then it should also be in an attribute, I think: <!-- Configuration information for application XXX --> <Config app="XXX" ... Note that I am not suggesting the likes of: <Config comment="Configuration information for..."> ...as you seem to be implying I am :-) ABS -- A city is like a large, complex, rabbit - ARP
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|