[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Test for mixed content

Subject: Re: Test for mixed content
From: Jirka Kosek <jirka@xxxxxxxx>
Date: Wed, 12 Sep 2007 14:06:34 +0200
Re:  Test for mixed content
-----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@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 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-----

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2011 All Rights Reserved.