[xsl] Re: Re: Method for delimiting template results

Subject: [xsl] Re: Re: Method for delimiting template results
From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx>
Date: Wed, 5 Mar 2003 23:38:01 +0100
"Ted Stresen-Reuter" <tedmasterweb@xxxxxxx> wrote in message
> Thanks for the reply. Upon reflection, I realized that I had the
> solution and then saw your email. However, I also realized that this
> particular solution won't work if my checkbox elements are inside of a
> TABLE element (and they are) because the context for the position() and
> last() is the enclosing TD element.
> Any suggestions on how I can "globalize" the context short of doing two
> passes on the xml source (to reduce it to, say, just the FORM element)?

Let's say you have the following source.xml:

      <input type="checkbox" name="first"/>
      <input type="checkbox" name="second"/>
      <input type="checkbox" name="third"/>

Then you can use the same transformation, with only the following change:


       <xsl:if test="not(position() = last())">,</xsl:if>




Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread