|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] How to avoid careless mistakes when using XSLT modes?
I just spent too much time completely puzzled about why a particular template
was not producing correct/expected output before realizing that in many cases
the template was not matching anything -- because some time ago I had added a
mode to certain instances of <xsl:template> and <xsl:apply-templates> without
being sure to adjust other templates in the stylesheet.
Adding mode="#all" to my failing template fixed the problem. Obviously one could prevent many such problems by checking for the existence of @mode in a stylesheet before working with it. Remembering always to do that is the problem. Any other suggestions? (I guess one could make a habit of adding an <xsl:message> to the template matching the root to warn that the template is using modes.) David -- David Sewell Manager of Digital Initiatives The University of Virginia Press Email: dsewell@xxxxxxxxxxxx Tel: +1 434 924 9973 Web: http://www.upress.virginia.edu/rotunda
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








