If you have a facet like <xsd:minLength value="5" fixed="true" />, you
should
be able to have <xsd:minLength value="5" /> in restrictions of it, as long
as
the values are the same. If I try using the schema below, I get the error:
"Base type has {fixed} equal to true."
XML-Schema part2 Datatype, 4.3.2.1:
(http://www.w3.org/TR/xmlschema-2/#dc-minLength)
"If {fixed} is true, then types for which the current type is the {base
type definition} cannot specify a value for minLength other than
{value}."
So my schema is valid according to the specification. I appear to be using
Framework 1.1.4322, is this fixed in more recent versions?
David
<xsd:schema xmlns:test="http://example.com/test1"
targetNamespace="http://example.com/test1"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" version="2.0" id="core"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xsd:simpleType name="a">
<xsd:restriction base="xsd:string">
<xsd:minLength value="5" fixed="true"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="b">
<xsd:restriction base="test:a">
<xsd:minLength value="5" />
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>