[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Avoiding boneheaded mistakes in XSLT?
Hi,
On 12/29/2010 8:49 PM, Piet van Oostrum wrote: Michael Kay wrote: Another approach would be an XSLT that processes your XSLT and generates another one, which embeds diagnostic analytics. The new XSLT could even be an enhanced version of the old one. Something like: (input) <xsl:template match="book"> <xsl:value-of select="book[1]/author"/> </xsl:template> (output) <xsl:template match="book" xmlns:d="http://www.mulberrytech.com/xslt/diagnostic"> <xsl:value-of select="book[1]/author"/> <xsl:variable name="d:selected" select="book[1]/author"> <xsl:if test="empty($d:selected)"> <xsl:message>value-of path "book[1]/author" in template matching "book" selects nothing</xsl:message> </xsl:if> </xsl:template>
|
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
|