You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by "Tsui, Alban" <Al...@COGNOS.com> on 2002/05/01 16:44:47 UTC

How to call new using java extension in xsltc?

I have the following 

<?xml version="1.0"?>
<xsl:stylesheet 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
xmlns:java="http://xml.apache.org/xslt/java"
exclude-result-prefixes="java"
version="1.0">
	
	<xsl:template match="/">
		<!-- read in properties -->
		<xsl:variable name="numberformatter"
select="java:com.canaveral.format.CnvlNumberFormat.new('en','GB')"/>

		<xsl:variable name="text">ABCDEFG 123&amp;</xsl:variable>

		<xsl:variable name="xxx"
select="java:com.canaveral.misc.URLUTF8Encoder.encode(string($text))"/>

		<!-- create html -->
		<text>
		<xsl:value-of select="$xxx"/>
		</text>
	</xsl:template>
</xsl:stylesheet>

But when I compile it using xsltc I keep on getting:

	Compiler warning(s):  file:/E://javatest.xsl
<file:/E://javatest.xsl> : Unable to resolve call to function
'http://xml.apache.org/xslt/java:new <http://xml.apache.org/xslt/java:new>
'.

It seems that it doesn't recognise the work new! I have been following the
Xalan-Java-Extensions guide and following the instructions etc...

Is this a bug in xsltc? Or should I be using something else to instantiate
my object?

Alban

This message may contain privileged and/or confidential information.  If you
have received this e-mail in error or are not the intended recipient, you
may not use, copy, disseminate or distribute it; do not open any
attachments, delete it immediately from your system and notify the sender
promptly by e-mail that you have done so.  Thank you.