Re: Schema embedded in an XML document

As an XML schema is just XML it's quite possible to include an XML schema 
into an instance document.  For example, WSDL is an example of a schema 
being included into an XML instance.

However, such a schema won't automatically be considered to be the schema 
for the instance that it's contains in.  You'll have to add external logic 
to do that.

And, without knowing further details, I'm not sure it's a sensible thing to 
do.  Schemas tend to be larger than instances thereof, and it seems to be 
the wrong place to specify a contract.

HTH,

Pete Cordell
Codalogic Ltd
Interface XML to C++ the easy way using XML C++
data binding to convert XSD schemas to C++ classes.
Visit http://codalogic.com/lmx/ for more info

----- Original Message ----- 
From: "Rowan Bradley" <rowan.bradley@herbertgroup.com>
To: <xmlschema-dev@w3.org>
Sent: Wednesday, April 22, 2009 3:38 PM
Subject: Schema embedded in an XML document


Is it possible to incorporate the schema in a single file along with the
XML content that's meant to conform to the schema? I'm thinking of
something rather like HTML files that can incorporate embedded CSS
styles, or the CSS files can be extracted into a separate CSS file.

Thanks - Rowan

Received on Wednesday, 22 April 2009 16:12:51 UTC