DocBook: Pass DocBook-Path to Stylesheet

Discussion in 'XML' started by tthunder@gmx.de, Nov 26, 2007.

  1. Guest

    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
     
    , Nov 26, 2007
    #1
    1. Advertising

  2. wrote:
    > 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...




    --
    Joe Kesselman / Beware the fury of a patient man. -- John Dryden
     
    Joseph Kesselman, Nov 27, 2007
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?ISO-8859-1?Q?J=F8rn_Tommy_Kinder=E5s?=

    Stylesheet referanse i stylesheet

    =?ISO-8859-1?Q?J=F8rn_Tommy_Kinder=E5s?=, Jul 3, 2004, in forum: XML
    Replies:
    3
    Views:
    616
    =?ISO-8859-1?Q?J=F8rn_Tommy_Kinder=E5s?=
    Jul 4, 2004
  2. Antonio Amato
    Replies:
    2
    Views:
    1,336
    Michael Wiedmann
    Nov 18, 2004
  3. Steven An
    Replies:
    1
    Views:
    541
    Martin Honnen
    Nov 23, 2004
  4. Daniel Meilleur

    docbook customization stylesheet

    Daniel Meilleur, May 19, 2005, in forum: XML
    Replies:
    1
    Views:
    585
    Michael Wiedmann
    May 20, 2005
  5. Jim Cain
    Replies:
    0
    Views:
    128
    Jim Cain
    Jul 11, 2003
Loading...

Share This Page