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

Re: [xsl] Xpath Syntax Issue


Subject: Re: [xsl] Xpath Syntax Issue
From: Nathan Tallman <ntallman@xxxxxxxxx>
Date: Sat, 23 Jun 2012 15:56:00 -0400

Chris,

I've tried this syntax, and tried again, yet the fish persists. Does
it make a difference if in my real-world application, it's not fish,
but a URL that I'm matching?

Thanks,
Nathan

On Sat, Jun 23, 2012 at 3:51 PM, Christopher R. Maden <crism@xxxxxxxxx>
wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 06/23/2012 03:48 PM, Nathan Tallman wrote:
>> <xsl:template match="pets/animal/species[text()='fish']"/>
>
> This template matches the species element, not the animal element.
>
> Try
>
> <xsl:template match="pets/animal[species='fish']"/>
>
> Or better,
>
> <xsl:template match="pets/animal[normalize-space(species)='fish']"/>
>
> ~Chris
> - --
> Chris Maden, text nerd  <URL: http://crism.maden.org/ >
> LIVE FREE: vote for Gary Johnson, Libertarian for President.
>     <URL: http://garyjohnson2012.com/ >  <URL: http://lp.org/ >
> GnuPG fingerprint: DB08 CF6C 2583 7F55 3BE9  A210 4A51 DBAC 5C5C 3D5E
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iQEcBAEBAgAGBQJP5h4uAAoJEEpR26xcXD1eMQEH/iZjYYoy4gdgyWECQg63m/35
> 2DuRpNATPLEdaJP4U5ktIp8IL9rRBABJa52IcRYW+SzImxFNdNxHg6V7lptW6Oq/
> MNYWApD7ZfRGb1vi2JjdpiQRo3E9D94RsjipC1X/tq/kMIVpHan5r8FI1Leahn4n
> 0FUlXglxm4AiKLw47TcZUc8XponeoMWOo5VBAtgqFhRP60ultMO21mr3OwxsELPq
> m91VPn1GN23OmDtIJ3ew3X5Jd5ZnI3t1MUHnW0Bf+QPlR//5i+Brzg81tERhdKzb
> 68D6XpgtOcjKAIYdAxIDqQHOQY+QB3SqBiK7EsIFfge9zyutls1drzlTBnok/oI=
> =g1fU
> -----END PGP SIGNATURE-----


Current Thread