[TxMt] XSLT question (Context: Markdown)
Stefan Brantschen
sbr at acm.org
Mon May 22 09:23:04 UTC 2006
A slightly off-topic question regarding XSLT (I am extending the
XHTML-to-LateX template).
I have the following XHTML markup:
<div class="versionhistory">
<div class="version" v="v1.0" d="2006-05-04" a="SBR">Change
description v1.0</div>
<div class="version" v="v1.1" d="2006-05-05" a="SBR">Change
description v1.1</div>
<div class="version" v="v2.0" d="2006-05-06" a="SBR">Change
description v2.0</div>
</div>
and would like to read the value of attribute "d".
Now, with something like
<xsl:template name="get-version-date">
<xsl:param name="vers" />
<xsl:value-of select="//div[@class='version'][@v=$vers]" />
</xsl:template>
I can get easily the value of a specific "version div", such as the
string "Change description v1.0". But how do I write the select
statement to get "d" of a specific version instead? Or similarly,
what is the path to read the attribute "content" of a meta tag such as
<meta name="documentclass" content="wtdocument" />
with something like
<xsl:template name="get-meta-value">
<xsl:param name="tag-name" />
<xsl:value-of select="/html/head/meta[@name=$tag-name] (*???*)" />
</xsl:template>
Thanks for any help!
With regards
- Stefan
More information about the textmate
mailing list