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

Re: Reusing and XPath expression

Subject: Re: Reusing and XPath expression
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Thu, 03 Mar 2011 13:05:16 +0100
Re:  Reusing and XPath expression
Jacobus Reyneke wrote:

In this example I resize the section titles in FO depending on the
depth of the title. Is there some way I can put the
"count(ancestor::*)" expression in one place and so re-use it in
different templates by 'calling' it? I cannot just make the expression
'global' because new values cannot be assigned to it.

'calling it' sounds as if you want to define a function, in XSLT 2.0 you can do that with xsl:function http://www.w3.org/TR/xslt20/#stylesheet-functions, in XSLT 1.0 some processors support an extension element for that functionality.


--

	Martin Honnen
	http://msmvps.com/blogs/martin_honnen/

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.