Validating xs:nonNegativeInteger in schema 1.0 with oXygen
This should cover W3C XML Schema, Relax NG and DTD related problems.
-
- Posts: 43
- Joined: Tue Jul 26, 2016 6:31 pm
Validating xs:nonNegativeInteger in schema 1.0 with oXygen
One last validation question for this week:
I'm trying to validate an instance containing
against the XML Schema 1.0 spec containing
but oXygen is not giving me a validation error for the - even though it gives correct validation errors for non-numbers, empty or decimal points.
Am I indicating the negative integer wrongly in the test data? Have I defined the content type wrongly?
I also tried to define this based off of xs:int as below but again this didn't give an error for -78 etc.
I'm trying to validate an instance containing
Code: Select all
<RecordCount>-78</RecordCount>
Code: Select all
<xs:element name="RecordCount" type="xs:nonNegativeInteger">
<xs:annotation>
<xs:documentation>The number of data records in the file. Can be a positive whole (integer) number, or zero (0).</xs:documentation>
</xs:annotation>
</xs:element>
Am I indicating the negative integer wrongly in the test data? Have I defined the content type wrongly?
I also tried to define this based off of xs:int as below but again this didn't give an error for -78 etc.
Code: Select all
<xs:simpleType name="CountType">
<xs:annotation>
<xs:documentation>A count must be a whole number, equal to zero or more.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:int">
<xs:minInclusive value="0"/>
</xs:restriction>
</xs:simpleType>
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: Validating xs:nonNegativeInteger in schema 1.0 with oXygen
Hi,
Both give me an error on -78 (they both work with 78). So it's something else, not the type declaration.
Regards,
Adrian
Both give me an error on -78 (they both work with 78). So it's something else, not the type declaration.
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service