[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


xml multiline comment
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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.