|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Searching the last element
> > I tried the followoing to add a star "*" at the end of the > text from the last p-element: > > <xsl:template match="p"> > <p><xsl:apply-templates/> > <xsl:if test="/text/p[position()=last()]"> > <xsl:text> *</xsl:text> > </xsl:if> > </p> > </xsl:template> > > But I get -- surprise, surprise -- a star beyond every > paragraph. Can anybody point me in the right direction? > Since your test uses an absolute path expression (one starting with "/") it should be pretty obviuos that it gives the same result for each "p" element. Try test="following-sibling::p" Michael Kay Software AG home: Michael.H.Kay@xxxxxxxxxxxx work: Michael.Kay@xxxxxxxxxxxxxx XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








