- From: <bugzilla@wiggum.w3.org>
- Date: Mon, 13 Apr 2009 10:08:35 +0000
- To: www-xml-schema-comments@w3.org
http://www.w3.org/Bugs/Public/show_bug.cgi?id=6804
Summary: assertions example doubt
Product: XML Schema
Version: 1.1 only
Platform: All
URL: http://www.w3.org/TR/xmlschema11-1/
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Structures: XSD Part 1
AssignedTo: David_E3@VERIFONE.com
ReportedBy: gandhi.mukul@gmail.com
QAContact: www-xml-schema-comments@w3.org
CC: cmsmcq@blackmesatech.com
In the XML Schema 1.1 specification at, http://www.w3.org/TR/xmlschema11-1/
an example for assertions feature is given as (in the section, 3.13.2):
<xs:complexType name="intRange">
<xs:attribute name="min" type="xs:int"/>
<xs:attribute name="max" type="xs:int"/>
<xs:assert test="@min le @max"/>
</xs:complexType>
As per the XPath 2.0 specification (at, http://www.w3.org/TR/xpath20/), the
operator "le" is defined for following operand types:
numeric, numeric
xs:string, xs:string
xs:date, xs:date
and many other types of operands.
It seems to me, that above complex type definition assumes that the XML Schema
1.1 processor would perform the XPath 2.0 operation @min le @max by implicitly
converting the values @min and @max to numeric, at runtime.
Does the assertion processor has to infer the type of @min and @max from the
types of attribute declarations (i.e., from the syntax xs:attribute)?
I am thinking, that the above assertion component should have been written
like, <xs:assert test="xs:int(@min) le xs:int(@max)"/>
Could you please clarify this?
Regards,
Mukul
--
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 10:08:43 UTC