setComment (comment : string) : void

The method »setComment()« writes a .zip comment onto the file. The displaying of the comment can usually be set in the Zip program. It is often displayed when opening an archive.


The parameter »comment« requires the text of the .zip comment to be produced.


The following example demonstrates the production of a comment.

<xsl:stylesheet xmlns:xsl="" xmlns:b="" xmlns:zip="" xmlns:onion="" version="1.0">
<xsl:template match="/">
<xsl:variable name="zip" select="zip:create(0, 'off')" />
<xsl:value-of select="zip:setComment('I am a Comment!!')" />
<xsl:value-of select="zip:finish()" />
<b:output mimeType="application/zip">
<b:webResponse dispositionType="attachment" filename="" />

The method »setComment()« must be called directly after producing the .zip binary stream.

See also