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

RE: Which is more efficient?

Subject: RE: Which is more efficient?
From: "Martinez, Brian" <brian.martinez@xxxxxxxx>
Date: Mon, 10 Mar 2003 13:49:27 -0700
RE:  Which is more efficient?
> From: Caron, Daniel [mailto:DCaron@xxxxxxxxxxxxxx]
> Sent: Monday, March 10, 2003 1:14 PM
> Subject:  Which is more efficient?
> 
> 
> Which of these is the most efficient way of rendering html?  
> It's obvious
> which one is easier to code, but which one would actually parse more
> quickly?  In the abbreviated examples below, the difference, 
> of course would
> be negligible...but consider a page of a few thousand lines 
> of rendered
> HTML.

Neither of your code snippets would actually render HTML.  In XSLT 1.0, in
the absence of an explicit xsl:output element, the default output is XML.
So your result is actually XML with elements that happen to look like HTML
markup.

As to your question: I can't answer with empirical data, and every XSLT
processor opitmizes things differently.  But given that XSLT processors
simply copy literal result elements directly to the result tree, your first
stylesheet (without any elements outside the default namespace) would seem
to be quicker.  xsl:element and xsl:attribute are obviously very cumbersome
to write, but you'll want to use them when you need to control the output of
element names and attributes at run-time.

cheers,
b.

| brian martinez                              brian.martinez@xxxxxxxx |
| lead gui programmer                                    303.708.7248 |
| trip network, inc.                                 fax 303.790.9350 |
| 6436 s. racine cir.                             englewood, co 80111 |
| http://www.cheaptickets.com/                   http://www.trip.com/ |

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.