xsl-list
[Top] [All Lists]

Re: [xsl] When to use text()

2014-03-24 14:04:32
-----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(_at_)kosek(_dot_)cz      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-----

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>