1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-07-31 19:30:21 +02:00

[3.1.0] Add support for deprecated and version in configdoc

- Hide deprecated elements from ToC
- %HTML.Doctype takes null instead of empty string; this shouldn't affect anyone

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1666 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2008-04-22 02:19:40 +00:00
parent 949f605857
commit 39be09ee14
12 changed files with 47 additions and 24 deletions

View File

@@ -22,3 +22,6 @@ h2 {border-bottom:1px solid #CCC; font-family:sans-serif; font-weight:normal;
font-size:1.3em;}
h3 {font-family:sans-serif; font-size:1.1em; font-weight:bold; }
h4 {font-family:sans-serif; font-size:0.9em; font-weight:bold; }
.deprecated {color: #CCC;}
.deprecated-notice {color: #000; text-align:center; margin-bottom: 1em;}

View File

@@ -48,7 +48,9 @@
</xsl:if>
</xsl:template>
<xsl:template match="directive" mode="toc">
<li><a href="#{@id}"><xsl:value-of select="name" /></a></li>
<xsl:if test="not(deprecated)">
<li><a href="#{@id}"><xsl:value-of select="name" /></a></li>
</xsl:if>
</xsl:template>
<xsl:template match="title" />
@@ -69,7 +71,15 @@
</xsl:template>
<xsl:template match="directive">
<xsl:apply-templates />
<div>
<xsl:attribute name="class">
directive
<xsl:if test="deprecated">
deprecated
</xsl:if>
</xsl:attribute>
<xsl:apply-templates />
</div>
</xsl:template>
<xsl:template match="directive/name">
<xsl:apply-templates select="../aliases/alias" mode="anchor" />
@@ -106,7 +116,19 @@
<xsl:copy-of xmlns:xhtml="http://www.w3.org/1999/xhtml" select="xhtml:div/node()" />
</div>
</xsl:template>
<xsl:template match="directive/deprecated">
<div class="deprecated-notice">
This directive was deprecated in version <xsl:value-of select="version" />.
<a href="#{use}">%<xsl:value-of select="use" /></a> should be used instead.
</div>
</xsl:template>
<xsl:template match="constraints/version">
<tr>
<th>Version:</th>
<td><xsl:value-of select="." /></td>
</tr>
</xsl:template>
<xsl:template match="constraints/type">
<tr>
<th>Type:</th>