aspose file tools*
The moose likes XML and Related Technologies and the fly likes Migrate to XSLT 2.0 from 1.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Migrate to XSLT 2.0 from 1.0" Watch "Migrate to XSLT 2.0 from 1.0" New topic
Author

Migrate to XSLT 2.0 from 1.0

Cheenu Subramanian
Ranch Hand

Joined: Aug 15, 2005
Posts: 40
I am using XSLT 1.0(gerenated by Mapforce tool) and this transformation gets called around 15000 times a day. This is part of a real-time activity. From what I found, exception-handling(throwing exceptions) is not available in XSLT 1.0. XSLT 2.0 seems to have this feature. In addition, we have a need to validate the XML against the schema as well. Could we have the validation turned on without any performance sacrifice? Would switching to 2.0 be the right way to go?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39535
    
  27
Could we have the validation turned on without any performance sacrifice?

That should be pretty easy to test, no?


Ping & DNS - updated with new look and Ping home screen widget
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18113
    
    8

Cheenu Subramanian wrote:From what I found, exception-handling(throwing exceptions) is not available in XSLT 1.0. XSLT 2.0 seems to have this feature.


Really? I did a quick Internet search and I can't find this exception-throwing feature of XSLT 2.0 mentioned anywhere. The XSLT 2.0 Recommendation doesn't use the word "throw" anywhere, but perhaps they use a different word for it? What is the feature that you're referring to?

If you want to terminate your XSL transformation abruptly, then <xsl:message terminate="yes"/> is the easiest way to do that.
Cheenu Subramanian
Ranch Hand

Joined: Aug 15, 2005
Posts: 40
With regard to exception handling, heres the link to Mapforce help .

http://manual.altova.com/Mapforce/mapforce-professional/mffexceptions.htm?zoom_highlightsub=xsl+exception

Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18113
    
    8

I'm sorry, I don't understand any of that. My first guess is that you can do something which prevents you from generating XSLT 2.0 code in some cases, but I don't see what XSLT 1.0 versus 2.0 has to do with it. However if you think it would improve your situation then I don't see anything stopping you from trying it and seeing what happens.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Migrate to XSLT 2.0 from 1.0
 
Similar Threads
Q 4 Dmitry Kirsanov (1): what is XSLT all about?
Installing XSLT processor
Split xml using xsl
XSLT 2.0 Web Development : reader question
Problem while upgrading from XSLT 1.0 to XSLT 2.0