Format property links like in CSS specs.
--- a/publish.xsl Wed May 09 20:55:23 2012 +0200
+++ b/publish.xsl Thu May 10 10:18:07 2012 +0200
@@ -955,7 +955,7 @@
</xsl:if>
</xsl:template>
- <xsl:template match='span[tokenize(@class, " ") = ("element-name", "attr-name", "prop-name") and starts-with(., "'") and ends-with(., "'")]'>
+ <xsl:template match='span[tokenize(@class, " ") = ("element-name", "attr-name", "property") and starts-with(., "'") and ends-with(., "'")]'>
<span>
<xsl:copy-of select='@*[namespace-uri() = ""]'/>
<xsl:value-of select='concat("‘", substring(., 2, string-length() - 2), "’")'/>
@@ -1517,7 +1517,7 @@
<xsl:choose>
<xsl:when test='$property'>
<a href='{$property/@href}'>
- <span class='prop-name'>
+ <span class='property'>
<xsl:value-of select='concat("‘", $name, "’")'/>
</span>
</a>
@@ -1563,7 +1563,7 @@
</xsl:choose>
</xsl:function>
- <xsl:function name='x:name-link' as='element()'>
+ <xsl:function name='x:name-link' as='node()*'>
<xsl:param name='name'/>
<xsl:param name='context-element'/>
<xsl:param name='referencing-element'/>
@@ -1580,9 +1580,14 @@
<xsl:message>Unknown name "<xsl:value-of select='$name'/>" at <xsl:value-of select="concat(base-uri($referencing-element), ' line ', saxon:line-number())"/>.</xsl:message>
<a href='data:,' style='background: red; color: white'>@@ unknown name '<xsl:value-of select='$name'/>'</a>
</xsl:when>
+ <xsl:when test='$property'>
+ <xsl:text>‘</xsl:text>
+ <a href='{$property/@href}'><code class='property'><xsl:value-of select='$name'/></code></a>
+ <xsl:text>’</xsl:text>
+ </xsl:when>
<xsl:otherwise>
<a href='{$all/@href}'>
- <span class='{if ($element) then "element" else if ($attribute) then "attr" else "prop"}-name'>
+ <span class='{if ($element) then "element-name" else "attr-name"}'>
<xsl:value-of select='concat("‘", $name, "’")'/>
</span>
</a>