...
Code Block | ||
---|---|---|
| ||
<?xml version='1.0' encoding='iso-8859-1' ?> <xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" version = "1.0"> ... <xsl:template match="/scheduler_event"> ... <xsl <xsl:copy-of select="mail/body/* [ not(text) and not (//file) ]" /> <xsl:for-each select="mail/body/file" > <xsl:if test="file[ not(contains(@path, '.log'))"> <xsl:element name="{name()}"> <xsl:copy-of select="@*" ]" /> <xsl:attribute name="mail_filename"> <xsl:value-of select="$filename" /> </xsl:attribute> </xsl:element> </xsl:if> </xsl:for-each> ... </xsl:template> < </xsl:stylesheet> |
The attribute @mail_filename is used to determine the name of the attached file. If this attribute is missing, @path will be used. In this example files with the extension .log are excluded from mail delivery.