[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

org.apache.xpath.objects.XRTreeFrag error

Subject: org.apache.xpath.objects.XRTreeFrag error
From: Thorsten Scherler <thorsten@xxxxxxxxxx>
Date: Fri, 06 May 2005 14:32:14 +0200
org.apache.xpath.objects.xrtreefrag
Hi list,

I am trying to process the following code:

I defined a variable like:
<xsl:variable name="objectProperty">
 <xsl:copy-of select="$model[@objectId=
$objectId]/forrest:property[@name=$name]"/>
</xsl:variable>

This variable $objectProperty is a frag like this:
      <forrest:property newId="221" name="mq1-preis">
        <euro>85</euro>
        <cent>00</cent>
      </forrest:property>

Then I call another template with this frag:
<xsl:call-template name="getText">
  <xsl:with-param name="setX">
   <xsl:copy-of select="$objectProperty"/>
  </xsl:with-param>
</xsl:call-template>

In the final template I have
<xsl:template name="getText">
  <xsl:param name="setX"><test>This is a test.</test></xsl:param>
...
  <xsl:copy-of select="$setX"/>
...
</xsl:template>

That is working fine because it will output:
      <forrest:property newId="221" name="mq1-preis">
        <euro>85</euro>
        <cent>00</cent>
      </forrest:property>

...but as soon I as I change the final template and use 
<xsl:value-of select="$setX/euro"/> or 
<xsl:copy-of select="$setX/euro"/>

I get  
javax.xml.transform.TransformerException: java.lang.ClassCastException:
org.apache.xpath.objects.XRTreeFrag

Can anybody tell me what is going wrong and why the XPath is not
working?

TIA

salu2
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.