- From: Jacek Kopecky <jacek@systinet.com>
- Date: 15 Oct 2002 09:58:55 +0200
- To: Martin Gudgin <mgudgin@microsoft.com>
I like that. 8-) Is this like saying (however softly and quietly) that we don't buy point 1 below about XML Schema? 8-) You're free to ignore this cheeky question. 8-) Jacek Kopecky Senior Architect, Systinet Corporation http://www.systinet.com/ On Tue, 2002-10-15 at 05:56, Martin Gudgin wrote: > > I've been thinking a bit more about this. How about > > <wsdl:types> > <xs:import namespace='http://example.org/foo' /> > <xs:import namespace='http://example.org/bar' /> > > <xs:schema targetNamespace='http://example.org/baz' > > <xs:import namespace='http://example.org/quux' /> > </xs:schema> > </wsdl:types> > > and say that schema components in foo, bar and baz are visible to WSDL > components but schema components in quux are only visible to the inline > schema. Schema components in foo and bar are NOT visible to the inline > schema. > > Gudge > > > -----Original Message----- > > From: Don Mullen [mailto:donmullen@tibco.com] > > Sent: 11 October 2002 19:54 > > To: Martin Gudgin > > Cc: Jacek Kopecky; WS Description WG > > Subject: RE: Importing schemata into WSDL > > > > > > > > Martin: > > > > I understand how you can argue this position. In XML Schema > > spec (part 1), section 4.2.3, we have: > > > > "The *schema components* (that is {type definitions}, > > {attribute declarations}, {element declarations}, {attribute > > group definitions}, {model group definitions}, {notation > > declarations}) of a schema corresponding to a <schema> > > element information item with one or more <import> element > > information items must include not only definitions or > > declarations corresponding to the appropriate members of its > > [children], but also, for each of those <import> element > > information items for which clause 2 above is satisfied, a > > set of *schema components* identical to all the *schema > > components* of I." > > > > So all the schema components that are <import>ed are > > available to reference by the importing schema. In addition, > > an XML instance document that uses the a.xsd schema must be > > able to access components within all three namespaces. > > > > <aNS:x xsi:schemaLocation"a.xsd" xmlns:aNS="fooA" > > xmlns:bNS="fooB" xmls:cNS="fooC"> <bNS:y> > > <cNS:z/> > > </bNS:y> > > </aNS:x> > > > > However, as you indicated below, a.xsd can't reference c.xsd, > > even though b.xsd <import>ed c.xsd. So by that argument, I > > don't see why bar.wsdl should be able to reference anything > > in b.xsd if a.xsd is included inline within <types>. I would > > think it should mirror XML Schema, and require a separate > > <import> of b.xsd in order to reference those components > > directly. I guess I see a difference between reference the > > component definitions (as referenced in schemas or wsdls), > > and actual use of the components in an instance doc. > > > > Don > > > > > -----Original Message----- > > > From: Martin Gudgin [mailto:mgudgin@microsoft.com] > > > Sent: Friday, October 11, 2002 8:44 PM > > > To: Jacek Kopecky; WS Description WG > > > Subject: RE: Importing schemata into WSDL > > > > > > Jacek, > > > > > > I'm afraid I disagree with your analysis of how schema > > import works. > > > Here's why. > > > > > > Taking your example: > > > > > > Given three schema documents a.xsd, b.xsd and c.xsd with > > > three separate > > > target namespaces, where a.xsd imports b.xsd imports c.xsd it is my > > > understanding that the following statements are true: > > > > > > 1. The resulting schema contains components from all three > > namespaces > > > > > > 2. Components in namespace a can only reference components > > > in namespace > > > a and/or namespace b > > > > > > 3. Components in namespace b can only reference components > > > in namespace > > > b and/or namespace c > > > > > > 4. Components in namespace c can only reference other > > components in > > > namespace c. > > > > > > Note that the reason components in namespace a cannot reference > > > components in namespace c ( point 2 ) is because a.xsd does > > not have > > > an import for namespace c and the schema spec is very clear that > > > you cannot > > > reference things in a namespace you have not imported ( same > > > applies to > > > points 3 and 4 ). > > > > > > However, the critical point from the POV of the component > > > model for WSDL > > > is point 1. All we need to say is that for any <xs:schema> > > element in > > > <wsdl:types> ALL the schema components directly defined in the > > > <xs:schema> and those directly imported are visible to the > > rest of the > > > WSDL components and can be referenced. Strictly speaking we > > could also > > > say that you can reference components in other namespaces the are > > > imported at a deeper level, because those components ARE > > present, but > > > there would be no way of knowing about them in the WSDL > > > itself without a > > > priori knowledge of the schemas you were directly importing. > > > > > > Gudge > > > > > > > -----Original Message----- > > > > From: Jacek Kopecky [mailto:jacek@systinet.com] > > > > Sent: 11 October 2002 18:16 > > > > To: WS Description WG > > > > Subject: Importing schemata into WSDL > > > > > > > > > > > > > > > > Hi all, 8-) > > > > > > > > in WSDL 1.1 the import statement allowed importing schema > > > > documents. In WSDL 1.2 we are apprarently moving in the > > > > direction of disallowing this, but we acknowledge it must be > > > > possible to import an external schema into a WSDL definitions > > > > document somehow. > > > > > > > > What I've heard from Gudge is that it is possible to import a > > > > schema at http://example.org/schema.xs (with the same target > > > > namespace) using > > > > > > > > <wsdl:types> > > > > <xs:schema> > > > > <xs:import namespace="http://example.org/schema.xs" > > > > location="http://example.org/schema.xs"/> > > > > </xs:schema> > > > > </wsdl:types> > > > > > > > > I have a problem with this because IMHO this violates XML > > > > Schema import semantics. Let me explain: > > > > > > > > Let's assume I have three schemas, a.xs, b.xs and c.xs, with > > > > different target namespaces; where a.xs only imports b.xs and > > > > b.xs imports c.xs. On the component level; a.xs then contains > > > > all the type and element definitions from a.xs and all the > > > > type and element definitions from b.xs are accessible in a.xs. > > > > > > > > Note that no definitions from c.xs are visible in a.xs - this > > > > is logical because the fact that b.xs imports c.xs is just an > > > > implementation detail of b.xs and should not be propagated > > > > outside of b.xs. In other words, a.xs must not be affected by > > > > a change to b.xs that only removes the import and redefines > > > > those definitions (still in b.xs) that used definitions from c.xs. > > > > > > > > What I think this means is that an xs:schema element > > > > (together with any > > > > contents) is a syntactic representation of the set of type > > > > and element definitions contained within. > > > > > > > > I think it's apparent from the paragraph above that WSDL > > > > should not know about imports in wsdl:types/xs:schema. I.e. a > > > > schema cannot be imported into a WSDL definitions document by > > > > importing it in a contained schema. > > > > > > > > I think that we'll have to reallow our import statement to > > > > import schemas (which should be doable in a safe way, I > > > > believe) or we should introduce a typesImport statement that > > > > would serve to import external schemata, as the types > > > > statement serves to provide (import) internal schemata. > > > > > > > > Hope it makes sense, > > > > > > > > Jacek Kopecky > > > > > > > > Senior Architect, Systinet Corporation > > > > http://www.systinet.com/ > > > > > > > > > > > > > > > > > > > > > > > >
Received on Tuesday, 15 October 2002 04:04:32 UTC