xsl-list
[Top] [All Lists]

Re: [xsl] Test for mixed content

2007-09-12 05:06:15
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Michael Kay wrote:

But at the instance level you can test whether an element has both
(non-whitespace) child text nodes and child elements using test="* and
text()[normalize-space(.)]".

I think that reliable test have to use schema as you already pointed
out. Your instance test will fail on following XHTML fragment which
should have mixed content, but doesn't have non-whitespace child text nodes:

<p><i>Mike</i> <b>Kay</b></p>

In this case whitespace between i and b elements is significant.

                        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 member
- ------------------------------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG59ZKzwmSw7n0dR4RAg/2AJ49b+tTpK6ZuHH6Vc0qHK55GYSVggCgpRW/
EzWPMFGABW4eHfePHwlnycQ=
=F9Yk
-----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>