RE: [xsl] xsl/xslt coding standard

Steve Ball wrote:
> I believe there are several different (what's the right word?)
> "components" or "parts" to an XSL stylesheet, each requiring
> a different kind or style of documentation.
>
> At the top-level is the stylesheet itself. What is the overall
> purpose of the stylesheet? What is the expected/required schema
> of the source document (if any)? What is(are) the outcome(s)
> of running the stylesheet? Is this stylesheet part of a modular
> stylesheet system, and if so how does it fit into that system?
>
> Templates may be named or unnamed (or both). I find that
> it is a bit difficult to pin down documentation requirements
> for unnamed templates, but doco for named templates can be
> more easily defined: what is the purpose of the template,
> what are the parameters, what is the return result?
>
> This is just for starters.
I'd go even further. What do you need to know when you pick up
the stylesheet 6 months after you wrote it.
1. Which source file class is it meant for?
2. Of the 3 versions, which one is current (versioning)
I often file file1.xsl file2.xsl file3.xsl
(then realise that 3 didn't work, hence its 2 that should be used).
3. What (if any) command line parameters are used.. and what for.
4. Named templates, what's the context.
5. Unnamed templates (usually nil needed, unless moded)
6. Why is mode='x' there?
7. What dependencies are there (includes imports, driver xml files)
8. Is output compliant to xxx schema?
9. Is this one of a suite to produce n output formats?
If so, what are the others called?
10. Named templates.
Parameters. blah blah blah
Treat as a java method
That's all that springs to mind immediately.
HTH DaveP.
-
NOTICE: The information contained in this email and any attachments is
confidential and may be legally privileged. If you are not the
intended recipient you are hereby notified that you must not use,
disclose, distribute, copy, print or rely on this email's content. If
you are not the intended recipient, please notify the sender
immediately and then delete the email and any attachments from your
system.
RNIB has made strenuous efforts to ensure that emails and any
attachments generated by its staff are free from viruses. However, it
cannot accept any responsibility for any viruses which are
transmitted. We therefore recommend you scan all attachments.
Please note that the statements and views expressed in this email
and any attachments are those of the author and do not necessarily
represent those of RNIB.
RNIB Registered Charity Number: 226227
Website: http://www.rnib.org.uk
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list