[Bug 5023] Relationship between identity constraints and assertions

http://www.w3.org/Bugs/Public/show_bug.cgi?id=5023





--- Comment #11 from Michael Kay <mike@saxonica.com>  2009-04-15 15:19:10 ---
>you as a skilled implementer wind up warning users away from assertions exactly because of this foreseeable concern.

No, I wouldn't for a moment warn users away from assertions where they are
appropriate. But XPath is a powerful language and you need to consider what you
are asking for. You need to be aware that if you write, as I wrote, 

test="every $a in //empno, $b in //empno satisfies $a is $b or $a ne $b"

then many implementations are going to use memory proportional to document size
and time proportional to the square of document size, while other ways of
writing the same constraint (like xs:unique) are likely to use constant memory
and linear time.

Of course some implementations may optimize some constructs, but anyone with
SQL experience knows that you can't expect every processor to optimize every
construct.

>insisting on a suitable subset of XPath would have made this less of a concern

There are many constraints that people want to express that require the full
power of XPath. I don't regard it as a "concern" that people are able to
express constraints that are expensive to evaluate - it's their decision.


-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Wednesday, 15 April 2009 15:19:20 UTC