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

Re: Resolving xsl:import href on different base URIs

Subject: Re: Resolving xsl:import href on different base URIs
From: "Liam R. E. Quin liam@xxxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 4 Nov 2020 16:56:30 -0000
Re:  Resolving xsl:import href on different base URIs
On Tue, 2020-11-03 at 22:37 +0000, Martynas JuseviD
ius
martynas@xxxxxxxxxxxxx wrote:
> Hi,
> 
> I have a stylesheet that I want to deploy on different setups that
> have different base URIs. That impacts the relative URI of the
> imports
> of that stylesheet. For example, in one case
> 
> B B B  <xsl:import href="../../../xsl/bootstrap/2.3.2/layout.xsl"/>
> 
> and in the other case
> 
> B B B  <xsl:import
> href="../../../../static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.
> 3.2/layout.xsl"/>

In the first instance i'd consider seeing ifi could make the
environments closer,  and, if not, consder an external symbolic link.

Other alternatives include
* using a parameter (as Martin suggested) with _href="{ ....}"
* using an environoment variable, also with _href
  xsl:import _href="{ get-environment-
variable('PATHTOBOOTSTRAP')}/2.3.2/layout.xsl" />
or whatever (if you precompile the stylesheet, though, and deploy the
compiled bytecode, this probably won't help)

* using an XML Catalog
* using a wrapper stylesheet that calls fn:transform() on the real one,
after finding it.

Liam


-- 
Liam Quin,B https://www.delightfulcomputing.com/
Available for XML/Document/Information Architecture/XSLT/
XSL/XQuery/Web/Text Processing/A11Y training, work & consulting.
Barefoot Web-slave, antique illustrations: B http://www.fromoldbooks.org

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.