Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within XML
Search Coderanch
Advance search
Google search
Register / Login
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
Forum:
XML and Related Technologies
using a static function in XSL
Kantutan Tayo
Greenhorn
Posts: 22
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
How do I use a static function in XSL? Im sure this is doable; I've seen this done with ColdFusion if configured right.
i.e.
XSLT code
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:helper="mypackage.util.SomeClass"> <xsl:template match="/"> <xsl:value-of select="helper:someFunction(@someattrib)" /> </xsl:template> </xsl:stylesheet>
Java
code
package mypackage.util.SomeClass public class SomeClass { public static String someFunction(String param) { // do something with param, return result. } }
SCJP
Kantutan Tayo
Greenhorn
Posts: 22
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I forgot to mention the compiled java class is under WEB-INF/classes and the xsl file is under WEB-INF/xsl
SCJP
Bear Bibeault
Sheriff
Posts: 67746
173
I like...
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Moved to the XML forum.
[
Asking smart questions
] [
About Bear
] [
Books by Bear
]
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
?
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Help on setPrarameter() fror transformer..
Unnecessary Tags
is it possible in XSL to invoke an extended java function which returns a list?
Best API to update an XML document!
XSLT: Calling transform from within a transform
More...