Re: [xsl] When to use text()

Subject: Re: [xsl] When to use text()
From: Jirka Kosek <jirka@xxxxxxxx>
Date: Mon, 24 Mar 2014 20:04:09 +0100
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 21.3.2014 12:08, Heiko Niemann wrote:
> then I can't tell a difference for /box/item  and /box/item/text()
> using value-of. I understand that value-of actually selects the
> value ('apple') of the node (/box/item). Does that mean that using
> /box/item/text() is wrong, unnecessary or just a matter of style or
> performance?

In 99% text() is wrongly used, see:

http://www.ibm.com/developerworks/library/x-xsltmistakes/#nodetest

			Jirka

- -- 
- ------------------------------------------------------------------
  Jirka Kosek      e-mail: jirka@xxxxxxxx      http://xmlguru.cz
- ------------------------------------------------------------------
       Professional XML consulting and training services
  DocBook customization, custom XSLT/XSL-FO document processing
- ------------------------------------------------------------------
 OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 rep.
- ------------------------------------------------------------------
    Bringing you XML Prague conference    http://xmlprague.cz
- ------------------------------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlMwgakACgkQzwmSw7n0dR46SgCgk843qgkYIlZV9RZoo+N9cxIL
WdEAn09bIhdEZlYdKwpVMzTpHc6Q0AFa
=+9L6
-----END PGP SIGNATURE-----

Current Thread