XMLSpy says "valid" -- oXygen says "invalid&q
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 10
- Joined: Wed Jul 07, 2004 7:45 pm
XMLSpy says "valid" -- oXygen says "invalid&q
I was not sure if I should post this to Problems or Feature Requests, so I am trying here first.
Here is the sample
XML-Spy says this is valid.
oXygen says "It is an error for both length and either of minLength or maxLength to be specified."
I found errata here (http://www.w3.org/2001/05/xmlschema-errata#e2-66) that says that it is OK to do it this way.
How do we proceed from here ?
Here is the sample
Code: Select all
<xs:simpleType name="TimeType">
<xs:restriction base="xs:string">
<xs:length value="6"/>
<xs:minLength value="6"/>
<xs:maxLength value="6"/>
<xs:pattern value="[0-2][0-3][0-5][0-9][0-5][0-9]"/>
</xs:restriction>
</xs:simpleType>
oXygen says "It is an error for both length and either of minLength or maxLength to be specified."
I found errata here (http://www.w3.org/2001/05/xmlschema-errata#e2-66) that says that it is OK to do it this way.
How do we proceed from here ?
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Hi Dan,
The erata specifies two conditions linked by and for each of the maxLength and minLength facets:
I think the erata allows something like:
which is successfully validated by Oxygen.
Oxygen uses the latest Xerces release (2.6.2) to perform XML schema validation.
Best Regards,
George
The erata specifies two conditions linked by and for each of the maxLength and minLength facets:
Your schema does not fulfill the second condition (1.2 and 2.2, respectively) as the base type is xs:string which does not have the minLength or the maxLength facet defined, therefore it is invalid.If length is a member of {facets} then
1 It is an error for minLength to be a member of {facets} unless
1.1 the {value} of minLength <= the {value} of length and
1.2 there is type definition from which this one is derived by one or more restriction steps in which minLength has the same {value} and length is not specified.
2 It is an error for maxLength to be a member of {facets} unless
2.1 the {value} of length <= the {value} of maxLength and
2.2 there is type definition from which this one is derived by one or more restriction steps in which maxLength has the same {value} and length is not specified.
I think the erata allows something like:
Code: Select all
<xs:simpleType name="TimeTypeBase">
<xs:restriction base="xs:string">
<xs:minLength value="6"/>
<xs:maxLength value="6"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="TimeType">
<xs:restriction base="TimeTypeBase">
<xs:length value="6"/>
<xs:pattern value="[0-2][0-3][0-5][0-9][0-5][0-9]"/>
</xs:restriction>
</xs:simpleType>
Oxygen uses the latest Xerces release (2.6.2) to perform XML schema validation.
Best Regards,
George
-
- Posts: 10
- Joined: Wed Jul 07, 2004 7:45 pm
-
- Posts: 10
- Joined: Wed Jul 07, 2004 7:45 pm
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
I think yes, there is no point to define a maxLength or a minLength together with length, this will be redundant. However, if a base type specifies a maxLength it makes sense to restrict that to the maximum specified length value in a derived type by restriction.
Oxygen uses the Java version of Xerces, Xerces J. Anyway some of the Xerces J developers are among the Xerces C developers so they should be quite similar.
Best Regards,
George
Oxygen uses the Java version of Xerces, Xerces J. Anyway some of the Xerces J developers are among the Xerces C developers so they should be quite similar.
Best Regards,
George
-
- Posts: 10
- Joined: Wed Jul 07, 2004 7:45 pm
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ 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