Subject: Re: [xsl] best practices for managing xsl library|
From: James Fuller <jim.fuller@xxxxxxxxxxxxxx>
Date: Tue, 03 Jan 2006 07:46:18 +0100
Chris Johnson wrote: > Hi, > > 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? I think all the XSLT STD Lib suggestions are fine to adopt. btw which version of XSLT > XSLT 1.0 or 2.0 ? Do you intend the library to be consumed or contributed too by public users, if so striking the balance between the ease of 'submission' versus completeness (re doc, tests, etc) can be quite tricky. Handling versioning is another issue, would suggest to export versions from source control with unique version number, rather then try to embed and track changes by embedding revision type elements. Do you intend to auto generate documentation from the library? If so you may find embedding doc type elements directly inside xslt to be more useful then have a seperate meta data document. Who are your main users? for example with EXSLT we identified XSLT processors implementators as a main user so they could use the doc. I personally advise adopting concrete conventions only when they are clearly enforceable (perhaps via a schema, schematron, etc), note that most matters of style can usually be fixed at the submission/integration process Also I would first setup various testing harnesses so you are able to automate test running (be it xslt style unit tests, or simple transforms with input and expected output); it is important to be able to run tests against all major processors, I use Ant for this....you may find that this influences how you design your distro. gl, Jim Fuller note: DocBook has a considerable number of XSLT stylesheets as well and lots of good advice embedded in it.