[xep-support] Index Sort Problem (no index output produced when sort statement is used)

From: Chris Cosentino (ccosenti@cisco.com)
Date: Wed Feb 18 2004 - 10:58:56 PST

  • Next message: Nikolai Grigoriev: "Re: [xep-support] xep performance"

    Hi,

    I'm using XEP 3.7.1 Client.

    I'm experiencing some odd behavior with sort. I'm trying to sort an index.

    My index entries are set up like this in the XSLT:

    <xsl:template match="indexentry">
         <fo:wrapper id="{generate-id()}">
             <xsl:apply-templates/>
         </fo:wrapper>
    </xsl:template>

    My code to generate the index, unsorted, works fine:

    <xsl:template name="index">
    <fo:block>
    INDEX
    <xsl:for-each select="//indexentry">
             <fo:block font="11pt Times" space-before.optimum="6pt">
                 <fo:wrapper text-transform="lowercase">
                 <xsl:value-of select="."/>
                 <fo:leader leader-pattern="dots"/>
                 <fo:page-number-citation ref-id="{generate-id()}"/>
                 </fo:wrapper>
                 </fo:block>
             </xsl:for-each>
    </fo:block>
    </xsl:template>

    However, the following produces no output after "INDEX":

    <xsl:template name="index">
    <fo:block>
    INDEX
    <xsl:for-each select="//indexentry">
             <xsl:sort>
             <fo:block font="11pt Times" space-before.optimum="6pt">
                 <fo:wrapper text-transform="lowercase">
                 <xsl:value-of select="."/>
                 <fo:leader leader-pattern="dots"/>
                 <fo:page-number-citation ref-id="{generate-id()}"/>
                 </fo:wrapper>
                 </fo:block>
            </xsl:sort>
             </xsl:for-each>
    </fo:block>
    </xsl:template>

    No variation of the initial sort tag seems to work either (granted my
    select statements may be grasping at straws, but I tried EVERYTHING,
    several times):

    <xsl:sort select = ".">
    <xsl:sort select = "//indexentry">
    <xsl:sort select = "indexentry">
    <xsl:sort order-"descending">

    Any idea why absolutely no index is output when I put a sort statement in
    there, even the most basic sort with no options? Obviously I need to read
    up on XPath a little better for my select statements, but I still don't
    understand why nothing is output with even just a basic sort.

    Thanks,

    Chris Cosentino
    Cisco Systems, Inc.

    -------------------
    (*) To unsubscribe, send a message with words 'unsubscribe xep-support'
    in the body of the message to majordomo@renderx.com from the address
    you are subscribed from.
    (*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html



    This archive was generated by hypermail 2.1.5 : Wed Feb 18 2004 - 11:08:43 PST