早上好 - -
我是xsd的新手,我遇到了我的" customdata"复杂的类型。 它不允许我为CustomData提供多个值。例如,CustomValue应该大于1,但它阻止我拥有多个" CustomValue" ..
这是为什么?我试图联系" CustomData"个别信件。
<?xml version="1.0" encoding="utf-8"?>
<xs:schema targetNamespace="http://fult.com/FFCLetters.xsd"
elementFormDefault="qualified"
xmlns="http://fult.com/FFCLetters.xsd"
xmlns:mstns="http://tempuri.org/XMLSchema.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:attributeGroup name="AG_Address">
<xs:annotation>
<xs:documentation>
Property Address
</xs:documentation>
</xs:annotation>
<xs:attribute name="Address1" type="xs:string" use="required"/>
<xs:attribute name="Address2" type="xs:string" use="optional"/>
<xs:attribute name="City" type="xs:string" use="required"/>
<xs:attribute name="State" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="2"/>
<xs:minLength value="2"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="ZIP" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="10" />
<xs:minLength value="5" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:attributeGroup>
<xs:attributeGroup name="AG_Person">
<xs:annotation>
<xs:documentation>
Property Owner Information
</xs:documentation>
</xs:annotation>
<xs:attribute name="Name" use="required" type="xs:string"></xs:attribute>
<xs:attribute name="TaxID" use="optional">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="11"/>
<xs:minLength value="9"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:attributeGroup>
<xs:complexType name="CT_Payment">
<xs:attribute name="ProcessedDate" type="xs:date" use="optional"/>
<xs:attribute name="EffectiveDate" type="xs:date" use="required"/>
<xs:attribute name="Description" type="xs:string" use="optional"/>
<xs:attribute name="PrincipalAmount" type="xs:double" use="optional"/>
<xs:attribute name="InterestAmount" type="xs:double" use="optional"/>
<xs:attribute name="TotalAmount" type="xs:double" use="required"/>
</xs:complexType>
<xs:complexType name="CT_CreditCounselingAgency">
<xs:annotation>
<xs:documentation>
Current Credit Counseling Agency for Property Owner.
</xs:documentation>
</xs:annotation>
<xs:attribute name="Name" use="required" type="xs:string"/>
<xs:attributeGroup ref="AG_Address" />
</xs:complexType>
<xs:complexType name="CT_CreditCounselingAgencies">
<xs:annotation>
<xs:documentation>
Possible Credit Counseling Agencies.
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="CreditCounselingAgency" maxOccurs="unbounded" minOccurs="0" type="CT_CreditCounselingAgency"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="CT_PaymentHistory">
<xs:annotation>
<xs:documentation>
Property Owner Payment History.
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="Payment" type="CT_Payment" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="NoHistoryMessage" use="required" type="xs:string"/>
<xs:attribute name="BeginningDate" use="required" type="xs:date"/>
<xs:attribute name="EndingDate" use="required" type="xs:date"/>
<xs:attribute name="Count" use="optional">
<xs:simpleType>
<xs:restriction base="xs:long">
<xs:minInclusive value="1"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
<xs:complexType name="CT_Account">
<xs:annotation>
<xs:documentation>
Aggregation of Account Data
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="PaymentHistory" type="CT_PaymentHistory" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="AccountNumber" use="required" type="xs:string"/>
<xs:attribute name="AccountID" use="optional" type="xs:long"/>
<xs:attribute name="RecordDate" use="required" type="xs:date"/>
</xs:complexType>
<xs:complexType name="CT_Recipient">
<xs:attributeGroup ref="AG_Person" />
<xs:attributeGroup ref="AG_Address" />
</xs:complexType>
<xs:complexType name="CT_Recipients">
<xs:sequence>
<xs:element name="Person" type="CT_Recipient" minOccurs="1" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="Count" use="optional">
<xs:simpleType>
<xs:restriction base="xs:long">
<xs:minInclusive value="1"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
<xs:complexType name="CT_Property">
<xs:all>
<xs:element name="Owners" type="CT_Recipients" minOccurs="1"/>
<xs:element name="CreditCounselingAgencies" type="CT_CreditCounselingAgencies" minOccurs="0"/>
</xs:all>
<xs:attributeGroup ref="AG_Address" />
<xs:attribute name="ParcelID" type="xs:string" use="optional"/>
<xs:attribute name="CountyName" type="xs:string" use="optional"/>
</xs:complexType>
<xs:complexType name="CT_LetterFile">
<xs:sequence>
<xs:element name="Letter" type="CT_Letter" minOccurs="1" maxOccurs="unbounded" />
</xs:sequence>
<xs:attribute name="Count" use="optional">
<xs:simpleType>
<xs:restriction base="xs:long">
<xs:minInclusive value="1" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
<xs:complexType name="CT_Letter">
<xs:all>
<xs:element name="Account" type="CT_Account" minOccurs="1"/>
<xs:element name="Property" type="CT_Property" minOccurs="0"/>
<xs:element name="Recipients" type="CT_Recipients" minOccurs="1"/>
<xs:element name="CustomData" type="CT_Custom" minOccurs="0" />
</xs:all>
<xs:attribute name="RequestID" use="required">
<xs:simpleType>
<xs:restriction base="xs:long">
<xs:minInclusive value="1"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="CertifiedMail" type="xs:boolean" default="false" use="optional"/>
</xs:complexType>
<xs:complexType name="CT_Custom">
<xs:all>
<xs:element name="CustomValues" type="CT_CustomData" minOccurs="0" />
</xs:all>
<xs:attribute name="Count" use="optional">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50" />
<xs:minLength value="1"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
<xs:complexType name="CT_CustomData">
<xs:sequence>
<xs:element name="CustomValue"/>
</xs:sequence>
<xs:attribute name="Count" use="optional">
<xs:simpleType>
<xs:restriction base="xs:long">
<xs:minInclusive value="1"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="Value" type="xs:string"/>
</xs:complexType>
<xs:element name="LetterFile" type="CT_LetterFile" />
</xs:schema>
&#13;
<?xml version="1.0" encoding="utf-8"?>
<LetterFile xmlns="http://fult.com/FFCLetters.xsd" Count="2">
<Letter RequestID="12">
<Account AccountNumber="1234567890" AccountID="234" RecordDate="2015-03-31">
<PaymentHistory Count="1" NoHistoryMessage="No Payment Activity" BeginningDate="2014-01-01" EndingDate="2015-12-31">
</PaymentHistory>
</Account>
<Recipients>
<Person Name="Dan Hollinger" Address1="3467 Main St" City="Conestoga" State="PA" ZIP="17516"/>
<Person Name="Nicole Osgood" Address1="123 Main St" Address2="PO Box 12" City="Lititz" State="PA" ZIP="17543-6546"/>
</Recipients>
<Property Address1="213 Valleybrook Dr" City="Lancaster" State="PA" ZIP="17601">
<Owners>
<Person Name="Jenn Hollinger" Address1="3467 Main St" City="Conestoga" State="PA" ZIP="17516" />
</Owners>
</Property>
</Letter>
<Letter RequestID="13">
<Account AccountNumber="1234567890" AccountID="234" RecordDate="2015-03-31">
<PaymentHistory Count="1" NoHistoryMessage="No Payment Activity" BeginningDate="2014-01-01" EndingDate="2015-12-31">
<Payment Description="Payment 1" EffectiveDate="2014-02-01" TotalAmount="354.54"/>
</PaymentHistory>
</Account>
<Recipients>
<Person Name="Dan Hollinger" Address1="3467 Main St" City="Conestoga" State="PA" ZIP="17516"/>
<Person Name="Nicole 1Osgood" Address1="123 Main St" Address2="PO Box 12" City="Lititz" State="PA" ZIP="17543-6546"/>
</Recipients>
<Property Address1="213 Valleybrook Dr" City="Lancaster" State="PA" ZIP="17601">
<Owners>
<Person Name="Jenn Hollinger" Address1="3467 Main St" City="Conestoga" State="PA" ZIP="17516" />
</Owners>
</Property>
<CustomData Count="4">
<CustomValues>
<CustomValue Name="BankOriginating" Value="The Peoples Bank of Elkton" />
<CustomValue Name="DateFrom" Value="07/01/13" />
<CustomValue Name="DateTo" Value="06/29/15" />
<CustomValue Name="lienPosition" Value="1" />
</CustomValues>
</CustomData>
</Letter>
</LetterFile>
&#13;
答案 0 :(得分:0)
您没有为maxOccurs
指定CustomValue
。这意味着使用默认值1。
您应指定maxOccurs="unbounded"
。