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

Re: External Function Call From Style Sheets (2nd Try)

Subject: Re: External Function Call From Style Sheets (2nd Try)
From: Omar López Ruiz <omar@xxxxxxxxxxxx>
Date: Thu, 11 May 2000 13:31:39 +0200
xsl external function
    Thanks Mike, It was the slash "/" ;-(

    This feature could be very useful for some mathematical calculations,
accessing the database for some profile information, or something like that. You
think it has sense to use this external function to directly add some nodes to
the result tree? If so, is the way to do that dependant to the parser? Another
possibility could be to return the elements as a String, isn't it? Finally
another question, all this external Java functions, should be static? I don't
see the way to instanciate a class in a XSL file....

    Thanks for your responses and your time,

    Cheers,

    Omar

Kay Michael wrote:

> > Omar López Ruiz wrote:
> >
> > >     Hi all,
> > >
> > >     I'm trying to call an external Java function from an XSL-T
> > > stylesheet as follows:
> > >
> > > <xsl:stylesheet
> > >      version="1.0"
> > >      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> > >      xmlns:dxsutil="DxsUtil">
> > >
> > >   <xsl:template match="/">
> > >     <HTML>
> > >       <H5>About:<BR/>
> > >       <xsl:if test="function-available('dxsutil:about')">
> > >       <P><xsl:value-of select="dxsutil:about()"/></P>
> > >       </xsl:if>
> > >       </H5><BR/>
> > >     </HTML>
> > >   </xsl:template>
> > >
> > > </xsl:stylesheet>
> > >
> > >     I've checked an e-mail from Michael Kay on April 13th of 2000
> > > answering a very similar question, so I've followed his indications.
> > > Although I think the URI of the namespace is irrelevant, I put the
> > > DxsUtil.class file on the same directory of the stylesheet.
>
> In the case of Saxon, the namespace URI must be the fully-qualified name of
> the class (or anything that contains this name after the last "/"), and this
> class must be on the classpath. The likely cause of your trouble is either
> that the class belongs to a package, in which case you must include the
> package name, or that the class isn't on the class path. Telling us the
> error message would help!
>
> Mike Kay
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

--
_____________________________________________________________

 ////////////////   Omar López Ruiz
///////////    //   Informix Software Ibérica s.a.
///////    /  ///   Sales Engineer
//////    // ////   Web Solutions Division
/////    // /////   Avda. Diagonal, 615 8º F (Edif. "El Dau")
////    // //////   08028 Barcelona  - Spain -
///    // ///////   Tel.:  +34 93 363 79 86 / +34 639 600 898
//    // ////////   Fax :  +34 93 363 79 98
/    ////////////   mailTo:    omar@xxxxxxxxxxxx
////////////////    WWW:       http://www.informix.com
_____________________________________________________________



 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.