[Bug 6804] assertions example doubt

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


Michael Kay <mike@saxonica.com> changed:

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




--- Comment #2 from Michael Kay <mike@saxonica.com>  2009-04-13 21:48:49 ---
It's a sensible question to ask. The example is correct, though one could argue
that it would be more useful to the reader if there was a more detailed
explanation given.

Validation Rule: Assertion Satisfied, clause 1, explains how an XDM instance is
constructed to act as the target for evaluating the XPath expression in an
assertion. The note: "Note: It is a consequence of this rule that the
[attributes] and [children] of E will be validated in the usual way." sums up
what happens: the attributes and children of E (the element on whose type the
assertion is defined) are validated before E is validated, and this validation
results in them acquiring type annotations. So this assertion test="@min le
@max" is comparing two attribute nodes with the type annotation xs:int.
Explicit casting to xs:int is therefore not needed.

Michael Kay (personal response)


-- 
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 Monday, 13 April 2009 21:49:00 UTC