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

RE: RDDL as a delivery vehicle for XSLT extensions?

Subject: RE: RDDL as a delivery vehicle for XSLT extensions?
From: "Kaganovich, Yevgeniy (Eugene)" <ykaganovich@xxxxxxxxxxx>
Date: Fri, 2 Mar 2001 00:41:12 -0800
RE:  RDDL as a delivery vehicle for XSLT extensions?
: <xbind:module  
:   name="a-language-independent-uri-that-refers-to-functionality">
:   <xbind:function name="format">
:     <xbind:param  name="date"   type="string" />
:     <xbind:param  name="format" type="string" />
:     <xbind:return type="string" />
:     <xbind:comment>
:        This function formats a date in ISO 8601 
:        according to the format string.
:     </xbind:comment>
:     <xbind:implementation 
:        language="java" 
:        package="java:com.example.datestuff.DateRoutines#format"
:     />
:     <xbind:implementation language="javascript">
:       ...
:     </xbind>
:   </xbind:function>
: </xbind:module>
: 
: <exsl:script implements-prefix="date"
:   xbind="a-language-independent-uri-that-refers-to-functionality" />

This looks very cool. I would  suggest that it's better to group by
languages rather than by functions: if I'm using a java-based processor, I'm
not particularly interested in how the perl binding looks, but I would like
to be able to distribute my implementation separately from the module
description. 

<!-- can be made available on date-formatting-module-ns URI, e.g via RDDL
-->
<xbind:module name="date-formatting-module-uri">
  <xbind:function name="format>
     <xbind:param  name="date"   type="string" />
     <xbind:param  name="format" type="string" />
     <xbind:return type="string" />
     <xbind:comment>
        This function formats a date in ISO 8601 
        according to the format string.
     </xbind:comment>
  </xbind:module>
</xbind:package>

<!-- comes with com.example.datestuff package (may or may not be
downloadable from the same namespace uri)
-->
<xbind:bindings xbind="date-formatting-module-uri" laguage="java">
  <xbind:implementation name="format">
	<class src="java:com.example.datestuff.DateRoutines"/>
  </xbind:implementation>
</xbind:implementations>

Here, I assume that anything inside xbind:implementation is specific to the
language for which binding is defined. I'm a little unclear about namespace
usage in attributes, but it seems cleaner to store Java-specific information
as values inside xbind:implementation, rather than its attributes.

BTW, If it were Javascript binding, xbind:implementation may contain [a node
with] actual Javascript code, not just external reference. Is that correct?

- Eugene

 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.