This is the mail archive of the mailing list .

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [docbook-apps] jdk 1.5 and docbook xsl

Ok Jirka ... this workaround works fine. Hope that at some times the "with compiled stylesheet transformer" of JDK 1.5 will do the same work than the "with not compiled" and will enalbe a simple xsl:import of the docbook stylesheet. I will test regularly and let the list knows.

For those who wich to take this solution and that are chunking the HTML result file, there is one little thing to do to the XSL stylesheet because the "write extension" is not at the same place in the xalan.jar file (not in the rt.jar).

One, declare the extension in chunker.xsl (here, I use xmlns:xalanjaxpredirect) :

<xsl:stylesheet xmlns:xsl=""; xmlns:saxon=""; xmlns:xalanredirect="org.apache.xalan.xslt.extensions.Redirect" xmlns:xalanjaxpredirect="" xmlns:exsl=""; xmlns:doc=""; xmlns=""; version="1.1" exclude-result-prefixes="doc" extension-element-prefixes="saxon xalanredirect exsl xalanjaxpredirect">

Second change the xalan selector in the <xsl:template name="make-relative-filename">

<xsl:when test="element-available('xalanredirect:write') or element-available('xalanjaxpredirect:write') or element-available('xsl:result-document')">
<!-- Xalan doesn't make the chunks relative -->
<xsl:value-of select="concat($base.dir,$"/>

Then, add a new selector in the chunker itself :
<xsl:when test="element-available('xalanjaxpredirect:write')">
<!-- Xalan usewith jdk 1.5 -->
<xalanjaxpredirect:write file="{$filename}">
<xsl:copy-of select="$content"/>

Bob, should I submit this as a bug ? A RFE ?

Many thanks to all, pierre

At 23:46 30/01/2005, you wrote:
Pierre Attar wrote:

If you add interpretive Xalan into your classpath (or use standalone JAXP 1.3) and if you will change appropriate property which specifies TransformerFactory you should be able to use JDK 1.5 with DocBook stylesheets right now.

java -Djavax.xml.transform.TransformerFactory= ...

Ok but where doe this class comes from in the JDK 1.5 ? The only place where I found a TransformerFactoryImpl is in the rt.jar and it is under the package If I'm able to use, then I'm fully happy becaus it seems that this correspond to the non compiled Xalan processor... problem, exploring all JDK jar, I never found this class.

As I wrote earlier, you must put standalone Xalan or JAXP 1.3 into your classpath. JDK 1.5 comes with stripped down version of JAXP 1.3 where is only XLSTC not interpretive Xalan.

I think that grabbing JAXP 1.3 from

and placing xalan.jar from this download into classpath should work with JDK 1.5.

  Jirka Kosek     e-mail:
  Profesionální ¹kolení a poradenství v oblasti technologií XML.
     Podívejte se na ná¹ novì spu¹tìný web
       Podrobný pøehled ¹kolení

Pierre Attar (
Consultant en informatique documentaire XML
Consultant in Structured Document engineering

Projet "Mutualiser l'effort de montée en compétences sur XML"

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]