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: RE: [docbook-apps] jdk 1.5 and docbook xsl


All of this is so strange ! I've tried to browse the rt.jar and it seems 
that Sun is no more using the interpretative xalan xslt ptrocessor but only 
the compiled xsltc: the onl TransformerFactoryImpl is under an xsltc 
package while a standard xalan distribution has two implementation of this 
class (one uner xsltc and one elsewhere).

So, shall we suppose that there is an error when the way compilation is 
made ? Strange only for an import ...

It seems that I need to return to xalan plus an endorsing mechanism.


Note that saxon 8 will not work just because the chunker is not yet managed.

If I try the minimal xsl:result-document in a parametrized chunker.xslt file

         <xsl:template name="write.chunk">
                 <xsl:choose>
                         .....
                         <xsl:when 
test="element-available('xalanredirect:write')">
                         <!-- Xalan uses xalanredirect -->
                                 <xalanredirect:write file="{$filename}">
                                         <xsl:copy-of select="$content"/>
                                 </xalanredirect:write>
                         </xsl:when>

                         <xsl:when 
test="element-available('xsl:result-document')">
                                 <xsl:result-document href="{$filename}">
                                         <xsl:copy-of select="$content"/>
                                 </xsl:result-document>
                         </xsl:when>
                         <xsl:otherwise>
                         .....
                 </xsl:choose>
         </xsl:template>


I got the following temporary tree error that I do not try today to deeply 
understand :

Warning: at xsl:when on line 216 of 
file:/T:/mutu-xml/bin/schemadoc/pgm/docbook-xsl/common/table.xsl:
   Less-than and greater-than comparisons between strings have changed 
since XPath 1.0
Writing file:/c:/temp/sampleSect.html for sect1(sampleSect)
Error at result-document on line 98 of 
file:/T:/mutu-xml/bin/schemadoc/pgm/db2html/sdchunker.xslt:
   Cannot switch to a final result destination while writing a temporary tree




; SystemID: file:/T:/mutu-xml/bin/schemadoc/pgm/db2html/sdchunker.xslt; 
Line#: 98; Column#: -1
javax.xml.transform.TransformerException: Cannot switch to a final result 
destination while writing a temporary tree
at net.sf.saxon.instruct.Instruction.dynamicError(Instruction.java:266)
at 
net.sf.saxon.instruct.Instruction.processChildrenLeavingTail(Instruction.java:226)
at 
net.sf.saxon.instruct.SequenceInstruction.processLeavingTail(SequenceInstruction.java:147)
at net.sf.saxon.instruct.Template.expand(Template.java:131)
at 
net.sf.saxon.instruct.CallTemplate$CallTemplatePackage.processLeavingTail(CallTemplate.java:223)
at net.sf.saxon.Controller.applyTemplates(Controller.java:272)
at net.sf.saxon.instruct.ApplyTemplates.apply(ApplyTemplates.java:86)
at net.sf.saxon.instruct.ApplyTemplates.process(ApplyTemplates.java:50)
at net.sf.saxon.instruct.Instruction.processChildren(Instruction.java:188)
at 
net.sf.saxon.instruct.ElementCreator.processLeavingTail(ElementCreator.java:178)
at 
net.sf.saxon.instruct.Instruction.processChildrenLeavingTail(Instruction.java:219)
at 
net.sf.saxon.instruct.SequenceInstruction.processLeavingTail(SequenceInstruction.java:147)
at net.sf.saxon.instruct.Template.processLeavingTail(Template.java:94)
at net.sf.saxon.instruct.Template.process(Template.java:69)
at net.sf.saxon.Controller.applyImports(Controller.java:367)
at net.sf.saxon.instruct.ApplyImports.processLeavingTail(ApplyImports.java:47)
at net.sf.saxon.instruct.Instruction.process(Instruction.java:168)
at net.sf.saxon.instruct.Instruction.processChildren(Instruction.java:188)
at net.sf.saxon.instruct.DocumentInstr.evaluateItem(DocumentInstr.java:179)
at net.sf.saxon.instruct.ExprInstruction.iterate(ExprInstruction.java:261)
at net.sf.saxon.expr.ExpressionTool.eagerEvaluate(ExpressionTool.java:136)
at net.sf.saxon.expr.ExpressionTool.lazyEvaluate(ExpressionTool.java:107)
at 
net.sf.saxon.instruct.GeneralVariable.getSelectValue(GeneralVariable.java:210)
at net.sf.saxon.instruct.Param.processLeavingTail(Param.java:65)
at 
net.sf.saxon.instruct.Instruction.processChildrenLeavingTail(Instruction.java:219)
at 
net.sf.saxon.instruct.SequenceInstruction.processLeavingTail(SequenceInstruction.java:147)
at net.sf.saxon.instruct.Template.expand(Template.java:131)
at 
net.sf.saxon.instruct.CallTemplate$CallTemplatePackage.processLeavingTail(CallTemplate.java:223)
at net.sf.saxon.Controller.applyTemplates(Controller.java:272)
at 
net.sf.saxon.instruct.ApplyTemplates$ApplyTemplatesPackage.processLeavingTail(ApplyTemplates.java:125)
at net.sf.saxon.Controller.applyTemplates(Controller.java:272)
at net.sf.saxon.Controller.defaultAction(Controller.java:318)
at net.sf.saxon.Controller.applyTemplates(Controller.java:285)
at net.sf.saxon.instruct.ApplyTemplates.apply(ApplyTemplates.java:86)
at 
net.sf.saxon.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.java:54)
at 
net.sf.saxon.instruct.Instruction.processChildrenLeavingTail(Instruction.java:219)
at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:88)
at net.sf.saxon.instruct.Choose.processLeavingTail(Choose.java:61)
at 
net.sf.saxon.instruct.Instruction.processChildrenLeavingTail(Instruction.java:219)
at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:88)
at net.sf.saxon.instruct.Choose.processLeavingTail(Choose.java:61)
at 
net.sf.saxon.instruct.Instruction.processChildrenLeavingTail(Instruction.java:219)
at 
net.sf.saxon.instruct.SequenceInstruction.processLeavingTail(SequenceInstruction.java:147)
at net.sf.saxon.instruct.Template.processLeavingTail(Template.java:94)
at net.sf.saxon.Controller.applyTemplates(Controller.java:293)
at net.sf.saxon.Controller.run(Controller.java:187)
at net.sf.saxon.Controller.transformDocument(Controller.java:1543)
at net.sf.saxon.Controller.transform(Controller.java:1349)
at 
fr.tireme.utilities.xml.xslt.ProcessFromCommandLine.main(ProcessFromCommandLine.java:124)

Regards, Pierre



  At 18:25 28/01/2005, Mauritz Jeanson wrote:
> > -----Original Message-----
> > From: Pierre Attar
>
> > From saxon command line (SAXON 6.5.3 from Michael Kay), it
> > works perfectly.
> >
>...
> >
> > So, it seems that it's a JDK problem. I also don't understand
> > translet problem and why my stylesheet is compiled.
> > Is it a new Xalan feature to always internally compile the
> > stylesheet ? I
> > really do not know.
>
>
>I think this is how it works: XSTLC ("Xalan-Java Compiling processor") is
>the default XSLT processor in the latest JDK (J2SE 5.0). That means that it
>is used when a transformation is invoked via the JAXP APIs, unless another
>processor has been explicitly specified. In previous versions of the JDK,
>the default XSLT processor was Xalan ("Xalan-Java Interpretive processor").
>
>http://java.sun.com/j2se/1.5.0/docs/guide/xml/jaxp/JAXP-Compatibility_150.ht
>ml#invokingXSLT
>
>The whole point of XSLTC is that it uses a compiled form of the stylesheet
>(a "translet"). Apparently, there are problems with compiling DocBook
>stylesheets. I don't know why.
>
>Maybe you can get more information from the xalan-dev list:
>http://xml.apache.org/mail.html#xalan-dev.
>
>
>/MJ


Pierre Attar (mailto:pat@tireme.fr)
Consultant en informatique documentaire XML
Consultant in Structured Document engineering

Projet "Mutualiser l'effort de montée en compétences sur XML"
http://www.mutu-xml.org/index.html



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