xsl-list
[Top] [All Lists]

AW: commenting and documenting XSLT (small survey)

2004-07-08 03:49:02
Von: David Carlisle [mailto:davidc(_at_)nag(_dot_)co(_dot_)uk]
Betreff: Re: [xsl] commenting and documenting XSLT (small survey)

Both your suggested solutions used comments <!-- -->  but why do that?
XSLT allows (at the top level) any elements from any foreign namespace
so you can, for example, put xhtml comments there directly.
It's much easier to control.validate teh documentation if it is in the
XML element structure rather than all justhidden in a comment.

David


true, but comments in general (in any language) are not meant to be processed 
apart from documentation purposes and so at least in my opinion are reasonable 
to be used to comment code as they are used in other languages too. 
also otherwise XML comments are totally superfluous, are they not?

another reason to use <!-- --> comments is that in almost all editors they are 
highlighted (or better lowlighted...) so are much easier to recognize and 
differentiate from actual content.
using elements in another namespace (even a special doc namespace) would 
somehow pollute the content i think.

i guess an element as <annotation> in XML Schema is there for a purpose but 
probably not to make the Schema better maintainable which I think the main 
purpose comments in general are for.

chris


<Prev in Thread] Current Thread [Next in Thread>