[thelist] XSL position()=last() adding ID to div

Greg user at example.net
Mon Aug 28 01:23:58 CDT 2006


I'm testing for the last element, then adding ID to that last div.

<xsl:choose>
    <xsl:when test="position()=last()">
        <div id="lastwrap" class="content">
            <xsl:apply-templates/>
        </div>
    </xsl:when>
    <xsl:otherwise>
        <div class="content">
            <xsl:apply-templates/>
        </div>
    </xsl:otherwise>
</xsl:choose>

If I transform the xml to html file all is well.

But if I browse the xml file, that last id is missing from the 
interpreted file.
Frustrating to a newbie, any clues?

(Oh, I'm using XmlSpy)





More information about the thelist mailing list