- From: Dare Obasanjo <kpako@yahoo.com>
- Date: Wed, 9 Jan 2002 11:26:21 -0800
- To: Piccand Régis <regis.piccand@imtf.ch>, <xmlschema-dev@w3.org>
I think you should take a look at the xs:any[0] tag, usage of which is in the XML Schema Primer[1].So I think you'd do something similar to <xs:element name="content"> <xs:complexType> <xs:sequence> <xs:any minOccurs="1" maxOccurs="unbounded" processContents="skip"/> </xs:sequence> </xs:complexType> </xs:element> [0] http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-any [1] http://www.w3.org/TR/xmlschema-0/#ref32 -- THINGS TO DO IF I BECOME AN EVIL OVERLORD #71 If I decide to test a lieutenant's loyalty and see if he/she should be made a trusted lieutenant, I will have a crack squad of marksmen standing by in case the answer is no. ----- Original Message ----- From: "Piccand Régis" <regis.piccand@imtf.ch> To: <xmlschema-dev@w3.org> Sent: Wednesday, January 09, 2002 8:04 AM Subject: XML content type ? > Hello all, > > I try to write a schema, where one of my element should contain XML tags, > like follows : > > <?xml version="1.0" encoding="ISO-8859-1"?> > <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" > elementFormDefault="qualified" attributeFormDefault="unqualified"> > <xs:element name="root"> > <xs:complexType> > <xs:sequence> > <xs:element name="content" type="xs:string"> > <xs:annotation> > <xs:documentation>this element will contain an XML > string</xs:documentation> > </xs:annotation> > </xs:element> > </xs:sequence> > </xs:complexType> > </xs:element> > </xs:schema> > > The problem is that I cannot validate an XML instance document, as the > "content" tag contains an XML string. > > <?xml version="1.0" encoding="ISO-8859-1"?> > <root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:noNamespaceSchemaLocation="D:\projects\MetaEd\toto.xsd"> > <content> > > xml content should come here ... > > </content> > </root> > > > Thanks in advance for any hints ... > > Régis _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com
Received on Wednesday, 9 January 2002 11:27:15 UTC