[xsl] best practices for managing xsl library

Subject: [xsl] best practices for managing xsl library
From: Chris Johnson <cs.johnson@xxxxxxx>
Date: Mon, 02 Jan 2006 13:41:32 -0800

Apart from the EXLT submissions page (http://www.exslt.org/ submissions/) and the XSLT Standard Library (http:// xsltsl.sourceforge.net/#id1954663), are there any good resources / examples of best practices for managing a large library of xsl templates?

For example, from the XSLT Standard Library - Engineering Standards:

In order to maintain a high engineering standard, all modules and contributions to the xsltsl project must adhere to the following coding and documentation standards. Submissions which do not meet (or exceed) this standard will not be accepted.

* All stylesheets must be indented, with each level indented by two spaces. NB. a simple stylesheet could be used to enforce/fix this.
* Templates are named using a qualified name (QName). The namespace URI for the template's containing stylesheet is assigned as above.
* Parameters for templates should use sensible names. Where possible (or if in doubt), follow these conventions:
o A parameter containing a single node is named node. Where more than one parameter contains a single node, the suffix Node is appended to the parameter name, eg. referenceNode
o A parameter which potentially contains multiple nodes is named nodes. Where more than one parameter potentially contains multiple nodes, the suffix Nodes is appended to the parameter name, eg. copyNodes
o A parameter which contains a string value is named text.
* All templates in each stylesheet must be documented. A template is documented as a DocBook RefEntry.
* Every stylesheet must include a test suite. The test system is in the test subdirectory. See test/test.html for further details.




Chris Johnson

Current Thread