Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
| 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 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 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.
 
Old December 2nd, 2006, 11:46 AM
mhkay's Avatar
Wrox Author
Points: 18,487, Level: 59
Points: 18,487, Level: 59 Points: 18,487, Level: 59 Points: 18,487, Level: 59
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 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
 
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
 
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
 
Old December 3rd, 2006, 02:59 AM
mhkay's Avatar
Wrox Author
Points: 18,487, Level: 59
Points: 18,487, Level: 59 Points: 18,487, Level: 59 Points: 18,487, Level: 59
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 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
 
Old December 3rd, 2006, 03:01 AM
mhkay's Avatar
Wrox Author
Points: 18,487, Level: 59
Points: 18,487, Level: 59 Points: 18,487, Level: 59 Points: 18,487, Level: 59
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 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




Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing Saxon XSLT Processor booboop BOOK: Beginning XML 3rd Edition 2 April 7th, 2011 12:10 PM
XSLT processor for Mac Pankaj C XSLT 3 September 26th, 2007 08:36 AM
Which XSLT processor? li72 XSLT 1 August 16th, 2007 11:18 AM
changing xslt processor in FOP Tschuri XSLT 0 May 13th, 2005 07:08 AM
beginner xslt processor question randallxski XSLT 3 March 24th, 2005 09:41 AM





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