- From: Michael Kay <mike@saxonica.com>
- Date: Thu, 22 Mar 2007 15:04:00 -0000
- To: "'Shlomo Yona'" <S.Yona@F5.com>, "'Pete Cordell'" <petexmldev@tech-know-ware.com>, <xmlschema-dev@w3.org>
> Is this intentional? Yes. The philosophy in XML Schema is that you validate an element against either an element declaration or a type. The problem is that in most real products, the primary interface is "validate this document against this schema". So it's not a restriction in the spec, it's a restriction in product implementations (which might be attributed to the fact that the authors of the spec didn't always have their feet firmly on the ground.) In XSLT 2.0, if you specify <xsl:variable name="input" select="doc('input.xml')" as="document-node(element(my:invoice))"/> then the system will ensure not only that the input is valid against the schema, but that it is valid against the my:invoice element declaration in the schema. Michael Kay http://www.saxonica.com/
Received on Thursday, 22 March 2007 15:04:13 UTC