Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Migrate to XSLT 2.0 from 1.0

 
Cheenu Subramanian
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could we have the validation turned on without any performance sacrifice?

That should be pretty easy to test, no?
 
Paul Clapham
Sheriff
Posts: 21142
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 21142
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic