Next in thread → Next in month →

Re: [docbook-apps] an expression / a parameter within <xsl:include href='$xxx'/> not allowed?

From
Bob Stayton <>
Date
2006-11-07T17:03:38+00:00
ID
002f01c7028e$9b8b55c0$6400a8c0@totoro
Thread
Re: [docbook-apps] an expression / a parameter within <xsl:include href='$xxx'/> not allowed?
We all wish that you could put variable references 
in the href value for xsl:include, but alas, it is not allowed.  The 
basic problem is that all includes are processed before any variables are 
processed, so your variable will have no value.

 

One way to achieve selection at runtime is to use 
XML catalogs to map a fixed href (no variables) to a location. Then you can 
select a different catalog at runtime to choose a different 
location.

 

Bob Stayton
Sagehill Enterprises
DocBook Consulting


 

 

  
----- Original Message ----- 

  
From: 
   

  
To:  
  

  
Sent: Monday, November 06, 2006 12:06 
  PM

  
Subject: [docbook-apps] an expression / a 
  parameter within <xsl:include href='$xxx'/> not allowed?

  

  

  

  
Hi,

  
 

  
until now I used 
  

  
 

  
      
  <xsl:include 
  href="../temp/titlepageFO.xsl"/>

  
 

  
and 
  it worked fine. As I generalize my scripts from now on I have to use an 
  expression 

  
to 
  build the href value. 

  
 

  
My 
  understanding of the XLS specification is, that expressions are allowed within 
  an href 
  attribute.

  
 

  
I 
  tried

  
 

  
      
  <xsl:include 
  href="$baseDir/temp/titlepageFO.xsl"/>

  
      
  <xsl:include 
  href="{$baseDir/temp/titlepageFO.xsl}"/>

  
      
  <xsl:include 
  href="{$baseDir}/temp/titlepageFO.xsl"/>

  
 

  
but 
  none of these variants works nor with XALAN neither with SAXON. (The $baseDir parameter works surely, because it delivers the 
  right value in another expression).

  
 

  
Has 
  anybody an idea?

  
 

  
Best 
  Regards

  
 

  
Joerg 
  Moebius
Next in thread → Next in month →