- From: Mary Holstege <mary@cerisent.com>
- Date: Tue, 17 Feb 2004 10:16:22 -0800
- To: public-qt-comments@w3.org
> How can a user write a function that statically reduces the type and
> raises an error if the dynamic cardinality is too big?
> Best regards
> Michael
Perhaps I'm missing something, but I don't see why these don't do the
trick.
The rules for sequence type matching allow you to report this either
statically
or dynamically:
define function exactly-one ( $items as item() ) as item()*
{
$items
}
define function one-or-more ( $items as item()+ ) as item()*
{
$items
}
define function zero-or-more ( $items as item()* ) as item()*
{
$items
}
//Mary
Received on Tuesday, 17 February 2004 13:16:34 UTC