[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Annotations in XSLT


Subject: Re: [xsl] Annotations in XSLT
From: Joern Nettingsmeier <nettings@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 05 Mar 2006 12:39:41 +0100

Jesper Tverskov wrote:
Hi list,

Could someone point me to some BEST PRACTICE examples of how to annotate an
XSLT stylesheet?

We can use the comment element, as I have done so far,
http://www.xmltraining.biz/xmltraining/prolog.xslt, but I am looking for
something similar to what we can do in XML Schema. Here we have the
xs:annotation element with xs:documentation and xs:appinfo as children.

the problem with <!-- --> comments is that you can't easily comment out code blocks for debugging, since nested comments are illegal.


for custom comments, you could use the "exclude-result-prefixes" attribute of <xsl:stylesheet/> and put all your comments in a separate namespace.

as to re-using an existing grammer as opposed to making up one on-the-fly, i would also be interested in recommendations from list members. is there something similar to javadoc that can extract documentation from xml files?


-- jvrn nettingsmeier

home://germany/45128 essen/lortzingstr. 11/
http://spunk.dnsalias.org
phone://+49/201/491621

if you are a free (as in "free speech") software developer
and you happen to be travelling near my home, drop me a line
and come round for a free (as in "free beer") beer. :-D


Current Thread
Keywords