Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 9th, 2017, 04:46 PM
Authorized User
 
Join Date: Apr 2008
Posts: 70
Thanks: 17
Thanked 1 Time in 1 Post
Send a message via Yahoo to iceandrews
Default XSLT Performance

I didn't want to setup and run a bunch of tests to prove it but in general which is going to be the better performing XPath within an XSLT solution? I'm processing documents that come in many different namespaces, but the local names are generally the same.

Code:
/*:Transaction/*:Claims/*:Claim
vs.
Code:
/*[local-name()='Transaction']/*[local-name()='Claims']/*[local-name()='Claim']
We're using Saxon 8.9X processing XSLT 2.0. Is there a better alternative for a 2.0 namespace agnostic XPath?
 
Old October 9th, 2017, 06:09 PM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

You're going to have to measure it and see. I think it's rather unlikely that the difference will be noticeable.

Why are you using such an old version of Saxon?
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
 
Old October 10th, 2017, 09:34 AM
Authorized User
 
Join Date: Apr 2008
Posts: 70
Thanks: 17
Thanked 1 Time in 1 Post
Send a message via Yahoo to iceandrews
Default

We don't have a choice. It's a version built into another product that we're using on our SOA. If they upgrade, then we get a new version of Saxon. They haven't upgraded in a long time.

It's not ideal.
 
Old October 10th, 2017, 09:53 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

Perhaps we should try and find a security weakness in 8.9 which would force them to upgrade.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
 
Old October 10th, 2017, 09:54 AM
Authorized User
 
Join Date: Apr 2008
Posts: 70
Thanks: 17
Thanked 1 Time in 1 Post
Send a message via Yahoo to iceandrews
Default

Ha! Well if you wouldn't write such great code, maybe there would be one!





Similar Threads
Thread Thread Starter Forum Replies Last Post
XSLT Include - Effects on Performance Belch XSLT 2 April 23rd, 2015 08:31 AM
Performance tips for XSLT 2.0 stolte XSLT 5 February 26th, 2010 01:47 PM
Performance issue in using XSLT Prabeen XSLT 4 July 9th, 2009 10:57 AM
XSLT - XML Transformation Performance fishstix XSLT 5 April 13th, 2009 01:48 PM
Performance prasanta2expert SQL Server 2000 6 December 15th, 2006 10:38 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.