Re: elements with children vs typed-value

> E.g. assuming that price is declared to be an element of type
> xs:decimal, the first constructor would be used to create a
> representation of the fragment <price>95.99</price> in a source
> document, but the second constructor would be used to deal
> with the XQuery constructor <price>{95.99}</price>.
> In both cases the element constructed has
>  typed-value:  simple-typed-value(95.99,xs:decimal)
>  children:     text("95.99")
>  string-value: "95.99"

This is a helpful example.  What was not clear to me was how an
element could have hoth children and a typed-value.  The suggestion
to me was that element-complex-node could only create an element of
complex type, in which case the typed-value is empty.  Perhaps it
would be useful to clarify that element-complex-node even when the
element has a smple type?


There is still the complication that:
<a>{$x}</a>
would have to cbe implemented using element-complex-node if $x is a
node, and using element-simple node if $x is a typed value.  This is
awkward enough, but what happens if $x is a sequence, containing both a
node and a typed value?  I'm assuming in that case element-complex-node
has to be used.
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/per/

Received on Monday, 4 March 2002 02:33:51 UTC