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

catching Java exceptions in saxon?

Subject: catching Java exceptions in saxon?
From: Gunther Schadow <gunther@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 17 Apr 2002 21:28:09 -0500
saxon exception java
Hi Mike,

ah, I can't stop praising saxon. You've done such a fine job!
XSLT with saxon has become my bread-and-butter scripting language.
Can't imagine the days any more where the level of debugging help
was the message "the parameter is incorrect" :-)

I have a few questions or suggestions:

I am using the Java extensibility a lot, it works wonderfully.
It would be even nicer if XPath would be augmented so as to
allow object oriented "dot" notation. I would say

<xsl:variable name="magic" select="$thing.getMagic()"/>

and it would call the getMagic() method on the object refered
to by the XSLT variable $thing. This would not be hard to
implement in saxon, because it's a java engine by itself.
Did you consider that? Sounds to me like a worthwhile extension
of the XSLT/Xpath specification too.

The other thing is, couldn't there be an exception handling
block in XSLT/saxon. For instance:

<xsl:template ...>
  <saxon:try>
     <fortune>
       <xsl:value-of select="magic:get-fortune($magic)"/>
     </fortune>
     <saxon:catch exception="java:FortuneNotFoundException()">
        <sorry>
          <no-luck-today/>
        </sorry>
     </saxon:catch>
  </saxon:try>
</xsl:template>

Or something along those lines.

What do you think?

regards
-Gunther


-- Gunther Schadow, M.D., Ph.D. gschadow@xxxxxxxxxxxxxxx Medical Information Scientist Regenstrief Institute for Health Care Adjunct Assistant Professor Indiana University School of Medicine tel:1(317)630-7960 http://aurora.regenstrief.org



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.