W3C home > Mailing lists > Public > xmlschema-dev@w3.org > May 2006

RE%3A%20%5Bxmlschema-dev%5D%20%3Cnone%3E&In-Reply-To=%253C016c01c67472 %24d3330db0%246401a8c0%40turtle%253E&References=%253C016c01c67472%24d3 330db0%246401a8c0%40turtle%253E

From: <ovisvana@netzero.net>
Date: Thu, 11 May 2006 09:48:06 GMT
To: xmlschema-dev@w3.org
Message-Id: <20060511.024806.13564.1189369@webmail28.lax.untd.com>
        As a matter of fact, it is common practice to embed a schema within a soap message in a document style webservice.  This is sometimes necessary as in a document style webservice, the message is a document as opposed to a request/response mechanism that is built in to the rpc style webservice. 

-- noah_mendelsohn@us.ibm.com wrote:

> > By the way, we are also sometimes asked why you can't have 
> > the equivalent of a DTD internal subset, I.e. putting a 
> > schema fragment in the XML file but outside of the document 
> > element tree, and the answer is similar:  XML is not 
> > extensible in that way either.  The only "schema" language 
> > that can be embedded as an internal subset in an XML document 
> > is a DTD.
> I've never seen anything in the spec that stops you embedding a schema
> document within the source document to be validated, and referring to it 
> say xsi:noNamespaceSchemaLocation="#schema". Where is this rule?

I didn't say there was something that prevents you from embedding a schema 
within the source tree to be validated.  As you say, it can be done, 
though there might be some ambiguity about whether a given processor will 
honor the location hint as you propose.   Indeed, people do this 
occasionally and it's sometimes useful.

What I did say is that you can't put a schema where the internal subset 
is, which is outside of the tree of elements.  When the schema is in the 
element tree, then it becomes part of the logical content of the document. 
 If you're validating from the root, then the schema has to validate or at 
least allow for its own presence.  If you write another schema, perhaps in 
RelaxNG or or Schematron, then that too has to allow for the presence of 
the xsd:schema element.  So, my point was that you have with DTDs an 
important ability to put your constraints where I believe they properly 
belong, which is as metadata for the element tree rather than as part of 

Altogther, I'm less enthusiastic about including schemas in content than 
some other people seem to be.  I do agree that there are certain specific 
scenarios, particularly when the root is some sort of container such as a 
SOAP envelope, where it can make sense.  In general, if I have some 
application-specific XML tree such as an encoded work of music, a purchase 
order, etc., then I'm not convinced that an xsd:schema logically belongs 
as a descendent of the root element.

Noah Mendelsohn 
IBM Corporation
One Rogers Street
Cambridge, MA 02142

Call Anyone, Anytime, Anywhere in the World - FREE!
Free Internet calling from NetZero Voice
Visit http://www.netzerovoice.com today!
Received on Thursday, 11 May 2006 14:33:17 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:10 UTC