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

Re: Referring to stylesheet itself, possible in XSLT 1

Subject: Re: Referring to stylesheet itself, possible in XSLT 1.0, but how in XSLT 2.0?
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Tue, 17 Oct 2006 16:38:42 +0200
Re:  Referring to stylesheet itself
Andrew Welch wrote:

Instead of using xml:base why not just create a parameter $path and then modify all of your paths in the stylesheet to contain that parameter, eg:

<xsl:param name="path" select="'../../'" as="xs:string"/>

I had that before. But it won't work for <xsl:import> and the likes. So I still need separate ways for separate situations in the stylesheet. In other words, the DRY (don't repeat yourself) principle cannot hold here (but who said that xslt was pragmatic in the first place, but I like to think that way).


But I do use some special calculation on the paths for external files that need to be transformed. There was a previous thread about this, I believe on the Saxon list, where I also had some trouble doing a precise path calculation (I needed both relative and absolute path). But that is fixed now.

-- Abel

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.