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

Re: XSLT and external calls

Subject: Re: XSLT and external calls
From: "Eugene Kuznetsov" <eugene@xxxxxxxxxxxxx>
Date: Fri, 22 Aug 2003 13:56:22 -0400
> instance a CAS or a Tex2MathML converter) produces. So I was wondering
> there are ways of stil having an XSLT stylesheet (maybe with a
> extension element that allows me to call specific Java methods or

There are two diametrically opposed directions here. 

1. You view XSLT as just another "scripting platform" deeply embedded
into your particular platform-specific system. You freely extend it
using custom java extensions, VB script, C++ extensions, <script>
elements and so on that perform everything from database queries to
procedural nodeset processing that was too hard (or too slow) to write
in XPath/XSLT. Portability between engines, platforms and applications
of the mappings contained in the XSLT is irrelevant to you. If you need
to talk to a database server for a lookup during the transform, you
write some custom java code, and use "<myname:yourjdbc.ora sql="select *
from bar">..." to access your database. 

2. You think XML/XSLT points to a way for separating XML processing from
platform-specific technologies, and want to be able to reuse and move it
around at will. Whenever possible, you implement transforms as
self-contained, reusable modules that rely on standard XSLT or
well-supported "industry-standard" extensions (EXSLT). If you need to
talk to the outside world to complete a transform, you try to figure out
how to avoid it. If that does not work, you use a document() call to a
URL -- using standard CGI-encoding of parameters. If that does not work,
you use a SOAP call to make a coarse-grained web services request to
your app server. You want to move to a loosely-coupled data processing
architecture, expose all of your data as RESTful XML and/or web
services, and finally unlock your application mappings and logic from
specific platforms. If you map format X to format Y in one application,
you want to reuse that mapping in all of your other applications without

So there's more than just a simple programming question here, it's
actually a big fork in the road. Sometimes #1 is OK, but I find that
more often someone wants #2, but pursues #1 "by default." In that case,
like David says, document() call is preferable, especially if you are
doing something relatively simple. Often you can even use an XML file
for "on-the-side" lookups of things like "id->name" mappings needed for
XML ETLs. For more complex queries, our engine provides a syntax for
making SOAP calls from within the transform. Long-term, this too should
become a standard namespace. 

\\ Eugene Kuznetsov, Chairman & CTO
\\ eugene@xxxxxxxxxxxxx
\\ DataPower Technology, Inc. - xml-aware network devices
\\ http://www.datapower.com - XA35 XML Accelerator

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

Current Thread


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.
First Name
Last Name
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.