-
How to call Java Function using namespace , in xsl file
Hi everyone,
I want to call my java function ,into xsl file . i know that with namespace
,we can do this but i am not sure how to publish this my .class file as namespace;
herwith am giving sample code:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:java="my namespace address should come here"
exclude-result-prefixes="java">
<xsl utput method="text"/>
<xsl:template match="/">
<xsl:variable name="coName" select="//COMPANY_NAME"/>
<xsl:variable name="division" select="//DIVISION"/>
<xsl:variable name="paddedCoName" select="java:comfnamespace.yof98.PadString.pad(string($coName),
25)"/>
<xsl:variable name="paddedDiv" select="java:comfnamespace.yof98.PadString.pad(string($division),
20)"/>
<xsl:value-of select="$paddedCoName"/>
<xsl:value-of select="$paddedDiv"/>
</xsl:template>
</xsl:stylesheet>
here comfnamespace.yof98.PadString.pad() is my java function. where comfnamespace.yof98
is the package name and PadString is class name, pad() is the function within
PadString class file.
so my problem is , am confused with ;how to publish this .class file as namespace.
could anyone elaborate how to achieve this? how to publish .class file as
namesapce ;plz. answer this question with every detail step.
Thanks in advance,
vikas
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks