Umbraco - xslt variable into data attribute
"Attribute Value Templates" are your friend here
<p class="time" data-time="{current()/eventTime}">
Duration: <xsl:value-of select="current()/eventTime" /> hour(s)
</p>
The curly braces indicate that this is an Attribute Value Template, and so contains an expression to be evaluated.
Note that an alternate way would be to use the xsl:attribute element
<p class="time">
<xsl:attribute name="data-time">
<xsl:value-of select="current()/eventTime" />
</xsl:attribute>
Duration: <xsl:value-of select="current()/eventTime" /> hour(s)
</p>
This is not so elegant though. You would only really need to do it this way if wanted a dynamic attribute name.