OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Are HTML chunk targets equivalent to XHTML chunk targets for olinking?


Hi. I'm generating webhelp output with Saxon and Xerces and I ran into a problem generating targets for olinks. I process my source document twice, once to generate the target database and then to produce the actual output. When I use the xhtml/chunk.xsl stylesheet to generate targets, the target database file includes a doctype declaration and problematic characters.

I see this has been discussed before and I tried just stripping out the doctype declaration as described here:

  http://www.mail-archive.com/docbook-apps@lists.oasis-open.org/msg10288.html

That stopped Saxon from complaining about the doctype in the target database but then it complained about some of the characters. I think they were quotation marks and apostrophes.

  [java] Olink error: could not open target database 'olink-map.xml'.
  [java] Error: unresolved olink: targetdoc/targetptr = 'foo/bar'.
  [java] Error on line 4 column 878 of file:/C:/targets.db:
  [java]   Error reported by XML parser: Invalid byte 3 of 3-byte UTF-8 sequence.

I decided to try to avoid generating the target database using the XHTML stylesheets and use the HTML stylesheet instead. I set up two stylesheets in my customization layer. One imports the HTML stylesheet for generating targets and the other imports the XHTML stylesheet for generating the actual webhelp output. Here are the two stylesheets. I had to strip out the <xsl:import> from webhelp.xsl to make this work.

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:import href=""http://docbook.sourceforge.net/release/xsl-ns/current/html/chunk.xsl" />
  <xsl:import href=""../webhelp-ns/xsl/webhelp.xsl"" />
  <xsl:import href=""my-webhelp-customizations.xsl"" />
</xsl:stylesheet>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:import href=""http://docbook.sourceforge.net/release/xsl-ns/current/xhtml/chunk.xsl" />
  <xsl:import href=""../webhelp-ns/xsl/webhelp.xsl"" />
  <xsl:import href=""my-webhelp-customizations.xsl"" />
</xsl:stylesheet>

There should not be any meaningful difference between the chunking and styling for the targets and for the actual output, right? I'm wondering whether I'm introducing inconsistency between the link targets and the actual content that the links will try to point to.

Thanks.

Peter Desjardins



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]