OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] On the promotion and demotion of information items (was Re

[ Lists Home | Date Index | Thread Index ]

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




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS