[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Xpath Syntax Issue

Subject: Re: [xsl] Xpath Syntax Issue
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Sat, 23 Jun 2012 18:05:32 -0300

At 2012-06-23 16:40 -0400, John A. Walsh wrote:
This seems to work:

<xsl:template match="pets/animal[species[normalize-space(.) = 'fish']]"/>

Which would be the same as:

<xsl:template match="pets/animal[normalize-space(species) = 'fish']"/>

... which might be easier for someone maintaining the stylesheet to understand.

Of course the processor may optimize both expressions to be the same executing code, but from a maintenance perspective, keeping expressions simpler would have more benefit.

I hope this is helpful.

. . . . . . . . Ken

Public XSLT, XSL-FO, UBL and code list classes in Europe -- Oct 2012
Contact us for world-wide XML consulting and instructor-led training
Free 5-hour lecture: http://www.CraneSoftwrights.com/links/udemy.htm
Crane Softwrights Ltd.            http://www.CraneSoftwrights.com/s/
G. Ken Holman                   mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Google+ profile: https://plus.google.com/116832879756988317389/about
Legal business disclaimers:    http://www.CraneSoftwrights.com/legal

Current Thread