Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: [xmlschema-dev]

From: noah_mendelsohn@--.---.---
To: "Michael Kay" <mike@--------.--->
Date: 5/10/2006 4:09:00 PM
> > 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 
as
> 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 
it.

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
1-617-693-4036
--------------------------------------





From ovisvana@n... Thu May 11 14:33:17 2006
Received: from wiggum.w3.org ([128.30.52.23


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent