RE: [docbook-apps] Option to select an import statement

From
Eduard Tibet <>
Date
2011-12-07T09:37:48+00:00
ID
Thread
RE: [docbook-apps] Option to select an import statement
Dave,

In case of 2 imports in _one_ xsl file, I suggest you (user) can't select.

=================================================
"9. xsl:import, can it be made dynamic
	
David Carlisle

> That is to say, I need  the import to be dynamic.
xsl:import is a compile time include so it can't depend on the value of any expression."

[source: http://www.dpawson.co.uk/xsl/sect2/N4738.html#d5995e308]
=================================================

The only way, I suggest, is to use 2 stylesheets and choose the right one _before_ compiling time.

--
Best regards, 
 Eduard Tibet

-----Original Message-----
From: Xmplar [mailto:] 
Sent: Wednesday, December 07, 2011 12:17 PM
To: 
Subject: [docbook-apps] Option to select an import statement

In a customised stylesheet, I have two options to import a chunking stylesheet for HTML chunking:

    <xsl:import href="file:///c:/DocBook_xslns1-76/xhtml-1_1/onechunk.xsl" <file:///c:/DocBook_xslns1-76/xhtml-1_1/onechunk.xsl>  />
    <xsl:import href="file:///c:/DocBook_xslns1-76/xhtml-1_1/chunkfast.xsl" <file:///c:/DocBook_xslns1-76/xhtml-1_1/chunkfast.xsl>  />

How can I give users the option of selecting one import statement or the other, by using some sort of selection variable?
I know I can comment out either import statement, but is there a slicker way to do this with a simple "1" or "0" selection? 


-- 
Dave Gardiner