Next in thread → Next in month →

Re: [docbook-apps] Re: xsl:call-template: misplaced xsl:apply-imports

From
Bob Stayton <>
Date
2007-10-17T01:08:12+00:00
ID
038001c8105a$2298a7f0$6400a8c0@totoro
Thread
Re: [docbook-apps] Re: xsl:call-template: misplaced xsl:apply-imports
Yes, it does require copying the template to change it.  That is often the 
case in customization layers.  Did you take a look at calling the 
"simple.xlink" template instead?

Bob Stayton
Sagehill Enterprises
DocBook Consulting



----- Original Message ----- 
From: "Sam Steingold" <>
To: "Bob Stayton" <>
Cc: <>
Sent: Tuesday, October 16, 2007 5:36 PM
Subject: Re: [docbook-apps] Re: xsl:call-template: misplaced 
xsl:apply-imports


> Bob Stayton wrote:
>> Sorry, I lost the thread a bit there.  You could have your special 
>> "filename" template call the "link" template, but add a new parameter to 
>> express different behavior. Then you could customize the "link" template 
>> to accept the new parameter, and behave somewhat differently when it is 
>> set.
>>
>> <xsl:template match="filename[@role = 'module']">
>>  ...
>>  <xsl:call-template name="link">
>>    <xsl:with-param name="linkend" select="@path"/>
>>    <xsl:with-param name="caller">filename</xsl:with-param>
>>  </xsl:call-template>
>>  ...
>> </xsl:template>
>>
>> <xsl:template match="link" name="link">
>>  <xsl:param name="caller" select="''"/>
>>  ...
>>
>>  <xsl:choose>
>>    <xsl:when test="$caller = 'filename'">
>>    ...
>>
>
> but this would mean that I will have to copy the whole thing from 
> xref.xsl and edit it!
>
> Sam.
>
>
>
>
Next in thread → Next in month →