RE: [DM] Typed value for elements

> 
> It would be much simpler and cleaner to say that 
> dm:typed-value() returns an error for any node with child 
> elements. This is incompatible with the behavior of XPath 
> 1.0, but so is the current behavior for elements of known 
> complex type.
> 

This would mean that given:

  <div>
    <head>The properties of H<sub>2</sub>O</head>
  </div>

The expression:

  <xsl:value-of select="div/head"/>

would break.

What's more, it would work on the first 200 documents that you test it
against, if your testing is sufficiently thorough, and it would then
break on the 201st.

Not acceptable!

Breaking in the case of element-only content (as currently defined) is
much more acceptable because (a) it only breaks if you add a schema, (b)
this kind of construct with element-only content is unusual, whereas
with mixed content it is very common, and (c) it would break on the
first document you tested it against.


Michael Kay

Received on Thursday, 12 February 2004 05:29:54 UTC