• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

is it possible in XSL to invoke an extended java function which returns a list?

 
Ranch Hand
Posts: 266
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everyone,
From my xsl-Stylesheet I want to invoke a method which returns a List of an Object. My xsl looks like:


and my java code looks like:


But it doesn't work. I get an Exception: java.util.ArrayList
can't be converted in a NodeList.
Do you know a work around?
I would be very thankful for help
Thanks in advance & greetings,
Ulrich

[ February 20, 2006: Message edited by: Ulrich Heeger ]
[ February 20, 2006: Message edited by: Ulrich Heeger ]
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Modify your code as :
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

xmlns:xalan="http://xml.apache.org/xalan"

xmlns:Ext="SystemUtils"> <xsl param name="param">test</xsl param> <xsl:template match="/">
<p><xsl:for-each select="xalan:nodeset(Ext:SystemDates())"/></p>
</xsl:template>

This would definitely solve your problem
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic