Commit 7d7048b3 authored by Christophe Jaillet's avatar Christophe Jaillet
Browse files

The XSLT Saxon engine warns about some "Ambiguous rule matches".

Use priority to remove the ambiguity.

The only rational for choosing "3" and "4" for these priorities, is that "4" is related to <h4> tags, and 3=4-1 for the previous level.

Tested with the actual Xalan XSL engine:
   ./build.sh all
with and without the change.
Outputs are exactly the same.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1842160 13f79535-47bb-0310-9956-ffa450edef68
parent 4bf94d38
Loading
Loading
Loading
Loading
+34 −2
Changes for docs/manual/style/xsl/common.xsl: 34 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -542,7 +542,7 @@ if (typeof(prettyPrint) !== 'undefined') {
<!-- ==================================================================== -->
<!-- handle subsections (lower level headings)                            -->
<!-- ==================================================================== -->
<xsl:template match="section/section">
<xsl:template match="section/section" priority="3">
<!-- Section heading -->
<h3>
    <xsl:choose>
@@ -567,7 +567,7 @@ if (typeof(prettyPrint) !== 'undefined') {
<!-- ==================================================================== -->
<!-- handle subsubsections (h4)                                           -->
<!-- ==================================================================== -->
<xsl:template match="section/section/section">
<xsl:template match="section/section/section" priority="4">
<!-- Section heading -->
<h4>
    <xsl:choose>
@@ -900,6 +900,31 @@ if (typeof(prettyPrint) !== 'undefined') {
        </xsl:variable>

        <xsl:choose>
        <!-- No link if within the block that describe the directive itself -->
        <xsl:when test="$in-modulesynopsis and normalize-space(.) = ../../name">
                <xsl:if test="@type='section'">&lt;</xsl:if>
                <xsl:value-of select="."/>
                <xsl:if test="@type='section'">&gt;</xsl:if>
                <xsl:message>Candidate (remove ref): <xsl:value-of select="."/></xsl:message>
        </xsl:when>
        <xsl:when test="$in-modulesynopsis and normalize-space(.) = ../../../name">
                <xsl:if test="@type='section'">&lt;</xsl:if>
                <xsl:value-of select="."/>
                <xsl:if test="@type='section'">&gt;</xsl:if>
                <xsl:message>Candidate (remove ref): <xsl:value-of select="."/></xsl:message>
        </xsl:when>
        <xsl:when test="$in-modulesynopsis and normalize-space(.) = ../../../../name">
                <xsl:if test="@type='section'">&lt;</xsl:if>
                <xsl:value-of select="."/>
                <xsl:if test="@type='section'">&gt;</xsl:if>
                <xsl:message>Candidate (remove ref): <xsl:value-of select="."/></xsl:message>
        </xsl:when>
        <xsl:when test="$in-modulesynopsis and normalize-space(.) = ../../../../../name">
                <xsl:if test="@type='section'">&lt;</xsl:if>
                <xsl:value-of select="."/>
                <xsl:if test="@type='section'">&gt;</xsl:if>
                <xsl:message>Candidate (REMOVE ref): <xsl:value-of select="."/></xsl:message>
        </xsl:when>
        <xsl:when test="$in-modulesynopsis and normalize-space(@module) = /modulesynopsis/name">
            <a href="#{$lowerdirective}">
                <xsl:if test="@type='section'">&lt;</xsl:if>
@@ -917,6 +942,13 @@ if (typeof(prettyPrint) !== 'undefined') {
        </xsl:choose>
    </xsl:when>

    <!-- Missing module reference -->
    <xsl:when test="$in-modulesynopsis and normalize-space(.) != ../../../name">
        <xsl:if test="@type='section'">&lt;</xsl:if>
        <xsl:value-of select="."/>
        <xsl:if test="@type='section'">&gt;</xsl:if>
        <xsl:message>Candidate (ADD ref): <xsl:value-of select="."/></xsl:message>
    </xsl:when>
    <xsl:otherwise>
        <xsl:if test="@type='section'">&lt;</xsl:if>
        <xsl:value-of select="."/>