You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Steve Brown <pr...@flex.com.au> on 2001/02/09 08:06:02 UTC
Namespace for java.lang.Math
Hi,
I want to use the java.lang.Math.abs() method in my XSL transformation but
am having a little trouble. I can get it working with:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
xmlns:java="http://xml.apache.org/xslt/java"
exclude-result-prefixes="java">
.
<xsl:value-of select="java:java.lang.Math.abs()....../>
but cant get it working with
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
xmlns:math="http://xml.apache.org/xslt/java/java.lang.Math"
exclude-result-prefixes="math">
.
<xsl:value-of select="math:abs()....../>
OR
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
xmlns:math="java.lang.Math"
exclude-result-prefixes="math">
.
<xsl:value-of select="math:abs()....../>
The reason that I want to do it this way is so I can (hopefully) use various
XSLT processors on the one standard document.
I am having a little trouble understanding the Namespace stuff so if you
also know of any good spots to get a bit of an idea on Namespace concepts,
that would be appreciated.
Thanks,
Steve.
Re: Namespace for java.lang.Math
Posted by Gary L Peskin <ga...@firstech.com>.
Steve Brown wrote:
>
> Hi,
>
> I want to use the java.lang.Math.abs() method in my XSL transformation but
> am having a little trouble. I can get it working with:
>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> version="1.0"
> xmlns:java="http://xml.apache.org/xslt/java"
> exclude-result-prefixes="java">
> .
> <xsl:value-of select="java:java.lang.Math.abs()....../>
>
> but cant get it working with
>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> version="1.0"
> xmlns:math="http://xml.apache.org/xslt/java/java.lang.Math"
> exclude-result-prefixes="math">
> .
> <xsl:value-of select="math:abs()....../>
>
> OR
>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> version="1.0"
> xmlns:math="java.lang.Math"
> exclude-result-prefixes="math">
> .
> <xsl:value-of select="math:abs()....../>
>
> The reason that I want to do it this way is so I can (hopefully) use various
> XSLT processors on the one standard document.
>
> I am having a little trouble understanding the Namespace stuff so if you
> also know of any good spots to get a bit of an idea on Namespace concepts,
> that would be appreciated.
>
> Thanks,
> Steve.
Steve --
What version of XalanJ are you using? This should work with XalanJ2.
Gary