cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Leangen" <dlean...@canada.com>
Subject Unable to convert RTREEFRAG to nodeset
Date Fri, 19 Mar 2004 05:38:12 GMT

Hi!

I'm trying to convert a result tree fragment to a nodeset in Cocoon 2.1.3,
but with no success. Just to make sure that I didn't mess anything up with
my Cocoon configuration, I even tried a fresh build, but I get the same
problem.

The closest thing I found to help me solve my problem was the thread:

http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=100517834709158&w=2

Specifically:

  I assume that you are using Xalan when using Cocoon. Then you
  can use the extension-function nodeset():
  http://xml.apache.org/xalan-j/extensionslib.html#nodeset.
  Other processors like MSXML or Saxon have similar functions.

  Joerg


I have tried this approach:

<xsl:stylesheet version="1.0"
  xmlns:xsl  = "http://www.w3.org/1999/XSL/Transform"
  xmlns:xalan= "http://xml.apache.org/xalan"
  exclude-result-prefixes="xalan"
>

  <xsl:template name="tokenize">
    <xsl:param name="string" select="''" />
    <xsl:param name="delimiters" select="' &#x9;&#xA;'" />


    <xsl:variable name="result">
      <tokens>
        <xsl:call-template name="_tokenize">
          <xsl:with-param name="string" select="$string"/>
          <xsl:with-param name="delimiters" select="$delimiters"/>
        </xsl:call-template>
      </tokens>
    </xsl:variable>

    <xsl:value-of select="xalan:nodeset($result)"/>

  </xsl:template>

...

</xsl:stylesheet>


But get this error:

org.apache.cocoon.ProcessingException: Failed to execute pipeline.:
java.lang.RuntimeException: Can not convert #RTREEFRAG to a NodeList!

I have also tried this:

<xsl:stylesheet version="1.0"
  xmlns:xsl  = "http://www.w3.org/1999/XSL/Transform"
  xmlns:nodeset="org.apache.xalan.xslt.extensions.Nodeset"
  exclude-result-prefixes="nodeset"
>

  <xsl:template name="tokenize">
    <xsl:param name="string" select="''" />
    <xsl:param name="delimiters" select="' &#x9;&#xA;'" />


    <xsl:variable name="result">
      <tokens>
        <xsl:call-template name="_tokenize">
          <xsl:with-param name="string" select="$string"/>
          <xsl:with-param name="delimiters" select="$delimiters"/>
        </xsl:call-template>
      </tokens>
    </xsl:variable>

    <xsl:value-of select="nodeset:nodeset($result)"/>

  </xsl:template>

...

</xsl:stylesheet>

But get this error:

org.apache.cocoon.ProcessingException: Failed to execute pipeline.:
java.lang.RuntimeException: java.lang.NoSuchMethodException: For extension
function, could not find method
org.apache.xml.dtm.ref.DTMNodeIterator.nodeset([ExpressionContext,] ).


Any ideas?


Thanks so much!!

Dave






---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message