- From: Ashok Malhotra <ashokma@microsoft.com>
- Date: Thu, 8 Nov 2001 07:08:39 -0800
- To: "Saul Farber" <saul@syncline.com>, <xmlschema-dev@w3.org>
Your problem may be in the namespace = ##other on the any element. This means that any element from a namespace other than the target namespace of the schema is allowed. All the best, Ashok =========================================================== Ashok Malhotra <mailto: ashokma@microsoft.com> Microsoft Corporation -----Original Message----- From: Saul Farber [mailto:saul@syncline.com] Sent: Wednesday, November 07, 2001 5:51 PM To: xmlschema-dev@w3.org Subject: <xsd:any> misunderstandings? Hello again! I think I have a misunderstanding of what <xsd:any> does, perhaps someone could set me straight? When defining WSDL types, one uses a bit of XML like the following: <types> <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"> ... </xsd:schema> </types> The definition of the "types" element in the WSDL-schema (version 1.1) is as follows (from http://schemas.xmlsoap.org/wsdl/): <element name="types" type="wsdl:typesType"/> <complexType name="typesType"> <complexContent> <extension base="wsdl:documented"> <sequence> <any namespace="##other" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> So I wrote the following xml (to conform to this schema), thinking that the <any> element would let me write xml like the above...with the correct namespace, etc. However, when validating, I get the following error >> Error on line 20 of document /home.../document.xml: Element type "xsd:schema" must be declared. I thought the whole point of having an <xsd:any> tag was to ELIMINATE the need to pre-declare exactly was is to go into the xml! My <xsd:schema> structure is both well-formed and valid, I just can't seem to get the <xsd:any> element to "accept" an un-declared child. I can always fix this by setting the "processContents" attribute of the <any> element to "skip", but this defeats what I want to do...which is have valid xml-schema in the <types> section of the WSDL. What am I missing here...is my understanding of exactly what <xsd:any> does wrong?> thanks in advance! saul -- Syncline, Inc. 373 Washington St. Boston, MA 02108 617-986-1000 (x248) www.syncline.com -- Informing the Enterprise www.mapciti.com -- It's Your Town on the Web
Received on Thursday, 8 November 2001 10:09:27 UTC