RE: [xsl] Test for mixed content

Subject: RE: [xsl] Test for mixed content
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 12 Sep 2007 12:36:02 +0100
Technically I think "mixed content" is a property of an element type in a
schema or DTD, it is not a property of an instance. Given an instance such
as <a>xyz</a> or <a><b/></a> you can't actually tell whether the schema/DTD
allows mixed content or not.

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

Michael Kay 

> -----Original Message-----
> From: jesper.tverskov@xxxxxxxxx 
> [mailto:jesper.tverskov@xxxxxxxxx] On Behalf Of Jesper Tverskov
> Sent: 12 September 2007 12:06
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: [xsl] Test for mixed content
> Hi list
> What is the best way to test if an element contains mixed content.
> Cheers
> Jesper Tverskov

Current Thread