Subject: [xsl] Which is more efficient? From: "Caron, Daniel" <DCaron@xxxxxxxxxxxxxx> Date: Mon, 10 Mar 2003 15:14:05 -0500 |
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. SCENARIO #1: ---------------------- <?xml version = "1.0" encoding = "UTF-8"?> <xsl:stylesheet version = "1.0" xmlns:xsl = "http://www.w3.org/1999/XSL/Transform"> <xmlRoot> <table border="1" cellspacing="1"> <tr> <td>abc</td> </tr> </table> </xmlRoot> </xsl:stylesheet> SCENARIO #2: ---------------------- <?xml version = "1.0" encoding = "UTF-8"?> <xsl:stylesheet version = "1.0" xmlns:xsl = "http://www.w3.org/1999/XSL/Transform"> <xmlRoot> <xsl:element name="table"> <xsl:attribute name="border"> <xsl:text>1</xsl:text> </xsl:attribute> <xsl:attribute name="cellspacing"> <xsl:text>1</xsl:text> </xsl:attribute> <xsl:element name="tr"> <xsl:element name="td"> <xsl:text>abc</xsl:text> </xsl:element> </xsl:element> </xsl:element> </xmlRoot> </xsl:stylesheet> ------------------------------------------------------------------------------ This e-mail transmission may contain information that is proprietary, privileged and/or confidential and is intended exclusively for the person(s) to whom it is addressed. Any use, copying, retention or disclosure by any person other than the intended recipient or the intended recipient's designees is strictly prohibited. If you are not the intended recipient or their designee, please notify the sender immediately by return e-mail and delete all copies. ============================================================================== XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Re: how to select element, Robert P. J. Day | Thread | RE: [xsl] Which is more efficient?, Michael Kay |
RE: [xsl] XPATH simple question, Michael Kay | Date | RE: [xsl] XSL Error, Michael Kay |
Month |