로하는 SimpleType 또는 제한에 속성을 추가 다음과 같이 문제는 :XML을의 복합 타입 스키마
나는 다음과 같은 XML 조각이 있습니다
<time format="minutes">11:60</time>
문제는 내가 모두를 추가 할 수 있다는 것입니다을 속성과 제한을 동시에 적용 할 수 있습니다. 속성 형식은 분, 시간 및 초 값만 가질 수 있습니다. 시간은 내가 timeType의 복합 형식을하면, 내가 속성 있지만 제한을 추가 할 수 있습니다 \d{2}:\d{2}
<xs:element name="time" type="timeType"/>
...
<xs:simpleType name="formatType">
<xs:restriction base="xs:string">
<xs:enumeration value="minutes"/>
<xs:enumeration value="hours"/>
<xs:enumeration value="seconds"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="timeType">
<xs:attribute name="format">
<xs:simpleType>
<xs:restriction base="formatType"/>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
restrictionpattern을 가지고, 나는 간단한 유형을 만들 경우, 나는 제한이 아닌 속성을 추가 할 수 있습니다 . 이 문제를 해결할 수있는 방법이 있습니까? 이것은 매우 이상한 제한이 아니거나 그렇지 않습니까?
soooo 많은 감사합니다! – t1gor