XML Query Use Case XMP, query 10 again

XML Query Use Cases
W3C Working Draft 08 June 2001

1.1.9.10 Use Case XMP, query 10

The Solution in XQuery passes a sequence of nodes (<price> elements) to the
'min' function. While this is compatible with xf:min's declared parameter-
type of anyType*, I don't think the result is defined, because the relation
"is less than" is not defined on nodes.

For a less dubious solution, replace
    { min($p) }
with
    <price>{ min(decimal($p/text())) }</price>

-Michael Dyck

Received on Saturday, 10 November 2001 20:42:30 UTC