Date: Thu, 28 Mar 2024 15:49:52 +0000 (UTC) Message-ID: <2130220315.11601.1711640992280@change.sos-berlin.com> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_11600_443779979.1711640992280" ------=_Part_11600_443779979.1711640992280 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
from
<?xml= version=3D'1.0' encoding=3D'iso-8859-1' ?> <xsl:stylesheet xmlns:xsl =3D "http://www.w3.org/1999/XSL/Transform" ver= sion =3D "1.0"> =20 ... <xsl:template match=3D"/scheduler_event"> ... <xsl:copy-of select=3D"mail/body/* [ not( text ) ]" /> ... </xsl:template> </xsl:stylesheet>
to
<?xml= version=3D'1.0' encoding=3D'iso-8859-1' ?> <xsl:stylesheet xmlns:xsl =3D "http://www.w3.org/1999/XSL/Transform" ver= sion =3D "1.0"> =20 ... <xsl:template match=3D"/scheduler_event"> ... <xsl:copy-of select=3D"mail/body/* [ not(text) and not (//file) ]"= /> =20 <xsl:for-each select=3D"mail/body/file" > <xsl:variable name=3D'filename'> <xsl:choose> <xsl:when test=3D"contains(@path, '.log')"> <xsl:value-of select=3D"concat(substring-before(@path,'.lo= g'),'.txt')" /> </xsl:when> <xsl:otherwise> <xsl:value-of select=3D"@path" /> </xsl:otherwise> </xsl:choose> =20 </xsl:variable> <xsl:element name=3D"{name()}"> <xsl:copy-of select=3D"@*" /> <xsl:attribute name=3D"mail_filename"> <xsl:value-of select=3D"$filename" /> </xsl:attribute> </xsl:element> </xsl:for-each> ... </xsl:template> </xsl:stylesheet>
The attribute @mail_filename is for determine the name of the a= ttached file. If this attribute is missing, @path will be used. In= this example the extension .log is changed to '.txt''.