Help with this sample

Hi,

I am trying to validate some xml against the following, In the attached
files i have:

bl.xml:

<?xml version="1.0" encoding="utf-8"?>
<TypeValidation xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:schemaLocation='http://www.blexample.com bl.xsd'
xmlns='http://www.blexample.com'>
<birthTime>4444</birthTime>
<correct>true</correct>
<telecom>+93242345</telecom>
<telecom>1011101010101010</telecom>
<addr>
    <city>test</city>  <--------------- PROBLEM
</addr>
</TypeValidation>


bl.xsd:

<?xml version="1.0" encoding="utf-8" ?>
<xs:schema targetNamespace="http://www.blexample.com"
xmlns="http://www.blexample.com"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:hl7="http://www.blexample.com"
elementFormDefault="qualified">
<xs:include schemaLocation="../dt/bldatatypes.xsd" />
<xs:element name="TypeValidation">
<xs:complexType>
<xs:annotation>
<xs:appinfo>
<p>this is a test</p>
<diff>PQ</diff>
</xs:appinfo>
</xs:annotation>
<xs:sequence>
<xs:element name="birthTime" type="TS" minOccurs="0" maxOccurs="1" />
<xs:element name="correct" type="BL" minOccurs="0" maxOccurs="1" />
<xs:element name="telecom" type="TEL" minOccurs="0" maxOccurs="1" />
<xs:element ref="addr"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="addr">
<xs:complexType>
<xs:sequence>
<xs:element name="addr" type="AD" minOccurs="0" maxOccurs="1" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

My question is with regards to the AD type which is defined in
bldatatypes.xsd, when I try
something like:

<addr>
    <city>xxcx</city>
</addr>

my xml will not validate, from the definition in bldatatypes.xsd I thought
this should be possible...
the error is  The active schema does not support the element 'city'.

eg:

<xs:complexType name="AD" mixed="true">
<xs:annotation>
<xs:documentation>
Mailing and home or office addresses. A sequence of address parts,
such as street or post office Box, city, postal code, country, etc.
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="delimiter">
<xs:complexType mixed="true">
<xs:complexContent mixed="true">
<xs:restriction base="ADXP">
<xs:element name="city">
<xs:complexType mixed="true">
<xs:complexContent mixed="true">
<xs:restriction base="ADXP">
<xs:attribute name="partType" type="cs_AddressPartType" fixed="CTY"/>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
</xs:element>
etc........

IMPORTANT:  

This email transmission is intended for the exclusive use of 
the person, organisation, or corporation to which it is addressed,
and may contain information that is privileged or confidential.  
If the reader of this email transmission is not the intended 
recipient, or an employee or agent responsible for delivering this 
email transmission to the intended recipient, you are hereby notified
that any disclosure, distribution (forwarding) or copying of this 
email transmission is prohibited and that the contents must be kept 
strictly confidential.  

If you have received this email transmission in error, kindly notify us 
immediately by return email or telephone and delete email immediately.  

Thank you.

Received on Wednesday, 17 September 2003 02:38:51 UTC