W3C home > Mailing lists > Public > public-qt-comments@w3.org > February 2004

RE: [DM] Typed value for elements

From: Michael Kay <mhk@mhk.me.uk>
Date: Thu, 12 Feb 2004 19:15:18 -0000
To: <jwrobie@mindspring.com>
Cc: "'Jonathan Robie'" <jonathan.robie@datadirect.com>, "'XML Query Comments'" <public-qt-comments@w3.org>
Message-ID: <000001c3f19c$8e04d760$6401a8c0@pcukmka>

> >The expression:
> >
> >  <xsl:value-of select="div/head"/>
> >
> >would break.
> >  
> >
> This is the kind of example I have seen most frequently in this 
> discussion - examples where formatting occurs in a string, and either 
> string comparisons or value-of are done.

Precisely. That's what mixed content is all about. The text is the
information, the markup is incidental. It's not just <xsl:value-of>,
it's any operation that cares more about the text than about the markup.
The expression contains(head, "H2O") should indeed return true, because
the markup is mere annotation.

Certainly such constructs shouldn't suddenly cause stylesheets to fail
because someone discovers that the DTD allows markup in a heading and
decides to exploit the capability.

The only other approach I could think of would be that atomization is
sensitive to the required type, and gives you the string value if the
required type is string. But this is piling up the complexities, in my
view unnecessarily.

Michael Kay
Received on Thursday, 12 February 2004 14:14:38 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:14:05 GMT