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

XML content type ?

From: Piccand Régis <regis.piccand@imtf.ch>
Date: Wed, 9 Jan 2002 17:04:27 +0100
Message-ID: <DF7EC83D7AFBD411965B0008C7596EC53ED4D1@imtfexchange.imtf.ch>
To: xmlschema-dev@w3.org
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
Received on Wednesday, 9 January 2002 11:11:01 GMT

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