W3C home > Mailing lists > Public > xmlschema-dev@w3.org > February 2002

[xmlschema-dev] <none>

From: <Eamon.Galavan@risk.sungard.com>
Date: Thu, 14 Feb 2002 16:01:51 +0000
To: xmlschema-dev@w3.org
Message-ID: <OF62DEBC6C.F94A3535-ON80256B60.0057CE58@infinity.com>
Hi,
I am having some problems getting to grips with the <any> key.
I have got the schema below with the <any> key.

<?xml version="1.0" encoding="utf-8" ?>
<xs:schema id="test5" targetNamespace="http://tempuri.org/test5.xsd"
elementFormDefault="qualified" xmlns="http://tempuri.org/test5.xsd" xmlns:
mstns="http://tempuri.org/test5.xsd" xmlns:xs="
http://www.w3.org/2001/XMLSchema">
     <xs:element name="Letters">
          <xs:complexType>
               <xs:sequence>
                    <xs:element name="a" type="a" />
                    <xs:element name="b" type="b" />
                    <xs:any processContents="skip"></xs:any>
               </xs:sequence>
          </xs:complexType>
     </xs:element>
     <xs:simpleType name="a">
          <xs:restriction base="xs:string" />
     </xs:simpleType>
     <xs:simpleType name="b">
          <xs:restriction base="xs:string" />
     </xs:simpleType>
</xs:schema>

If I add the data below

<?xml version="1.0" encoding="utf-8" ?>
<Letters xmlns="http://tempuri.org/test5.xsd">
     <a></a>
     <b></b>
     <c></c>
</Letters>

I get the error that the schema does not support the element c.
If I remove the <c> then the validater complains that the data is
incomplete.
I just want to any data that I please, the does not need to be validated
after <b>
Can anyone what I am doing wrong?

Thanks in advance for any help you can give me.

Eamon.



**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************
Received on Thursday, 14 February 2002 11:06:36 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:26 GMT