- From: Rahul Srivastava <Rahul.Srivastava@Sun.COM>
- Date: Thu, 14 Feb 2002 22:02:39 +0000 (Asia/Calcutta)
- To: xmlschema-dev@w3.org
- Cc: Eamon.Galavan@risk.sungard.com
> Eamon.Galavan@risk.sungard.com wrote... > > 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? Both the schema/instance doc. looks fine to me. [As you have not mentioned schemaLocation in your instance file, I presume, the schema is available to the processor.] Cheers, Rahul. > > 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:38:33 UTC