Author: kkolinko Date: Sat Dec 6 20:51:19 2014 New Revision: 1643613 URL: http://svn.apache.org/r1643613 Log: Align algorithm that generates anchor names in Tomcat documentation with Tomcat 6/7/8/9 - Simplify an XPath expression. - Change algorithm for generation of unambiguous anchor names.
For current Tomcat site this does not change anything in generated documentation. Port of r1643611. Modified: tomcat/site/trunk/xdocs/stylesheets/tomcat-site.xsl Modified: tomcat/site/trunk/xdocs/stylesheets/tomcat-site.xsl URL: http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/stylesheets/tomcat-site.xsl?rev=1643613&r1=1643612&r2=1643613&view=diff ============================================================================== --- tomcat/site/trunk/xdocs/stylesheets/tomcat-site.xsl (original) +++ tomcat/site/trunk/xdocs/stylesheets/tomcat-site.xsl Sat Dec 6 20:51:19 2014 @@ -224,9 +224,9 @@ </xsl:when> <xsl:otherwise> <xsl:if test=" - count(//*[(local-name()='section' or local-name()='subsection') and @name=current()/@name]) > 1 + count(//*[self::section or self::subsection][@name=current()/@name]) > 1 "> - <xsl:value-of select="concat(ancestor::section/@name, '/')"/> + <xsl:value-of select="concat(parent::*[self::section or self::subsection]/@name, '/')"/> </xsl:if> <xsl:value-of select="@name"/> </xsl:otherwise> @@ -264,10 +264,10 @@ <xsl:value-of select="@anchor" /> </xsl:when> <xsl:otherwise> - <xsl:if test="local-name()='subsection' and - count(//*[(local-name()='section' or local-name()='subsection') and @name=current()/@name]) > 1 + <xsl:if test="local-name()='subsection' and + count(//*[self::section or self::subsection][@name=current()/@name]) > 1 "> - <xsl:value-of select="concat(ancestor::section/@name, '/')"/> + <xsl:value-of select="concat(parent::*[self::section or self::subsection]/@name, '/')"/> </xsl:if> <xsl:value-of select="@name"/> </xsl:otherwise> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org