Re: Lessons learnt

Far be it for me to tell you anything about XSLT, but in terms of knowing whether you’ve ignored some content in the input, what I often do with unfamiliar input content is to start my stylesheet with something like

<xsl:template match=”*”> <xsl:message terminate=”yes”> <xsl:text>element not handled: </xsl:text> <xsl:value-of select=”name()”/> </xsl:message> </xsl:template>

That way, if the stylesheet hits some input that I’ve forgotten about, it tells me about it. This assumes that you are using template pattern matching (apply-templates) rather than procedural logic in your stylesheets, but that is what I usually do.

Cheers, Tony.

Reply

The content of this field is kept private and will not be shown publicly.