0
これは私のサンプルxmlです。xsdの1つのフィールドで最大長のみを検証する方法
<ReportedBy>
<GivenName>amila</GivenName>
<FamilyName />
<MiddleInitials />
</ReportedBy>
<AdmittingDoctor>
<Uid>BISSEJ</Uid>
<GivenName>JEAN-CLAUDE(ROH)</GivenName>
<FamilyName>BISSERBE</FamilyName>
</AdmittingDoctor>
これは私のxsdです。このXSDの
<xs:element name="ReportedBy">
<xs:complexType>
<xs:sequence>
<xs:element ref="GivenName" minOccurs="0"/>
<xs:element ref="FamilyName" minOccurs="0"/>
<xs:element ref="MiddleInitials" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="AdmittingDoctor">
<xs:complexType>
<xs:sequence minOccurs="0">
<xs:element ref="Uid" minOccurs="0"/>
<xs:element ref="GivenName" minOccurs="0"/>
<xs:element ref="FamilyName" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:simpleType name="reviewGivenName">
<xs:restriction base="xs:string">
<xs:maxLength value="15"/>
</xs:restriction>
</xs:simpleType>
<xs:element name="GivenName" nillable="true">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="reviewGivenName">
<xs:attribute type="xs:string" name="updatable"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
iがGIVENNAMEフィールドの最大長さの上記method.because「はAdmittingDoctor」および「ReportedBy」部分の両方で検証されている使用して、フィールド「GIVENNAME」の最大長さを検証しました。
しかし、 "AdmittingDoctor"セクションの "GivenName"フィールドの最大長を検証したいのですが、私は上記のxsdを完全に自分の要件を満たすように変更できますか?どんな助けでも感謝します。
は完璧に動作します!!!ありがとうございました!!! – Thiwanka