DocBook: Pass DocBook-Path to Stylesheet

tthunder

Usenet Archive
Joined
Jun 15, 2005
Messages
34
Reaction score
0
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
 

Joseph Kesselman

Usenet Archive
Joined
Feb 3, 2006
Messages
733
Reaction score
0
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

Members online

No members online now.

Forum statistics

Threads
548,050
Messages
3,104,249
Members
248,133
Latest member
DujonT

Latest Threads

Top