This question might alternately be phrased as 'What determines the set of schemas available for a validation episode?'

Suppose a parser is instantiated with a grammar pool and used to preparse the grammar for namespace C, which imports B, which imports A. There is an abstract element a in A which declares itself the head of a substitution group, an element b in B which affiliates with that group declares itself the head of a substitution group, an element c of C which affiliates with b's substituion group and an element c' of C which affiliates itself with a.

This parser is used to validate a document d1 with a root element in namespace B. Somewhere in the content there is a reference to element a. When the allowed substitutions are determined for a, are b, c and c' in the set, or just b, or some other combination?

Now the grammar for namespace E, also importing B, is preparsed using the same grammar pool. There is an element e in E which affiliates itself with b's substitution group. If I reparse d1, will e now appear in the valid substitutions for a? Is there a dependence on the history of a parser's grammar pool?

Would the answer to these questions be different if the root element of d1 were in namespace C? Would the contents of the parser's externalSchemaLocations property make any difference to the answers?

Does the XML Schema spec specify what namespaces are involved in a particular validation episode? If so, a pointer to the relevant section (which I've obviously missed) would be helpful. If not, is this a matter left up to the implementation?

[One situation in which this might matter is in reading WSDL descriptions of web services. The WSDL description contains or imports schemas which describe the types for the inputs and outputs of several web services. This might be grammar C in the example above. Some of those inputs or outputs may be defined in B. Another WSDL description for some other web services might import grammar E. If a form were being generated for the input to an operation that allowed for all the possible substitutions of certain elements, would that form be different depending upon the usage history of the parser or grammar pool?]

Jeff


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to