- From: <bugzilla@wiggum.w3.org>
- Date: Fri, 15 May 2009 08:30:08 +0000
- To: www-xml-schema-comments@w3.org
http://www.w3.org/Bugs/Public/show_bug.cgi?id=6911
Summary: Include xs:documentation in xs:assert examples
Product: XML Schema
Version: 1.1 only
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: Structures: XSD Part 1
AssignedTo: David_E3@VERIFONE.com
ReportedBy: petexmldev@codalogic.com
QAContact: www-xml-schema-comments@w3.org
CC: cmsmcq@blackmesatech.com
Could we include xs:annotation elements in the xs:assert examples, e.g. do:
<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:annotation><xs:documentation>
The value of the min attribute must be less
than or equal to that of the max attribute.
</xs:documentation></xs:annotation>
</xs:assert>
</xs:complexType>
and:
<xs:complexType name="arrayType">
<xs:sequence>
<xs:element name="entry" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="length" type="xs:int"/>
<xs:assert test="@length eq fn:count(./entry)">
<xs:annotation><xs:documentation>
The value of the length attribute must be the same as the number
of occurrences of entry sub-elements.
</xs:documentation></xs:annotation>
</xs:assert>
</xs:complexType>
I think this would be a good opportunity to show what looks like a good best
practice for defining xs:asserts.
--
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 Friday, 15 May 2009 08:30:18 UTC