Subject: RE: [xsl] quick table layout problem From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx> Date: Mon, 7 Jan 2002 16:25:40 -0000 |
> Take the following: (this is a simplification of the XML file I posted > earlier) > > <a> > <b> > <b> > <b> > <c> > <d> > <d> > <e> > </c> > <f> > <g> > <g> > <e> > </f> > </b> > </a> > > What xpath expression will match the first <e>, without using // /a/b/c/d/e > > As a point of interest, what kind of performance hit does > using // give? Is it bad practice to use // ? If you know a more precise path, it's usually a good idea to specify it, because the processor can then avoid searching parts of the tree that aren't relevant. The performance hit depends on the size of the document and on the XSLT processor you are using. With Saxon it can sometimes be a GOOD thing to use //e, because Saxon will then build an index of all <e> elements in the document. The only way to get definitive answers on performance questions like this is to make your own measurements. You can get simple measurements from Saxon, for example, by using the -t option. Mike Kay XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] quick table layout proble, David Carlisle | Thread | [xsl] another xpath question, Andrew Welch |
Re: XPath's role (Was: Re: [xsl] Re, Jeni Tennison | Date | [xsl] xpath test suite?, martin |
Month |