DocBook: Pass DocBook-Path to Stylesheet

T

tthunder

Hi @all,

I have a very simple use case here, but I cannot get any answer.

I want to publish/provide a customized XSL Stylesheet for DocBook
Users. The stylesheet defines variables for the DocBook Stylesheets,
e.g.

<xsl:variable name="html.stylesheet.type">text/css</xsl:variable>
<xsl:variable name="html.stylesheet" select="mystyle.css'"></
xsl:variable>

and customizes a little bit.

My stylesheet must include the official DocBook XSL Stylesheets. Very
simple:

<xsl:import href="SOME_PATH/docbook/fo/docbook.xsl"/>

You can see the problem here! SOME_PATH is different for each user,
and I don't want the user to edit the file. What to do? Environment
variables don't work, Param, Variables cannot be used within import. I
think, that there is no preprocessor for XSL? etc.

Is there any feasible way?

Thanks in advance!
Kirsten
 
J

Joseph Kesselman

there is no preprocessor for XSL?

Sure there is, if you want it: Stylesheets are XML, so you can use XSLT
to style them. I published a two-part article on DeveloperWorks which
used that idea to develop a stylesheet debugging mechanism; you could
use the same approach to preconfigure this import.

Or, in some XSLT processors, you could use a single URI but plug in a
Resolver which replaces that URI with one more appropriate for that user.

Or you could put the stylesheet on the web somewhere (if it isn't
already there) and point the import at that.

Or...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top