[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: axis for self and 2 following siblings
Hi Xiaocun, > I currently have the following in one of my > template, basically processes the self and the 2 > following sibling cells with the same template: > > <xsl:apply-templates select="." > mode="InlineAttachment"/> > <xsl:apply-templates > select="following-sibling::cell[@column=current()/@column+1]" > mode="InlineAttachment"/> > <xsl:apply-templates > select="following-sibling::cell[@column=current()/@column+2]" > mode="InlineAttachment"/> > > Is there a more elegent way to group them use axis and > process them via xsl:for-each? You can combine these three apply-templates into one: <xsl:apply-templates select=". | following-sibling::cell [@column=current()/@column+1 or @column=current()/@column+2]" mode="InlineAttachment"/> You could use positional predicates instead if you wanted, from the sounds of it. Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/ 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
|