Here's an example (a SOAP message):

<SOAP-ENV:Envelope
   xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
   SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>
   <SOAP-ENV:Header>
      <HeaderA 
xmlns="HeaderURI"
SOAP-ENV:mustUnderstand="0">
         The text of the header
      </HeaderA>
   </SOAP-ENV:Header>
   <SOAP-ENV:Body>
      <SomeMethod xmlns="SomeURI">
         <Param1>A</Param1>
         <Param2>B</Param2>
         <Body >The body double</Body>
      </SomeMethod>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Note that there are a bunch of elements qualified with the namespace
prefix SOAP-ENV. Within the SOAP-ENV:Body element, there are some
elements qualified with a different namespace (the SomeMethod element
and its children). Since the namespace qualification applies to the
element on which it is defined and all nested elements, you can avoid
element name clashes by just scoping an enclosing element with its own
namespace.

There's a description of how the SOAP protocol uses namespaces to avoid
clashes such as the one you describe here:
http://www.devx.com/upload/free/features/vbpj/2000/08aug00/ts0008/tsso00
08/tsso0008.asp

Here's a good (and brief) tutorial on XML namespaces:
http://www.vbws.com/tutors/xmlns/xmlns.aspx

-----Original Message-----
From: Jason Dillon [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, April 21, 2002 5:36 PM
To: Matt Humphrey
Cc: [EMAIL PROTECTED]
Subject: RE: RE: [JBoss-dev] MBean interceptor stack config & params


Can you do me a favoir and explain this in more detail... and example
too.  It 
would save me the time to hunt down the relevent specs just to
understand the 
concept.

--jason


Quoting Matt Humphrey <[EMAIL PROTECTED]>:

> You can do this with namespaces. The stuff outside the tag is scoped
> with a namespace and has one schema, the stuff inside the tag is 
> scoped with another namespace. This technique is used frequently in 
> SOAP messages.
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]] On Behalf Of
> Jason Dillon's Test Account
> Sent: Sunday, April 21, 2002 1:39 AM
> To: [EMAIL PROTECTED]
> Subject: Re: RE: [JBoss-dev] MBean interceptor stack config & params
> 
> 
> Yes perhaps... but I think only if we can get a schema to accept any
> given xml nested inside of a tag... which I still don't know if that 
> is possible.
> 
> Otherwise we would need to wrap that in CDATA & let the interceptor do
> whatever it wanted with it (parse it into xml, read it as properties, 
> blah).
> 
> If you or anyone knows if it is possible to specify in a an xml schema
> this arbitrary nested xml please let me know.
> 
> --jason
> 
> * * *
> 
> View thread online:
> http://jboss.org/forums/thread.jsp?forum=66&thread=13523
> 
> _______________________________________________
> Jboss-development mailing list [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development
> 
> 
> 
> _______________________________________________
> Jboss-development mailing list [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development
> 




-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/


_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to