[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: [ubl-dev] SBS and Restricted Data Types
At 2006-05-04 00:01 +0800, Chin Chee-Kai wrote: > >>2. a way to say (and maybe > >>validate/verify) that a schema is a strict subset of another schema > >>of which it therefore uses the same namespace. Too late for XSD 1.1? > >Stephen, > >That's an interesting question to ask, or re-phrasing it, >"is there a way to determine if the entire set of all possible >instances that are validated as acceptable by a given schema (A) >are also validated as acceptable by another given schema (B)" ? > >Call this "sub-of" operator operating on 2 parameters (A) & (B) >each of type schema. I believe there is a way, through itemization by exhaustion, and I believe I can do it for UBL schemas and subsets because UBL uses the "Garden of Eden" approach where everything is globally defined and nothing is anonymously defined locally. I hope to research this more but the essence of my idea is: (1) - using XPath files created for the schemas, generate the XPath address of every possible element and attribute information item of both the smaller schema and the larger schema (2) - if the set of XPaths of the smaller schema is wholly contained within the set of XPaths of the superset schema then, by exhaustion, it is proven that the smaller schema is a strict subset because information item in the exhaustive list generated by the smaller schema isn't found in the exhaustive list of the larger schema >This "sub-of" operator, taking inputs which are schema themselves, >would likely be outside of the realm in which XSD specifies. >But of course, whatever XSD does (or doesn't) specify would >affect the realisability of this "sub-of" operator that you suggested. My method isn't quick and simple as this, nor does it allow operations on schemas as operands ... it is merely proof by proving the contrary (that the smaller schema describes an information item not allowed in the larger schema) is not true. And I think I can read an XPath file and a schema expression and synthesize a subset schema reflecting the subset constraints ... and then use the above proof by exhaustion that the subset schema (while not normative) is provably acceptable to use should an application wish to use one. BUT IT WOULDN'T CHANGE THE DEFINITION OF UBL! An application should still (morally, since behaviours are not normative) accept an instance of full UBL even if it is only acting on the SBS subset of information items ... I think it is dangerous to use a subset schema for anything for fear of inadvertently disallowing a valid UBL instance just because it includes valid information items that are not meaningful to the applicaiton. This needs more thought and experimentation ... I think I'll have some free time around November to look at it. I hope this helps. . . . . . . . . . . . Ken -- Registration open for XSLT/XSL-FO training: Wash.,DC 2006-06-12/16 Also for XSLT/XSL-FO training: Minneapolis, MN 2006-07-31/08-04 Also for XML/XSLT/XSL-FO training:Birmingham,England 2006-05-22/25 Also for XSLT/XSL-FO training: Copenhagen,Denmark 2006-05-08/11 World-wide on-site corporate, govt. & user group XML/XSL training. G. Ken Holman mailto:gkholman@CraneSoftwrights.com Crane Softwrights Ltd. http://www.CraneSoftwrights.com/u/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Cancer Awareness Aug'05 http://www.CraneSoftwrights.com/u/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]