[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: xlink implementation
On Wednesday 20 February 2002 07:14, Oleg Tkachenko wrote: > You can explicitly assign priority to a template, but I think more safe > and robust approach will be using modes: > > <xsl:template match="item[@xlink:type='simple']"> > <a href="{@xlink:href}"> > <xsl:apply-templates select="." mode="proccess-me-again"/> > </a> > </xsl:template> > > <xsl:template match="item" mode="proccess-me-again"> > ... > </xsl:template> Using modes will make the second template execute when the first template executes, and I think he wants to make the second template execute all the time. Try this: <xsl:template match="item[@xlink:type='simple']"> <a href="{@xlink:href}"> <xsl:call-template name="real-item"/> </a> </xsl:template> <xsl:template match="item" name="real-item"> ... </xsl:template> This way real-item is also executed for items that do not have @xlink:type='simple', but is still called by the first template. -- Peter Davis They took some of the Van Goghs, most of the jewels, and all of the Chivas! 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
|