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

Re: External processing.

Subject: Re: External processing.
From: Didier BOLF <didier@xxxxxxxxxxxxxxxxxx>
Date: Mon, 5 Jul 1999 16:53:14 +0200 (MET DST)
suykens xt i
> I'm wondering if it is possible in XSL to call external processing. For
> example, in a xsl:if function, I would like to add a self-defined function
> to be evaluated in the test such <xsl:if test="myFooFunction($toto)">. I've
> heard that it was possible in SGML. But the question is to do it in XSL, and
> if possible, what parser would accept this?


You can create Java classes with static methods to be called in your XSL 
stylesheet.

This works well with XT (see http://www.jclark.com/xml/xt.html).
This is a small exemple of use:

In Java:
-------
package com.edf.util;

public class C1 {
  public static String f1(String s) {
    return s;
  }
}

In XSL:
------
<xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0"
   xmlns:ext="http://www.jclark.com/xt/java/com.edf.util.C1"
>
 ...
 <xsl:param:variable mame="var1">
 ...
 </xsl:param-variable>
 ...
 <xsl:if test="ext:f1(string($var1))=''">
 ...
 </xsl:if>
 ...
  
  
Best regards.
 
Didier.
 
 
 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.