Sign Up
Search
Options
search
Chat
Help
News
Log in
Not Logged in
Home
»
Boards
»
Stylus Studio Developer Network
»
Stylus Studio Technical Forum
»
java.lang.Math Max() method - returns ClassNotFoundException
Topic
Topic Page
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Prev Topic
Next Topic
next
Subject:
java.lang.Math Max() method - returns ClassNotFoundException
Author:
Kim Cassie
Date:
07 Apr 2005 12:16 PM
I am trying to invoke a method Max() from java.lang.Math package
from XSLT inside Stylus Studio, but it reports an Exception saying
ClassNotFoundException -- unable to load java.lang.Math
Here is an example of the XSL that uses this method:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="<
http://www.w3.org/1999/XSL/Transform>">
<!--<xsl:script implements-prefix="XMLPadding" xmlns:pad="java:localhost.examples.XMLPadding" language="java" src="java:localhost.examples.XMLPadding"/>-->
<xsl:script implements-prefix="Math" xmlns:math="java:java.lang.Math" language="java" src="java:java.lang.Math"/>
<xsl:template match="/">
<impl:getXML>
<intf:data>
<xsl:value-of select="math:max(50,60)" xmlns:math="java:java.lang.Math"/>
</intf:data>
<intf:sourceName>
<xsl:value-of select="trilliumRequest/sourceName"/>
</intf:sourceName>
</impl:getXML>
</xsl:template>
</xsl:stylesheet>
Thank you
- Kim
top
Subject:
java.lang.Math Max() method - returns ClassNotFoundException
Author:
Ivan Pedruzzi
Date:
07 Apr 2005 01:43 PM
Kim
You need to use the xalanJ processor and the following syntax
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="
http://www.w3.org/1999/XSL/Transform"
xmlns:math="xalan://java.lang.Math">
<xsl:template match="/">
<xsl:value-of select="math:max(50,60)"/>
</xsl:template>
</xsl:stylesheet>
Ivan
Topic Page
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Prev Topic
Next Topic
Powered by
Stylus Studio
, the world's leading
XML IDE
for
XML
,
XSLT
,
XQuery
,
XML Schema
,
DTD
,
XPath
,
WSDL
,
XHTML
,
SQL/XML
, and
XML Mapping
!
Go to Conference:
Select Conference
Stylus Studio Feature Requests
Stylus Studio Technical Forum
Website Feedback
XSLT Help and Discussion
XQuery Help and Discussion
Stylus Studio FAQs
Stylus Studio Code Samples & Utilities
Stylus Studio Announcements
go
Log In Options
Username:
Password:
Site Map
|
Privacy Policy
|
Terms of Use
|
Trademarks
Stylus Scoop XML Newsletter:
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.