You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2003/10/07 11:07:18 UTC

DO NOT REPLY [Bug 23646] New: - xsltc in cocoon doesn't work with nodeset functions

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23646>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23646

xsltc in cocoon doesn't work with nodeset functions

           Summary: xsltc in cocoon doesn't work with nodeset functions
           Product: XalanJ2
           Version: 2.5
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Xalan-Xsltc
        AssignedTo: xalan-dev@xml.apache.org
        ReportedBy: peter.broschwitz@multi-m.de


first of all, I already put a bug report in cocoon bugtracking system (bug# 
23615, see http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23615), but
there they told me to report the bug "at XSLTC". I hope, I'm right here. 
Nevertheless, I still want to point out, that the following problem does not 
concern xsltc itself, but IMHO the interaction from cocoon to xsltc.

Well then: we are using cocoon 2.1 with xsltc (version 1.4, xalan 2.5.0) as 
default
transformer. Now we want to use the xalan or exslt nodeset function, but
this is only possible with xalan xslt.

For testing purposes we tried a simple nodeset transformation from the
command line. We did that with the same libraries as cocoon, like:

	$>java -Djava.endorsed.dirs=<path/to/endorsed/directory>
org.apache.xalan.xsltc.cmdline.Transform -x node-set-test.xml node_set_test

That way, the transformation succeeds. (Compilation before suceeded also, of
course.)

Trying to process this stylesheet within the cocoon pipeline throws a null
pointer exception without any entries in the cocoon-log-files. Changing to
xalan-xslt the transformation works without any problems.

The stylesheet we used is from the xsltc-documentation:
==============================================
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:xsltc-extension="http://xml.apache.org/xalan/xsltc"
  xmlns:xalan="http://xml.apache.org/xalan"
  xmlns:exslt="http://exslt.org/common"
  version="1.0">

  <xsl:template match="/">
    <xsl:variable name="rtf">
      <docelem>
        <elem1>elem1 found!</elem1>
        <elem2>elem2 found!</elem2>
      </docelem>
    </xsl:variable>
    <!-- Use nodeset as an XSLTC extension function -->
    <xsl:value-of select="xsltc-extension:nodeset($rtf)/docelem/elem1"/>

    <!-- Use nodeset as a Xalan-Java extension function -->
    <xsl:value-of select="xalan:nodeset($rtf)/docelem/elem1"/>

    <!-- Use nodeset as an EXSLT extension function -->
    <xsl:value-of select="exslt:node-set($rtf)/docelem/elem1"/>

    <!-- Use nodeset as standard function -->
    <xsl:value-of select="nodeset($rtf)/docelem/elem1"/>

  </xsl:template>
</xsl:stylesheet>
==============================================

I should add, that none of these nodeset-functions worked, i tested every one 
of his one and commented out the others.

I posted this message already to the cocoon-user-list, and this behaviour could 
be reproduced by others.

Peter