[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|