[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XSLT use cases; data-centric todocument-centrictr

Subject: Re: XSLT use cases; data-centric todocument-centrictransformations
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Wed, 9 Feb 2005 06:09:36 +1100
xslt sibling instructions
On Tue,  8 Feb 2005 15:25:50 +0100, Peter Gerstbach <peter@xxxxxxxxxxxx> wrote:
> Quoting Michael Kay <mike@xxxxxxxxxxxx>:
> 
> > In Saxon 8.2 a sequence of 500 sibling instructions will in fact compile to
> > the same code as the XPath expression (a1, a2, a3, ... a500), which is
> > actually handled as (a1, (a2, (a3, (a4, ...))) and therefore does indeed
> > make excessive use of stack space. This will be fixed next time around,
> > although it's very rare that it causes a problem since you rarely see
> > sequences of more than 5 sibling instructions.
> 
> Thanks for this explanation. Now I know how to avoid this stack
> overflow, and as
> you stated, this amount of siblings is in fact rare.


In any language a subroutine or a method of this size is not
recommended as a good programming practice. As a rule, the code of a
method should fit on a single page.

With larger methods there are almost surely unnoticed bugs due to
difficulties in understanding and due to poor maintainability.

Of course, some people do write very long methods -- I have seen a
method, whose code occupied 29 printed pages. With such a beast the
question "What does this method do?" becomes very difficult to answer.


Cheers,
Dimitre Novatchev.

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.