This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: standard method of documenting XSLT code?


At 2002-04-24 10:54 -0500, Don Smith wrote:
>Anyone done anything with documenting XSLT code, perhaps like the
><documentation> element in W3C Schemas?

Since an XSLT document is an XML document, you can add any kind of 
documentation constructs you want in XML.

Here is an excerpt from page 139 of our book "Practical Transformation 
Using XSLT and XPath" (ISBN 1-894049-08-X), also found on page 145 of 
"Definitive XSLT and XPath" (ISBN 0-13-065196-6) that happens to be in the 
sample chapter 5 that is made available in total for evaluation:


===8<---
<?xml version="1.0"?><!--hellodoc.xsl-->
<!--XSLT 1.0 - http://www.CraneSoftwrights.com/training -->

<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
                version="1.0" exclude-result-prefixes="mydoc"
                xmlns:mydoc="http://www.mycompany.com/mydoc";>

<xsl:output method="html"/>

<mydoc:para>
The following construct is the root template.
</mydoc:para>

<xsl:template match="/">                         <!--root rule-->
...
===8<---


Using this convention you can have as rich or as simple documentation 
constructs as you wish.  There are no standardized constructs.

More information on the books is available from the top link of our home page.

I hope this helps.

................... Ken


--
Upcoming: 3-days XSLT/XPath and/or 2-days XSLFO: June 17-21, 2002
-       : 3-days XML Information Modeling: July 31-August 2, 2002

G. Ken Holman                mailto:gkholman@CraneSoftwrights.com
Crane Softwrights Ltd.         http://www.CraneSoftwrights.com/s/
Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (Fax:-0995)
ISBN 0-13-065196-6                      Definitive XSLT and XPath
ISBN 1-894049-08-X  Practical Transformation Using XSLT and XPath
ISBN 1-894049-07-1               Practical Formatting Using XSLFO
XSL/XML/DSSSL/SGML/OmniMark services, books(electronic, printed),
articles, training(instructor-live,Internet-live,web/CD,licensed)
Next public training:                  2002-05-06,07,09,10,13,20,
-                          06-04,07,10,11,13,14,17,20,07-31,08-05


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]