- From: Martin Gudgin <marting@develop.com>
- Date: Tue, 27 Jun 2000 23:47:17 +0100
- To: "Sunil Mishra" <smishra@everest.com>, <xml-dist-app@w3.org>
The symbol element is locally scoped. That is to say the only way to correctly interpret it is to look at its parent. Whether this is good or bad is open to debate let's accept for now that it just *is*. I suspect that the reason the symbol element is locally scoped is that the encoding format of GetLastTradePrice is described in an XML Schema something like this: <complexType name='getLastTradePrice'> <element name='symbol type='string'/> </complexType> <element name='GetLastTradePrice' type='getLastTradePrice'/> By default local element declarations ( those appearing as children of complexType elements ) are in the "" namespace, that is they are locally scoped. The schema could be amended to specify that symbol is in the same namespace as its parent: <complexType name='getLastTradePrice'> <element name='symbol type='string' form='qualified'/> </complexType> <element name='GetLastTradePrice' type='getLastTradePrice'/> which would allow the following encoding: <m:GetLastTradePrice xmlns:m="Some-URI"> <m:symbol>DIS</m:symbol> </m:GetLastTradePrice> At the end of the day as far as SOAP is concerned I don't think either form is more ( or less ) correct, they're just different. Martin Gudgin DevelopMentor ----- Original Message ----- From: "Sunil Mishra" <smishra@everest.com> To: <xml-dist-app@w3.org> Sent: Tuesday, June 27, 2000 8:38 PM Subject: Unclear on SOAP namespaces > I've been staring at the SOAP and namespace specs, and I haven't been able > to understand example 1 in the 1.1 spec (at http://www.w3.org/TR/SOAP/): > > POST /StockQuote HTTP/1.1 > Host: www.stockquoteserver.com > Content-Type: text/xml; charset="utf-8" > Content-Length: nnnn > SOAPAction: "Some-URI" > > <SOAP-ENV:Envelope > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" > SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> > <SOAP-ENV:Body> > * <m:GetLastTradePrice xmlns:m="Some-URI"> > * <symbol>DIS</symbol> > * </m:GetLastTradePrice> > </SOAP-ENV:Body> > </SOAP-ENV:Envelope> > > In the lines prefixed by *, GetLastTradePrice is in the namespace m. > However, the namespace of its content, symbol, is indeterminate. There is no > default namespace declared for the document, and my understanding of the > spec is that symbol would belong to the namespace identified by the URN "". > Perhaps I've misunderstood the namespace spec? > > Assuming I haven't... And assuming symbol is something that is of interest > solely to the receiving server... (The additional encoding rules are the > ones that do all the work in specifying the types and structures of the > arguments after all...) Then the question is why the SOAP spec would have > this recipient specific XML tag be in a namespace other than m. m after all > appears to encode the rules for formatting the message for the given > recipient, so why not use m:symbol instead? > > Thanks in advance, > > Sunil
Received on Tuesday, 27 June 2000 19:03:50 UTC