Daniel,

These two snippets are semantically equivalent:

<tns:foo xmlns:tns="urn:foo.bar">
   <bar>foobar</bar>
</tns:foo>

and

<foo xmlns="urn:foo.bar">
   <bar xmlns="">foobar</bar>
</foo>

If their parser can't process them both, it's seriously flawed.

Anne

On 4/19/06, Daniel Destro < [EMAIL PROTECTED]> wrote:
I understand.
This must be because I started to use LITERAL style instead of ENCODED, right?

My Web Service consumer is complaining about the lack of "ns1". They did a SOAP parser themselves, which is not good. I told them to follow the SOAP standard, otherwise they are going to have millions of problems. Do you agree?

Thanks
Daniel



On 4/19/06, Anne Thomas Manes <[EMAIL PROTECTED]> wrote:
A namespace declaration that specifies a prefix (e.g., xmlns:foo="urn:foo.bar") allows you to refer to that namespace by its declared prefix ("foo"). A namespace declaration that does not specify a prefix ( e.g. xmlns="urn:foo.bar") establishes a default namespace. Any element within the scope of such a declaration that does not specify a prefix is assumed to be in the default namespace. If you have an element that does not have a qualified name, then you must override the default namespace.

For example, lets assume that we have an element called "foo" that is in the "urn:foo.bar" namespace, and it has a child element called "bar", which is a local element to "foo" and therefore is in no namespace. You could represent it like so:

<tns:foo xmlns:tns="urn:foo.bar">
   <bar>foobar</bar>
</tns:foo>

or

<foo xmlns="urn:foo.bar">
   <bar xmlns="">foobar</bar>
</foo>

but this would not be valid:

<foo xmlns="urn:foo.bar">
   <bar>foobar</bar>
</foo>

Anne


On 4/19/06, Daniel Destro <[EMAIL PROTECTED]> wrote:
What is the difference between the two namespaces

xmlns="urn:SacSilog"

and

xmlns:ns1="urn:SacSilog">

Why one or other?

thanks




Reply via email to