OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Embed an XML document in another XML document

[ Lists Home | Date Index | Thread Index ]


I would like to create a XML Schema that would define the structure of an
XML document that contains XML document

Typically, something like

<?xml version="1.0" encoding="UTF-8"?>
<message ... >
    <?xml version="1.0" encoding="UTF-8"?>
<filter ... >

I tried defining the schema like this, using different definitions for the
body element, but I can't validate it.

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
elementFormDefault="qualified" attributeFormDefault="unqualified">
    <xs:element name="message" type="MessageType"/>
    <xs:complexType name="MessageType">
            <xs:element type="xs:NMTOKEN" name="messageid"/>
            <xs:element type="xs:anyType" name="body"/>

The reason I need this is because I have to define a structure of a message
that is able any type of body. So I can't define the type of the body (using
a choice, for instance).

Any suggestion welcome,

Happy New Year

Jean-Noel Colin


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS