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

0 8 0112358 at gmail.com
Mon Aug 28 14:06:29 CDT 2006


Not sure I follow what you mean when you say that you "browse the xml file."

If you're running the XSL snippet only when transforming to HTML, why
would anything be in the XML file?

On 8/28/06, Greg <user at example.net> wrote:
> 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)
>
>
> --
>
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !
>



More information about the thelist mailing list