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 December 2nd, 2006, 11:28 AM
Authorized User
 
Join Date: Nov 2006
Location: , , .
Posts: 28
Thanks: 0
Thanked 1 Time in 1 Post
Default Regarding the XSLT Processor

Hi

The way I know that a Processor works is by building a tree for the initial XML and stylesheet files, which would be an in-memory representation of these files. These means that if the initial XML document is very large, it will impact both the memory and the time it actually takes to initial construct the tree, and then go through the tree and find proper matches from the XSL file. I see all this being similar to how DOM works. Why was these design chosen?

Thank you for any information regarding this.

Michael.
Reply With Quote
  #2 (permalink)  
Old December 2nd, 2006, 11:46 AM
mhkay's Avatar
Wrox Author
Points: 18,277, Level: 58
Points: 18,277, Level: 58 Points: 18,277, Level: 58 Points: 18,277, Level: 58
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,933
Thanks: 0
Thanked 282 Times in 277 Posts
Default

>Why was these design chosen?

I'm always a bit cautious about answering questions of historical fact, I'm not a historian and it's very easy for conjectures to turn into urban myths.

There have been attempts to design transformation languages that process a document sequentially, for example STX and XStream. Generally they are harder to use or have more limited functionality. Doing something like building an index or a table of contents when you haven't got the ability to navigate anywhere you like in the source tree isn't easy.

Some people also argue that a good optimizer should be able to detect those XSLT stylesheets where serial processing is possible and avoid building the tree. Personally, I'm sceptical.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
Reply With Quote
  #3 (permalink)  
Old December 2nd, 2006, 03:21 PM
Authorized User
 
Join Date: Nov 2006
Location: , , .
Posts: 28
Thanks: 0
Thanked 1 Time in 1 Post
Default

Thank you Michael for your answer. I mentioned that I see similitudes between Processors and the way DOM works; does, for example Saxon, use DOM when building the source and stylesheet tree?

Michael
Reply With Quote
  #4 (permalink)  
Old December 2nd, 2006, 03:30 PM
Authorized User
 
Join Date: Nov 2006
Location: , , .
Posts: 28
Thanks: 0
Thanked 1 Time in 1 Post
Default

I just found an article regarding Saxon on the IBM website written by you where you specify that Saxon does not use the DOM tree model but rather the XPath tree model which is needed by an XSLT processor. I presume that this means that a DOM model cannot be use by an XSLT Processor. Now I have to find out how the DOM tree model differs from the XPath tree model.

Mihai
Reply With Quote
  #5 (permalink)  
Old December 3rd, 2006, 02:59 AM
mhkay's Avatar
Wrox Author
Points: 18,277, Level: 58
Points: 18,277, Level: 58 Points: 18,277, Level: 58 Points: 18,277, Level: 58
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,933
Thanks: 0
Thanked 282 Times in 277 Posts
Default

>does, for example Saxon, use DOM when building the source and stylesheet tree?


No, Saxon uses its own tree representation which is much more efficient (in both space and time) than DOM.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
Reply With Quote
  #6 (permalink)  
Old December 3rd, 2006, 03:01 AM
mhkay's Avatar
Wrox Author
Points: 18,277, Level: 58
Points: 18,277, Level: 58 Points: 18,277, Level: 58 Points: 18,277, Level: 58
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,933
Thanks: 0
Thanked 282 Times in 277 Posts
Default

Do get yourself a copy of my XSLT Programmer's Reference, it's a good starting point for such discussions.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
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
Installing Saxon XSLT Processor booboop BOOK: Beginning XML 3rd Edition 2 April 7th, 2011 01:10 PM
XSLT processor for Mac Pankaj C XSLT 3 September 26th, 2007 09:36 AM
Which XSLT processor? li72 XSLT 1 August 16th, 2007 12:18 PM
changing xslt processor in FOP Tschuri XSLT 0 May 13th, 2005 08:08 AM
beginner xslt processor question randallxski XSLT 3 March 24th, 2005 09:41 AM



All times are GMT -4. The time now is 05:17 AM.


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