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

Extension functions and Oracle V2 parser

Subject: Extension functions and Oracle V2 parser
From: "Terris" <terris@xxxxxxxxxx>
Date: Thu, 23 Sep 1999 17:06:35 -0700
date functions in oracle
Does or will the Oracle v2 Java XML parser supportXSLT extension functions?

Here is a cool example of an implementation at
http://www.jclark.com/xml/xt.html.  Somethinglike this would be a good way
to manipulatetext in more interesting ways (regular expressions, etc.).
--------------

A call to a function ns:foo where ns is bound to a namespace of
the form http://www.jclark.com/xt/java/className is treated as a
call of the static method foo of the class with fully-qualified
name className. Hyphens in method names are removed with the
character following the hyphen being upper-cased. Overloading
based on number of parameters is supported; overloading based on
parameter types is not. A non-static method is treated like a
static method with the this object as an additional first
argument. A constructor is treated like a static method named
new. Extension functions can return objects of arbitrary types
which can then be passed as arguments to other extension
functions or stored in variables.

For example, the following

<xsl:stylesheet
  xmlns:xsl="http://www.w3.org/XSL/Transform/1.0";
  xmlns:date="http://www.jclark.com/xt/java/java.util.Date";
  xmlns="http://www.w3.org/TR/REC-html40";
  result-ns="">

<xsl:template match="/">
  <html>
    <xsl:if test="function-available('date:to-string') and
function-available('date:new')">
      <p><xsl:value-of select="date:to-string(date:new())"/></p>
    </xsl:if>
  </html>
</xsl:template>

</xsl:stylesheet>
will print out the current date.





 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.