[Bug 5023] Relationship between identity constraints and assertions

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


Michael Kay <mike@saxonica.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mike@saxonica.com




--- Comment #9 from Michael Kay <mike@saxonica.com>  2009-04-14 23:05:13 ---
If we're advising users which of these mechanisms to use under which
circumstances, then I think there are two observations I would want to make:

(a) it's a lot easier for an implementation to enforce identity constraints and
CTA while processing the document in a streaming manner than it is to enforce
assertions

(b) using a specialized mechanism such as identity constraints rather than a
general mechanism like assertions may result in a more focused and intelligible
error message when the condition is violated. For example, the assertion
test="count(//empno)=count(distinct-values(//empno))" is unlikely, if violated,
to result in an error message that tells the user how many duplicate employee
numbers there are, which numbers are duplicated, or where to look for them in
the instance document. I think the same is probably true of other reasonable
ways of expressing this constraint, such as test="every $a in //empno, $b in
//empno satisfies $a is $b or $a ne $b"


-- 
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 Tuesday, 14 April 2009 23:05:22 UTC