Differences between oXygen XLS and Sourceforge version
Posted: Mon Oct 07, 2013 6:36 pm
I am evaluating oXygen, trying to switch my company's old documentation to one platform. We currently generate PDF from DocBook using Eclipse and a set of XSL stylesheets that are similar to the ones at http://sourceforge.net/projects/docbook/files/. I've noticed that the XSL files in oXygen are a bit different from the files on SourceForge. Both sets seem to be version 1.78.1. Is there a reason for this? I'm trying to figure out if I should be able to use the regular XSL stylesheets or if maybe oXygen needs some special tweaks. I'm getting errors when I try to use the existing stylesheets, but I can generate everything OK with the "DocBook PDF" transformation in oXygen. I'd like to be able to use the existing files (they were customized by someone who is no longer in the company), but I don't know if I'm doing something wrong or not, so I'm trying to eliminate all variables... I'm using DocBook 5 in case it matters (converted from 4.5 using oXygen.)
(Sorry if I'm asking something obvious, I've been working with DocBook for 2 weeks and with oXygen for 1.)
For example:
On Sourceforge, docbook.xsl contains the following line (same in my company's version):
But in oXygen, docbook.xsl has:
OR
Sourceforge and my company's version:
oXygen:
Thanks!
(Sorry if I'm asking something obvious, I've been working with DocBook for 2 weeks and with oXygen for 1.)
For example:
On Sourceforge, docbook.xsl contains the following line (same in my company's version):
Code: Select all
<xsl:include href="../common/stripns.xsl"/>
Code: Select all
<xsl:include href="../common/addns.xsl"/>
Sourceforge and my company's version:
Code: Select all
<xsl:choose>
<!-- Hack! If someone hands us a DocBook V5.x or DocBook NG document,
toss the namespace and continue. Use the docbook5 namespaced
stylesheets for DocBook5 if you don't want to use this feature.-->
<xsl:when test="$exsl.node.set.available != 0
and (*/self::ng:* or */self::db:*)">
<xsl:call-template name="log.message">
<xsl:with-param name="level">Note</xsl:with-param>
<xsl:with-param name="source" select="$doc.title"/>
<xsl:with-param name="context-desc">
<xsl:text>namesp. cut</xsl:text>
</xsl:with-param>
<xsl:with-param name="message">
<xsl:text>stripped namespace before processing</xsl:text>
</xsl:with-param>
</xsl:call-template>
<xsl:variable name="nons">
<xsl:apply-templates mode="stripNS"/>
</xsl:variable>
<xsl:call-template name="log.message">
<xsl:with-param name="level">Note</xsl:with-param>
<xsl:with-param name="source" select="$doc.title"/>
<xsl:with-param name="context-desc">
<xsl:text>namesp. cut</xsl:text>
</xsl:with-param>
<xsl:with-param name="message">
<xsl:text>processing stripped document</xsl:text>
</xsl:with-param>
</xsl:call-template>
<xsl:apply-templates select="exsl:node-set($nons)"/>
</xsl:when>
<!-- Can't process unless namespace removed -->
<xsl:when test="*/self::ng:* or */self::db:*">
<xsl:message terminate="yes">
<xsl:text>Unable to strip the namespace from DB5 document,</xsl:text>
<xsl:text> cannot proceed.</xsl:text>
</xsl:message>
</xsl:when>
Code: Select all
<xsl:choose>
<xsl:when test="namespace-uri(*[1]) != 'http://docbook.org/ns/docbook'">
<xsl:call-template name="log.message">
<xsl:with-param name="level">Note</xsl:with-param>
<xsl:with-param name="source"><xsl:call-template name="get.doc.title"/></xsl:with-param>
<xsl:with-param name="context-desc">
<xsl:text>namesp. add</xsl:text>
</xsl:with-param>
<xsl:with-param name="message">
<xsl:text>added namespace before processing</xsl:text>
</xsl:with-param>
</xsl:call-template>
<xsl:variable name="addns">
<xsl:apply-templates mode="addNS"/>
</xsl:variable>
<xsl:apply-templates select="exsl:node-set($addns)"/>
</xsl:when>
<!-- Can't process unless namespace removed -->
<xsl:when test="namespace-uri(*[1]) != 'http://docbook.org/ns/docbook'">
<xsl:call-template name="log.message">
<xsl:with-param name="level">Note</xsl:with-param>
<xsl:with-param name="source"><xsl:call-template name="get.doc.title"/></xsl:with-param>
<xsl:with-param name="context-desc">
<xsl:text>namesp. add</xsl:text>
</xsl:with-param>
<xsl:with-param name="message">
<xsl:text>added namespace before processing</xsl:text>
</xsl:with-param>
</xsl:call-template>
<xsl:variable name="addns">
<xsl:apply-templates mode="addNS"/>
</xsl:variable>
<xsl:apply-templates select="exsl:node-set($addns)"/>
</xsl:when>