Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XSLT
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old October 9th, 2017, 04:46 PM
Authorized User
Points: 340, Level: 6
Points: 340, Level: 6 Points: 340, Level: 6 Points: 340, Level: 6
Activity: 75%
Activity: 75% Activity: 75% Activity: 75%
 
Join Date: Apr 2008
Location: , OH, USA.
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?
Reply With Quote
  #2 (permalink)  
Old October 9th, 2017, 06:09 PM
mhkay's Avatar
Wrox Author
Points: 18,252, Level: 58
Points: 18,252, Level: 58 Points: 18,252, Level: 58 Points: 18,252, Level: 58
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,929
Thanks: 0
Thanked 281 Times in 276 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
Reply With Quote
  #3 (permalink)  
Old October 10th, 2017, 09:34 AM
Authorized User
Points: 340, Level: 6
Points: 340, Level: 6 Points: 340, Level: 6 Points: 340, Level: 6
Activity: 75%
Activity: 75% Activity: 75% Activity: 75%
 
Join Date: Apr 2008
Location: , OH, USA.
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.
Reply With Quote
  #4 (permalink)  
Old October 10th, 2017, 09:53 AM
mhkay's Avatar
Wrox Author
Points: 18,252, Level: 58
Points: 18,252, Level: 58 Points: 18,252, Level: 58 Points: 18,252, Level: 58
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,929
Thanks: 0
Thanked 281 Times in 276 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
Reply With Quote
  #5 (permalink)  
Old October 10th, 2017, 09:54 AM
Authorized User
Points: 340, Level: 6
Points: 340, Level: 6 Points: 340, Level: 6 Points: 340, Level: 6
Activity: 75%
Activity: 75% Activity: 75% Activity: 75%
 
Join Date: Apr 2008
Location: , OH, USA.
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!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 12: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 09:38 PM



All times are GMT -4. The time now is 11:49 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.