File Name ↓ | File Size ↓ | Date ↓ |
---|---|---|
Parent directory/ | - | - |
Condense.old.xsl | 1644 | 2000-Jan-05 19:31 |
Condense.xsl | 1734 | 2015-Oct-24 20:24 |
Description: Condense.xsl is a very short XSL document that will produce a likeness (I hesitate to say copy) of any XML-based document, minus its DTD and with entity references expanded (of course, since those things are not exposed in the XSLT/XPath data model), with the feature of having all comments and extraneous whitespace removed. This is intended to optimize long XSLT scripts that contain a lot of comments and indenting.
Depending on the type of parser used and the length of the source document, the initial parse time and the time required for the XSL processor to create and prepare to use the stylesheet tree before processing can be reduced by tens or hundreds of precious milliseconds. Note that it should have no effect on the time it takes to execute the instructions in the stylesheet.
My own informal testing indicates about a 20% improvement in parsing time when using a SAX parser to read a condensed stylesheet, as compared to a stylesheet with full comments and whitespace.
Condense.xsl is an XSL document that must be applied to a source tree with an XSLT processor. The XSLT processor must be compliant with the 8 Oct 1999 XSLT 1.0 W3C Proposed Recommendation or the 16 Nov 1999 XSLT 1.0 W3C Recommendation. It has been tested with James Clark's XT (19991105 version) and Michael Kay's SAXON (v5.4.1)