Page 1 of 1

example using extensions with simple xml ??

Posted: Mon Feb 07, 2005 5:13 pm
by smouge
Hopefully someone can help me with the following:

I can not resize the columns of a table for html output or pdf output

I have installed Oxygen on Windows XP. Most probably the adjustColumnWidths is missing as specified in the table.xsl. However I have no clue how to do this.

It seems that xalan has a separate file or that the docsheets can have an extension directory etc.. I have tried several things bu without any results.

Therefore I kindly ask if can explain how to do this starting with a fresh install of Oxygen. After this which files have to be dowloaded and other changes like the classpath in the oxygen.ini file?

As an example I list to basic files I use as xml and as xsl file to transform to html.

If I use the xalan transformer, i get the folowing error:

docbook\xsl\html\table.xsl
Description: W No adjustColumnWidths function available.

If I use the saxon653 transformer I get the followinig error message:

SystemID: null
Description: E Processing terminated by xsl:message at line 404


Example files used:

test_dockbook.xsl

Code: Select all


<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
exclude-result-prefixes="doc"
version='1.0'>

<xsl:import href="file:docbook.xsl"/>

<xsl:output method="html"
encoding="ISO-8859-1"
indent="no"/>

<xsl:param name="use.extensions">1</xsl:param>
<xsl:param name="tablecolumns.extension">1</xsl:param>

</xsl:stylesheet>
test.xml

Code: Select all


<?xml version="1.0"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<book>
<title>Test document</title>
<chapter>
<title/>
<table>
<title>Test Table</title>
<tgroup cols="2">
<colspec colnum="1" colname="col1" colwidth="1*"/>
<colspec colnum="2" colname="col2" colwidth="1*"/>
<thead>
<row>
<entry>Item</entry>
<entry>Properties</entry>
</row>
</thead>
<tbody>
<row>
<entry>Definition</entry>
<entry>This is the definition </entry>
</row>
</tbody>
</tgroup>
</table>
</chapter>
</book>
[/code]

Posted: Tue Feb 08, 2005 2:14 pm
by sorin_ristache
Hello,

You have to set the path containing Docbook XSL 1.67.2 extension jar for Xalan or Saxon as oXygen additional classpath. The jars are located in the directory extensions of the Docbook XSL distribution. For example for the Saxon transformer you can do that by copying saxon653.jar to lib subdirectory of oXygen install directory and restarting oXygen or by copying saxon653.jar to ext directory of oXygen install directory, specifying something like

Code: Select all

Virtual Machine Parameters=-Xmx180m -Dcom.oxygenxml.additional.classpath=C:/Program%20Files/Oxygen%205.1/ext/saxon653.jar
in the file oxygen5.1.ini and restarting oXygen. If you use xalan replace saxon653.jar with xalan25.jar.

In a future version we will include the extension jars in the oXygen distribution kit.

Best Regards,
Sorin

Posted: Tue Feb 08, 2005 9:02 pm
by smouge
Many, many thanks!

That worked.

I was already struggling for half a day with different java jar's, classes etc and finally gave up.

Your explanation was al I needed. This way of quick responses on the forum adds a lot to the quality of the product.

Yes, would be a good idea to include the extensions in the oxygen kit