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

Re: XSLT2 - which parts solve real 1.0 problems, which makes coffee? - w


error handling in xpath

"M. David Peterson" <m.david.x2x2x@g...> wrote in message 
f8da4eba0412301913514c47ae@m...">news:f8da4eba0412301913514c47ae@m......
> "My own proposal was for special XSLT error templates that could
> "match" or trigger on error conditions, assuming a very simple XML
> vocab for XSLT error communication in the
> first place."
>
> Oooohhhh.... I totally love that idea!!!  Basically like built-in
> templates that exist in the 1.0 definition...  basic output and easily
> overidable if desired as such.
>
> Dimitre, can you think of a way to do this with FXSL, especially with
> XSLT 2.0 and everything being a sequence of nodes it seems that a
> certain condition could easily insert,  for example, <error id="123"/>
> into the output and further apply-templates to all error elements
> before finishing each process contained within a template?

Yes, this can be done, what is only needed is implementing support for 
higher order functions (HOF) and for computations (Monads).

One has to realize that error raising/handling in a functional language is 
essentially nondeterministic and much more challenging as such. XPath 1.0 
compatibility would also be very problematic, as there's almost no such 
thing as raising an error in XPath 1.0.

More on implementing exceptions in a functional language can be found in the 
classic work of Simon-Peyton Jones "Tackling the awkward squad: monadic 
input/output, concurrency, exceptions, and foreign-language calls in 
Haskell", at 
http://research.microsoft.com/Users/simonpj/papers/marktoberdorf/

While I actually made some successful experiments 1 1/2 years ago, it seems 
too early to expect these in XSLT. My predictions (which are typically 
optimistic) are for HOF support in XPath/XSLT 3.0 and try/catch-type error 
handling in XPath/XSLT 4.0.

The WG has done a good job and made the reasonable decision not to put the 
cart in front of the horse.

Cheers,
Dimitre. 




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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.