Subject: XSLT Processor - root node template & version question
From: "Lopez, William" <william.lopez@xxxxxxx>
Date: Wed, 9 Oct 2002 15:12:13 -0500
|
XSLT Gurus:
Q1: Does it matter (speed wise or best practice) if a template is defined
for the root element? My understanding is that the root node is
automatically processed first by the processor.
Example XML:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE RouteCodeMaintLookup SYSTEM "../dtd/routecodemaintlookup.dtd" >
<?xml-stylesheet type="text/xsl" href="../xsl/routecodemaintlookup.xsl" ?>
<RouteCodeMaintLookup
...
</RouteCodeMaintLookup>
I'm using the [Sniplet] XSL below versus one that has a
match="RouteCodeMaintLookup" (output is the same I'm just wondering if one
way is better/quicker than the other- they appear to process the same):
<?xml version='1.0'?>
<xsl:stylesheet version="1.1"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
...
<form name="LookUpForm" method="post" action="{@servletPath}">
<table>
<xsl:apply-templates/>
</table>
...
</xsl:template>
Q2: Since the XSLT 1.1 never made it past WD status is there any gain in
specifying it? I use Xalan-j.
Thanks!
-Will
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|