[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: xlink implementation

Subject: Re: xlink implementation
From: Peter Davis <pdavis152@xxxxxxxxx>
Date: Wed, 20 Feb 2002 11:53:34 -0800
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.