[Home] [By Thread] [By Date] [Recent Entries]
I note too that it would be handy to have a way to associate the prose instructions corresponding to an XML processing instruction (PI) with that PI - perhaps all PIs should at some time in the future contain a reserved attribute which points to the resolvable URL with their actual instructions. How about 'pi-href'? e.g. <?xml-subset superset-loc="http://www.acme.example/acmeschema.xsd" superset-ns="acme:example:acmeschema-0-1" type="lax" pi-href="http://lists.xml.org/archives/xml-dev/200908/msg00318.html"?> --- Stephen D Green 2009/8/27 Stephen Green <stephengreenubl@g...>: > And in most cases there would not even be a need to process a second > artifact: > > > ======================= > > Instructions corresponding to processing instruction: > > <?xml-subset superset-loc="<<url>>" [superset-ns="<<uri>>"] > type="strict | lax"?> > > are: > > > 'xml-subset' the schema with this processing instruction constrains XML such > that all so constrained XML instances are also valid instances of a superset > schema > > 'superset-loc' - a url (or filenpath/filename) resolving to the > location of the superset > schema > > 'superset-ns' - optional - the namespace of the superset schema (if not supplied > then this is the same as the namespace, if any, of the subset) > > 'type' - values either 'strict' or 'lax', instructions as follows > > A) If type="lax": > > In effect (that is the outcome should be the same as doing the following) > > 1. try to locate superset schema and use it to validate the instance, handling > any errors as if this were the primary schema for the instance but if no schema > could be located then skip this validation step > > (It could be an optional processing step to check that the subset is in fact > a true subset of the superset, that is, logically, that every valid instance for > the subset schema is also a valid instance for the superset schema.) > > 2. if there are no errors from logical step 1) or if step 1) was skipped then > validate document using subset schema (the schema containing this processing > instruction) and handle errors as normal. > > A) If type="strict": > > Just perform validation according to the subset schema and handle errors as if > this were the primary schema. > > > ======================== > > > So you see that it is a matter of trying to locate the superset schema but there > is no actual dependency on it. In cases where it cannot be located the > PI functions > merely as a note about the intent of the schema as a subset of some other schema > and a reminder that there may be valid instances for the namespace > which are not > valid accoring to the subset schema. > > > Stephen D Green > > > > >> Well 'standalone' is part of the XML declaration; I was thinking of >> a processing instruction (relevant only to a schema) like:- >> >> <?xml-subset superset-loc="http://..." superset-ns="http://..." type="strict"?> >> >> where 'superset-loc' would be a url to the location of the superset schema, >> 'superset-ns' would be the namespace of the superset schema (optional, >> without it being the same namespace as the subset) and 'type' would specify >> whether the validation is to allow nodes only found in the superset and not >> in the subset (values perhaps 'strict' and 'lax' for 'don't allow' and >> 'do allow' such nodes respecively). >> >> --- >> Stephen D Green >> >> PS 'xml-subset' is probably not appropriate enough a PI name >> maybe 'xml-subset-schema' a little better >>> >>> >>> >>> 2009/8/27 mozer <xmlizer@g...>: >>>> Do you mean something like standalone="yes/no" ? >>>> >>>> Xmlizer >>>> >>>> On Wed, Aug 26, 2009 at 8:48 PM, Stephen Green<stephengreenubl@g...> wrote: >>>>> Would it be feasible to use a processing instruction at the >>>>> top of an xml schema to designate it as a subset of another >>>>> schema (in the sense Rick Jelliffe recently mentioned on this >>>>> list of all instances valid by the subset schema being also >>>>> valid by the superset schema)? How would one go about >>>>> defining such a processing instruction? Would it have to be >>>>> something like DSDL - via ISO? I noticed Rick's mention of >>>>> the need for specifying a schema and/or namespace as a >>>>> subset of another schema and/or namespace and thought >>>>> maybe the problem could get critical mass of interest sufficient >>>>> to solving it. I have found the problem exists not only when >>>>> the subset schema has a different namespace; it was tricky >>>>> to find a way to define a subset without changing the >>>>> namespace when first working on subsets for the Universal >>>>> Business Language and I think people eventually just wrote >>>>> a second schema with the same namespace but without any >>>>> way other than an accompanying prose spec to show it as >>>>> defining a subset of a superset (the Standard UBL schemas). >>>>> >>>>> Maybe to solve this a processing instruction could be defined >>>>> which specifies within a subset schema that it is a subset of >>>>> schema at location ABC, either same namespace or >>>>> namespace XYZ. There might also need to be a way to tell >>>>> tools (if feasible, I've no idea) that they should either allow >>>>> nodes of just the superset or not when the subset schema is >>>>> given as the schema for the instance. How then to get such >>>>> a PI or set of PIs specified and supported? >>>>> >>>>> Otherwise it might be that one has to stick with prose and/or >>>>> accompanying (test) assertions such as those of Schematron >>>>> or (work-in-progress) OASIS TAG TC's Test Assertion Markup >>>>> Language (shameless plug). >>>>> --- >>>>> Stephen D Green >>>>> >>>>> _______________________________________________________________________ >>>>> >>>>> XML-DEV is a publicly archived, unmoderated list hosted by OASIS >>>>> to support XML implementation and development. To minimize >>>>> spam in the archives, you must subscribe before posting. >>>>> >>>>> [Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/ >>>>> Or unsubscribe: xml-dev-unsubscribe@l... >>>>> subscribe: xml-dev-subscribe@l... >>>>> List archive: http://lists.xml.org/archives/xml-dev/ >>>>> List Guidelines: http://www.oasis-open.org/maillists/guidelines.php >>>>> >>>>> >>>> >>> >> >
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] |

Cart



