AW: [xsl] commenting and documenting XSLT (small survey)

Subject: AW: [xsl] commenting and documenting XSLT (small survey)
From: <christof.hoeke@xxxxxxx>
Date: Thu, 8 Jul 2004 12:49:02 +0200
> Von: David Carlisle [mailto:davidc@xxxxxxxxx]
> 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

Current Thread