|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: How to express this in XPath: "when condition do
Thank you Martin and BR Chrisman for your comments. [BR: your idea about using
UNIX shell commands is interesting, and one that I will think about. My
description of the UNIX 'trap' command was only intended to show a capability
in another system (UNIX shell programs) that provide the kind of capability
that I seek in XPath.]
Let me relax my requirement that the "when condition do action" functionality
be implemented exclusively in XPath. Let's also allow XSLT. Also, let's allow
extension functions.
Given those relaxed requirements, could the functionality that I seek be
implemented like this:
Read the next XML document.
If the XML document contains data about cars then
Call an XSLT function, f:waitForPoliceReport()
The function uses an extension function to call
a Java program which waits (sleeps) until the
police report arrives. When the police
report arrives, the Java program wakes up and
returns control to the XSLT function, which returns
the PoliceReport.xml document. The
police report is then queried and either "stolen"
or "" is output.
I am not a Java programmer so I don't know if Java can implement "wait (sleep)
until the police report arrives and then wake up and return control to the
XSLT function". For the Java experts out there, is this something that Java
can do? For the XSLT experts out there, if the Java program can be
implemented, can XSLT invoke the Java program and pause its execution until
the Java program returns?
Is Java the best language to implement "wait (sleep) until the police report
arrives and then wake up and return control to the XSLT function"? Does SAXON
support extension function calls to other languages, besides Java? Does SAXON
support extension function calls to UNIX script programs?
/Roger
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








