Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

InternationalAddressStructure help

Status
Not open for further replies.

ghalewood

Programmer
Nov 13, 2001
42
EU
Hi all,

I have a schema for P14 returns to the inland revenue. I am having a problem with <line> when validating the file. The <line> is part of

<xsd:element minOccurs="0" maxOccurs="1" name="Address" type="InternationalAddressStructure"/>

and for some reason the XML we have is failing the validation. I have tried everywhere and I cannot find what the valid structure, characters etc are of the InternationalAddressStructure, this is the nearest possibility

<xsd:complexType name="InternationalAddressStructure">
<xsd:sequence>
<xsd:element name="IntAddressLine" type="AddressLineType" minOccurs="2" maxOccurs="5"/>
<xsd:choice>
<xsd:sequence>
<xsd:element name="Country" type="AddressLineType"/>
<xsd:element name="InternationalPostCode" type="InternationalPostCodeType" minOccurs="0"/>
</xsd:sequence>
<xsd:sequence>
<xsd:element name="InternationalPostCode" type="InternationalPostCodeType"/>
<xsd:element name="Country" type="AddressLineType" minOccurs="0"/>
</xsd:sequence>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>

and without going through several thousand addresses removing what I think is invalid, I'm a bit stuck.

<Address>
<Line>15 SOMEWHERE AVENUE</Line>
<Line>THEREABOUTS</Line>
<Line>NEAR HERE</Line>
<Line>NEVERSHIRE</Line>
<PostCode>ZZ11 7ZZ</PostCode>
</Address>

Does anyone know what characters, field sizes/structure etc are allowable.

Thanks
Graham
 
Do you have a link to the schema?

Jon

"There are 10 types of people in the world... those who understand binary and those who don't.
 
Hi,

Got it sorted. Thank for replying though. The valid characters are

Value 'CHANDLER`S FORD' is not facet-valid with respect to pattern '[A-Za-z0-9 ~!"@#$%&'\(\)\*\+,\-\./:;<=>\?\[\\\]^_\{\}£€]*' for type 'null'.

(finally got the XML validator going correctly)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top