Hi Jeff,
Here is what is happening.  The stylesheet interprets a relative path in the 
stylesheet parameter $target.database.document as relative to the directory 
containing the document being processed.  The profile-chunk.xsl stylesheet runs 
the profiling step on your file and saves the result as a copy of your document 
in memory, before applying the formatting stylesheets to the profiled copy. But 
the in-memory document is not a file, and so it does not have base directory. 
So relative paths for olinkdb.xml cannot work.  

You have two choices:
a.  Use profile-chunk.xsl, and use a full path for target.database.document 
parameter.

b.  Use two-step profiling and a relative path, so the profiled version is a 
file that has a base directory.

The Next and Previous issue could be in the way you structure your 
customization layer.  Chunking customization requires a special setup, as 
described in:

http://www.sagehill.net/docbookxsl/ChunkingCustomization.html

Bob Stayton
Sagehill Enterprises
DocBook Consulting
[EMAIL PROTECTED]


  ----- Original Message ----- 
  From: Jeff Powanda 
  To: [email protected] 
  Sent: Wednesday, August 01, 2007 11:08 AM
  Subject: [docbook-apps] Using HTML profiling breaks olinks and HTML navigation


  I tried implementing support for conditionalized text in my documentation. I 
followed the instructions at http://www.sagehill.net/docbookxsl/Profiling.html 
and everything seemed to go smoothly. PDF output with conditionalized text 
works great.



  However, I encountered a few problems with HTML output.



  I would like chunked HTML output (several small files instead of one file), 
so I had been importing this stylesheet in my customization layer:



  <xsl:import href="../xsl/html/chunk.xsl"/>



  To use profiling (conditions), I imported this stylesheet instead:



  <xsl:import href="../xsl/html/profile-chunk.xsl"/>



  Since I'm using modular documents, I use olinks for cross-referencing. After 
I switched to using the profiling stylesheet, the olinks can't be resolved. I 
get errors like this:



  warning: failed to load external entity "olinkdb.xml"

  Olink error: could not open target database 'olinkdb.xml'.

  Error: unresolved olink: targetdoc/targetptr = 'bookid/topicid'.



  All of the olinks resolved fine before I switched to importing the profiling 
stylesheet. Also, HTML navigation (for example, Previous and Next links) is now 
missing from the HTML output. Again, it worked fine before I imported the 
profiling stylesheet.



  Has anyone encountered these problems?



  BTW, I'm using the following tools:

    a.. DocBook 4.5 XSL 1.7.2 
    b.. FOP 0.93 
    c.. xsltproc 


  Thanks in advance for your help.



  Regards,

  Jeff Powanda




Reply via email to