W3C home > Mailing lists > Public > xmlschema-dev@w3.org > September 2003

Help with this sample

From: <chris@publicbar.com>
Date: Wed, 17 Sep 2003 16:26:57 +1000
Message-ID: <004a01c37ce4$b2267b80$1e0ba8c0@geckodev.breastscreen.org.au>
To: <xmlschema-dev@w3.org>

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


<?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'
    <city>test</city>  <--------------- PROBLEM


<?xml version="1.0" encoding="utf-8" ?>
<xs:schema targetNamespace="http://www.blexample.com"
<xs:include schemaLocation="../dt/bldatatypes.xsd" />
<xs:element name="TypeValidation">
<p>this is a test</p>
<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:element name="addr">
<xs:element name="addr" type="AD" minOccurs="0" maxOccurs="1" />

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


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'.


<xs:complexType name="AD" mixed="true">
Mailing and home or office addresses. A sequence of address parts,
such as street or post office Box, city, postal code, country, etc.
<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"/>


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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:13 UTC