[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

extension functions

Subject: extension functions
From: Earl Bingham <earl@xxxxxxxxx>
Date: Sun, 07 Nov 1999 20:53:49 -0800
tel extension format
I have been wanting to create an extension function that receives a name

value pair and does some processing and returns a specific value. The
example given by James Clark shows how to use the constructor for
then returning a string, but I was having difficulty passing arguements
to
the class. Has anyone been able to have this operation work?

sample stylesheet of what I would like to do:
<xsl:stylesheet
  version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:author="http://www.jclark.com/xt/java/com.mycompany.Hello"
  exclude-result-prefixes="author"
   >
<xsl:template match="/">
<html>
 <xsl:variable name="firstVar">Name Variable</xsl:variable>
 <xsl:variable name="secVar">Value Variable</xsl:variable>
 <xsl:if test="function-available('author:to-string') and
function-available('author:new')">
  <p><xsl:value-of select="date:to-string(date:new($firstVar,
$secVar))"/></p>
 </xsl:if>
</html>
</xsl:template>
</xsl:stylesheet>

java class:

public class Hello {
  public Hello(String first, String second) {
    String myFirst = first;
    String mySecond = second;
  }
}


Thanks,

Earl

begin:vcard 
n:Bingham;Earl
tel;cell:(408) 806-6642
tel;fax:(650) 559-1738
tel;home:(650) 559-1738
tel;work:(408) 993-2140
x-mozilla-html:FALSE
url:http://www.b-bop.com
org:B-Bop Associates Inc.;Engineering
adr:;;2 North First Street;San Jose;CA;94024;USA
version:2.1
email;internet:earl@xxxxxxxxx
title:Senior Software Engineer
note:"Live Free Or Die"
fn:Earl Bingham
end:vcard
Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.