RE: Using HTML profiling breaks olinks and HTML navigation

From
Jeff Powanda <>
Date
2007-08-02T15:55:55+00:00
ID
Thread
RE: Using HTML profiling breaks olinks and HTML navigation
Thanks, Bob. I set the $target.database.document to a full path and
that fixed the olink problem.

 

I also followed your steps for chunking customization, and that fixed
the HTML navigation problem.

 

BTW, I posted an earlier question about using profiling with the
Eclipse Help stylesheet but didn’t receive a response. Is it possible to get
profiling to work for Eclipse Help output?

 

Regards,

Jeff Powanda

 

Subject:
Re: [docbook-apps] Using HTML profiling
breaks olinks and HTML navigation

 
From:
     "Bob Stayton"
     <> 

 
To: "Jeff
     Powanda" <>, <>
     

 
Date: Wed, 1 Aug 2007
     12:03:29 -0700 

 size=2 width="100%"
align=center>

 

  
  
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

  

  
 

 

 

From: Jeff Powanda 

Sent: Wednesday, August 01, 2007
11:08 AM

To: ''

Subject: 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:

 
DocBook 4.5 XSL 1.7.2

 
FOP 0.93

 
xsltproc

 

Thanks in advance for your help.

 

Regards,

Jeff Powanda