• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

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
 
God is a comedian playing for an audience that is afraid to laugh - Voltair. tiny ad:
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
reply
    Bookmark Topic Watch Topic
  • New Topic