Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4543038
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T15:28:30+00:00 2026-05-21T15:28:30+00:00

Coming from a Linux distribution and having copy/pasted from a number of examples across

  • 0

Coming from a Linux distribution and having copy/pasted from a number of examples across the net, I am doing the following to include DocBook style in my XSL files (processed with xsltproc):

<?xml version='1.0'?> 
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> 
<xsl:import href="/usr/share/xml/docbook/stylesheet/nwalsh/html/docbook.xsl"/>
...

This works great as long as “docbook.xsl” is at the specified place. Of course, it is not always. E.g., on Mac OSX with MacPorts, it needs to be:

<?xml version='1.0'?> 
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> 
<xsl:import href="/opt/local/share/xsl/docbook-xsl/html/docbook.xsl"/>
...

A totally different path. I’ve looked through the net to see whether a “file exists” functionality exists for XSL (apparently not yet) or whether conditional includes are possible (apparently not).

So, short of having to dynamically create the XSL depending on where the “docbook.xsl” really is (I would probably do that via a Makefile), are there any other possibilities to have the file imported from the correct location without too much hassle?

Edit / Answer:
Dimitre pointed the right way, and after reading a bit there and in the general catalog files on my systems, the short answer to the specific problem is to use:

<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl"/>

Case closed, problem solved. And writing own catalogs is postponed to another time 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T15:28:31+00:00Added an answer on May 21, 2026 at 3:28 pm

    So, short of having to dynamically
    create the XSL depending on where the
    “docbook.xsl” really is (I would
    probably to that via a Makefile), are
    there any other possibilities to have
    the file imported from the correct
    location without too much hassle?

    XML catalogs are intended to solve this problem (among others).

    Read more here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm a linux newbie coming from a Windows background and I am trying to
Coming from C++ to Java, the obvious unanswered question is why didn't Java include
I am getting following exception while running BIRT from a Linux OS. Caused by:
I'm completey new to Solaris, coming from a Linux background. I would like to
Trying to learn ASP MVC coming from Linux/LAMP background (in other words I'm a
I'm coming from a Linux background, but I'd like to provide a version of
I was contemplating switching to Linux for C++ development, coming from a Windows environment.
I'm coming from Linux, and I want to try to learn some C# development.
Coming from Windows background here. Is it an acceptable practice for GUI Linux applications
I am porting some code from linux to windows and am coming up with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.